myimagelib.myImageLib.rawImage
- class myimagelib.myImageLib.rawImage(file_dir)
Convert raw images (e.g. nd2) to tif sequences. Throughout my research, I have mostly worked with two raw image formats: *.nd2 and *.raw. Typically, they are tens of GB large, and are not feasible to load into the memory of a PC as a whole. Therefore, the starting point of my workflow is to convert raw images into sequences of *.tif images.
This class is designed to have a unified interface for different raw image formats. The class is initialized with the directory of a raw image file, and the
extract_tif()
method will convert the raw image to tif sequences. The tif sequences are saved in a subfolder named raw and 8-bit under the folder where the raw image file is located.from myimagelib import rawImage file_dir = "path/to/your/file.nd2" img = rawImage(file_dir) img.extract_tif()
- __init__(file_dir)
Construct rawImage object using the file directory.
Methods
__init__
(file_dir)Construct rawImage object using the file directory.
extract_tif
()Extract tif sequence from raw image files.
read_raw_image_info
(info_file)Read image info, such as fps and image dimensions, from *.RawImageInfo.txt.