imctools.io¶
imctools.io.utils¶
-
reshape_long_2_cyx
(data, is_sorted=True, shape=None, channel_indices=None)¶ Reshape data from long format into cyx format (channels, y, x).
-
get_ome_xml
(img, image_name, channel_names, big_endian, pixel_size, pixel_depth, creator=None, acquisition_date=None, channel_fluors=None, xml_metadata=None, **ome_xml_kwargs)¶ Helper function for xtiff library to get a proper OME-TIFF XML
- Return type
ElementTree
-
sort_acquisition_channels
(session)¶ Sort entries of acquisition channels dictionary by channel order number
imctools.io.imc¶
imctools.io.mcd¶
-
class
McdParser
(filepath, file_handle=None, xml_metadata_filepath=None)¶ Raw MCD file parser.
The McdParser object should be closed using the close method.
-
property
origin
¶
-
property
session
¶
-
get_mcd_xml
()¶ Original (raw) metadata from MCD file in XML format.
-
property
mcd_filename
¶ Name of the open MCD file
-
get_acquisition_data
(acquisition_id)¶ Returns AcquisitionData object with binary image data for given acquisition ID
-
get_slide_image
(slide_id)¶ Get slide image as numpy array
-
save_slide_image
(slide_id, output_folder, output_filename=None)¶ Save slide image
-
get_panorama_image
(panorama_id)¶ Get panorama image as numpy array
-
save_panorama_image
(panorama_id, output_folder, output_filename=None)¶ Save panorama image of the acquisition
-
get_before_ablation_image
(acquisition_id)¶
-
save_before_ablation_image
(acquisition_id, output_folder, output_filename=None)¶
-
get_after_ablation_image
(acquisition_id)¶
-
save_after_ablation_image
(acquisition_id, output_folder, output_filename=None)¶
-
close
()¶ Close file handlers.
-
property
-
class
McdXmlParser
(mcd_xml, source_path, process_namespaces=False)¶ Converts MCD XML structure into IMC session format.
-
property
origin
¶ Origin of the data
-
property
session
¶ Root session data
-
get_mcd_xml
()¶ Original (raw) metadata from MCD file in XML format.
-
property
Definitions of MCD XML keywords
imctools.io.ometiff¶
-
class
OmeTiffParser
(filepath, slide_id=0, channel_id_offset=0)¶ Parser of MCD compatible .OME-TIFF files.
Allows to get a single IMC acquisition from a single OME-TIFF file.
-
property
origin
¶
-
property
filepath
¶
-
get_mcd_xml
()¶ Original (raw) metadata from MCD file in XML format.
- Return type
Optional
[str
]
-
get_acquisition_data
()¶ Returns AcquisitionData object with binary image data
-
property