File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
eitprocessing/datahandling Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 77
88import numpy as np
99from strenum import LowercaseStrEnum
10+ from tifffile import imwrite
1011from typing_extensions import Self
1112
1213from eitprocessing .datahandling .mixins .equality import Equivalence
@@ -117,6 +118,21 @@ def _sliced_copy(
117118 def __len__ (self ):
118119 return self .pixel_impedance .shape [0 ]
119120
121+ def export_pixel_data (
122+ self ,
123+ fname : str | Path ,
124+ ) -> None :
125+ """Save pixel impedance data as 3D tiff stack.
126+
127+ Args:
128+ fname: Output file name.
129+ """
130+ # TODO: add metadata (at the very least time)
131+ # TODO: add standardization for output paths
132+ # TODO: allow different file formats??
133+ # output_path = Path((self.path[0]).parent() / fname) if isinstance(fname, str) else fname #noqa: ERA001
134+ imwrite (fname , self .pixel_impedance )
135+
120136 @property
121137 def global_baseline (self ) -> np .ndarray :
122138 """Return the global baseline, i.e. the minimum pixel impedance across all pixels."""
You can’t perform that action at this time.
0 commit comments