imctools.converters¶
-
export_acquisition_csv
(root_folder, output_folder, output_name='acquisition_metadata')¶ Export CSV file with merged acquisition metadata from all session subfolders.
-
mcdfolder_to_imcfolder
(input, output_folder, create_zip=False, parse_txt=False)¶ Converts folder (or zipped folder) containing raw acquisition data (mcd and txt files) to IMC folder containing standardized files.
- Parameters
input¶ (
Union
[str
,Path
]) – Input folder / .zip file with raw .mcd/.txt acquisition data files.output_folder¶ (
Union
[str
,Path
]) – Path to the output folder.create_zip¶ (
bool
) – Whether to create an output as .zip file.parse_txt¶ (
bool
) – Always use TXT files if present to get acquisition image data.
-
omefile_2_analysisfolder
(filename, output_folder, basename, panel_csv_file=None, metalcolumn='Metal Tag', usedcolumn='ilastik', bigtiff=False, sort_channels=True, dtype=None)¶ Converts single OME-TIFF file to folder compatible with IMC segmentation pipeline.
- Parameters
filename¶ (
Union
[str
,Path
]) – Path to input OME-TIFF file.output_folder¶ (
Union
[str
,Path
]) – Output folder.basename¶ (
str
) – Basename of the acquisition.panel_csv_file¶ (
Union
[str
,Path
,None
]) – Name of the CSV file that contains the channels to be written out.metalcolumn¶ (
str
) – Column name of the metal names.usedcolumn¶ (
str
) – Column that should contain booleans (0, 1) if the channel should be used, i.e. “ilastik”.bigtiff¶ – Whether to save TIFF files in BigTIFF format.
sort_channels¶ – Whether to sort channels by mass.
dtype¶ (
Optional
[Type
]) – Output Numpy data type.
-
omefolder_to_analysisfolder
(input_folder, output_folder, panel_csv_file, analysis_stacks, metalcolumn='Metal Tag', dtype=<class 'numpy.uint16'>)¶ Convert OME tiffs to analysis tiffs that are more compatible with tools. A CSV with a boolean column can be used to select subsets of channels or metals from the stack. The channels of the tiff will have the same order as in the csv.’
- Parameters
input_folder¶ (
Union
[str
,Path
]) – Input folderoutput_folder¶ (
Union
[str
,Path
]) – Output folderpanel_csv_file¶ (
Union
[str
,Path
]) – Name of the CSV file that contains the channels to be written out.analysis_stacks¶ (
Sequence
[Tuple
[str
,str
]]) – Array of analysis stack definitions in a tuple format (column, suffix).metalcolumn¶ (
str
) – Column name of the metal names.dtype¶ – Output numpy dtype
-
omefile_to_histocatfolder
(filepath, base_folder, mask_file=None, dtype=None)¶ Converts single OME-TIFF file to a folder compatible with HistoCAT software.
-
omefile_to_tifffolder
(filepath, output_folder, basename=None, dtype=None)¶ Saves planes of single OME-TIFF file to a folder containing standard TIFF (ImageJ-compatible) files.
-
omefolder_to_histocatfolder
(input_folder, output_folder, mask_folder=None, mask_suffix='_mask.tiff', dtype=None)¶ Converts all OME-TIFF files in input folder to a folder compatible with HistoCAT software.