Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
zoccoler committed Aug 18, 2023
2 parents 3a3d132 + ea0afd2 commit f07d4f7
Show file tree
Hide file tree
Showing 15 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = napari-flim-phasor-plotter
version = 0.0.5
version = 0.0.6
description = A plugin that performs phasor plot from TCSPC FLIM data.
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down
2 changes: 1 addition & 1 deletion src/napari_flim_phasor_plotter/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.0.5"
__version__ = "0.0.6"

from ._reader import napari_get_reader
from ._sample_data import load_seminal_receptacle_image, load_hazelnut_image, load_hazelnut_z_stack, load_lifetime_cat_synthtetic_single_image
Expand Down
12 changes: 11 additions & 1 deletion src/napari_flim_phasor_plotter/_sample_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,19 @@ def load_hazelnut_z_stack():
Time dimension has length 1.
"""
import numpy as np
import zipfile
from pathlib import Path
from napari_flim_phasor_plotter._reader import read_stack

folder_path = DATA_ROOT / "hazelnut_FLIM_z_stack"
zip_file_path = Path(DATA_ROOT / "hazelnut_FLIM_z_stack.zip")
extracted_folder_path = Path(DATA_ROOT / "unzipped_hazelnut_FLIM_z_stack")
# Create the target directory if it doesn't exist
extracted_folder_path.mkdir(parents=True, exist_ok=True)
# Extract the zip file
with zipfile.ZipFile(zip_file_path, 'r') as zip_ref:
zip_ref.extractall(extracted_folder_path)
folder_path = extracted_folder_path / "hazelnut_FLIM_z_stack"

image, metadata = read_stack(folder_path)
image, metadata = image[0], metadata[0] # Use first channel, second detector is empty
return [(image, {'name': 'hazelnut raw FLIM z-stack',
Expand Down
Loading

0 comments on commit f07d4f7

Please sign in to comment.