Data module¶
Image Factory¶
Author: | Sebastian Reinhard |
---|---|
Organization: | Biophysics and Biotechnology, Julius-Maximillians-University of Würzburg |
Version: | 2019.06.26 |
Image¶
Author: | Sebastian Reinhard |
---|---|
Organization: | Biophysics and Biotechnology, Julius-Maximillians-University of Würzburg |
Version: | 2019.06.26 |
-
class
impro.data.image.
ImageReader
(path)¶ Bases:
object
Read Image file
Possible formats are .czi, .lsm, .tiff, .png
-
path
¶ Path to file
Type: str
-
data
¶ Image data as array
Type: np.array
-
metaData
¶ Meta Data of image file containing computional dimensions: {ShapeSizeX, ShapeSizeY, ShapeSizeZ, ShapeSizeC} and physical dimensions: SizeX(Pixel Size in X direction)…
Type: np.array
Example
>>> file = ImageReader("path_to_file.czi") >>> file.parse() >>> file.data.shape (4,103,2430,2430)
-
parse
(calibration_px=1.0)¶ Read data/Metadata from file
-
reset_data
()¶ resets data
-
set_calibration
(px: float)¶ Set pixel size manually
-
-
class
impro.data.image.
LocalisationReader
(path: str)¶ Bases:
object
Read RapidSTORM files
Rewritten class to read STORM/dSTORM data from a text file in a numpy array. Improved performance and logic. Can transform the localizations if a matrix is given. Recives metadata from file header.
-
path
¶ Path to Rapidstorm .txt file
Type: str
-
stormData
¶ Restructured data: X, Y, Precision, Z, Emission, Frame #todo switch Precision and Z
Type: np.array
-
size
¶ X,Y size of data in nanometer
Type: np.array
Example
>>> file = LocalisationReader("path_to_Rapidstormfile.txt") >>> file.parse() >>> data = file.stormData >>> data.shape (100000, 6)
-
parse
()¶ Read dSTORM data/Metadata from file
-
reset_data
()¶ Resets dSTORM data
-
transformAffine
(path=None, src=None, dst=None)¶ Transform dSTORM data affine with Landmarks file
Parameters: - path (str, optional) – path to file containing source points in column 1,2 (starting by 0) and target points in column 3,4
- src ((,2) ndarray) – X,Y coordinates of source points
- dst ((,2) ndarray) – X,Y coordinates of destination points
-