diff --git a/src/blik/napari.yaml b/src/blik/napari.yaml index 9fc5717..b8c2912 100644 --- a/src/blik/napari.yaml +++ b/src/blik/napari.yaml @@ -7,6 +7,10 @@ contributions: - id: blik.read_files python_name: blik.reader:get_reader title: "Open files with blik" + # samples + - id: blik.sample_hiv_dataset + python_name: blik.remote_data:load_hiv_dataset + title: "Open sample HIV VLPs dataset" # writers - id: blik.write_image python_name: blik.writer:write_image @@ -135,3 +139,8 @@ contributions: display_name: "Gaussian filter" - command: blik.power_spectrum display_name: "Power spectrum" + + sample_data: + - command: blik.sample_hiv_dataset + key: blik_hiv_dataset + display_name: "Tomogram and particles of HIV VLPs" diff --git a/src/blik/remote_data.py b/src/blik/remote_data.py new file mode 100644 index 0000000..883f90e --- /dev/null +++ b/src/blik/remote_data.py @@ -0,0 +1,14 @@ +import pooch + +from .reader import read_layers + + +def load_hiv_dataset(): + reg = pooch.create( + path=pooch.os_cache("blik"), + base_url='doi:10.5281/zenodo.6504891/', + ) + reg.load_registry_from_doi() + + paths = [reg.fetch(f) for f in reg.registry_files] + return read_layers(*paths)