This release brings a lot of additions, not all changes and functions are explained in depth below. For detailed information, please refer to the updated API documentation.
imcflibs.imagej.misc.send_notification_emailto send email notifications upon completion of long-running scripts.- Sends a mail with job details, such as recipient, file name, execution time & an optional message.
- To enable email notifications, the following preferences must be set in
~/.imagej/IJ_Prefs.txt:.imcf.sender_email: sender's email address..imcf.smtpserver: the SMTP server used for sending emails.
- If the sender email or SMTP server is not configured, the method logs a message and returns.
imcflibs.imagej.misc.sanitize_image_titleto remove special chars and various suffixes from an ImagePlus' window title.imcflibs.imagej.misc.subtract_imagesto subtract an image from another.imcflibs.imagej.misc.close_imagesfor closing all ImagePluses from a list.imcflibs.imagej.misc.get_threshold_value_from_methodto get the value that a selected AutoThreshold method would be using.imcflibs.imagej.misc.write_ordereddict_to_csvto write data from an ordered dictionary (or list of ordered dictionaries) to a CSV file.imcflibs.imagej.misc.save_image_in_formatto save an ImagePlus in a specified format, such asImageJ-TIForOME-TIFFetc.imcflibs.imagej.misc.run_imarisconvertto convert a given file to Imaris format using the utility ImarisConvert. The function usesimcflibs.imagej.misc.locate_latest_imaristo find the path to the most recent Imaris installation.
imcflibs.imagej.labelimage.cookie_cut_labelsto use a label image as a mask for another label image. Objects might get split or merged depending on the mask.imcflibs.imagej.labelimage.binary_to_labelfor segmenting a binary image to get a label image (2D/3D).imcflibs.imagej.labelimage.relate_label_imagesto relate two label images (2D/3D) using the 3D Association plugin from the 3DImageJSuite.imcflibs.imagej.labelimage.dilate_labels_2dto dilate a label image slice by slice. Works for 2D or 3D images.
imcflibs.imagej.objects3d.population3d_to_imgplusto turn an Objects3DPopulation into an ImagePlus (2D/3D).imcflibs.imagej.objects3d.imgplus_to_population3dto get the Objects3DPopulation from an ImagePlus (2D/3D).imcflibs.imagej.objects3d.segment_3d_imageto threshold an image into a labeled stack.imcflibs.imagej.objects3d.get_objects_within_intensityto filter a population of 3D objects by intensity.imcflibs.imagej.objects3d.maxima_finder_3dto find local maxima in a 3D image.imcflibs.imagej.objects3d.seeded_watershedto perform a seeded watershed segmentation on a binary image using seeds points.
Providing BigDataViewer related functionality.
- Option configuration classes:
imcflibs.imagej.bdv.ProcessingOptionsto configure the options on how the dataset should be processedimcflibs.imagej.bdv.DefinitionOptionsto hold the options on how a dataset is defined.
imcflibs.imagej.bdv.check_processing_inputto sanitize and clarify theacittinput selection.imcflibs.imagej.bdv.get_processing_settingsto generate the strings needed for the processing.imcflibs.imagej.bdv.backup_xml_filesto create a backup of BDV-XML files.imcflibs.imagej.bdv.define_dataset_autoto run "Define Multi-View Dataset" using the "Auto-Loader" option.imcflibs.imagej.bdv.define_dataset_manualto run "Define Multi-View Dataset" using the "Manual Loader" option.imcflibs.imagej.bdv.resave_as_h5to resave the dataset in H5 to make it compatible with BigDataViewer/BigStitcher.imcflibs.imagej.bdv.flip_axesto call BigStitcher's "Flip Axes" command.imcflibs.imagej.bdv.phase_correlation_pairwise_shifts_calculationto calculate pairwise shifts using Phase Correlation.imcflibs.imagej.bdv.filter_pairwise_shiftsfor filtering pairwise shifts based on different thresholds.imcflibs.imagej.bdv.optimize_and_apply_shiftsto optimize shifts and apply them to a dataset.imcflibs.imagej.bdv.detect_interest_pointsfor running the "Detect Interest Points" command for registration.imcflibs.imagej.bdv.interest_points_registrationto run the "Register Dataset based on Interest Points" command.imcflibs.imagej.bdv.duplicate_transformationsfor duplicating / propagating transformation parameters to other channels.imcflibs.imagej.bdv.fuse_datasetto call BigStitcher's "Fuse Multi-View Dataset" command.
Providing helper functions to interface with Trackmate.
- Multiple functions to set up Trackmate settings with different detectors:
imcflibs.imagej.trackmate.cellpose_detectorimcflibs.imagej.trackmate.stardist_detectorimcflibs.imagej.trackmate.log_detector
imcflibs.imagej.trackmate.spot_filteringto create settings to filter detected spots based on optional thresholds for quality, area, circularity & intensity.imcflibs.imagej.trackmate.sparse_lap_trackerto create default settings for the sparse LAP tracker.imcflibs.imagej.trackmate.track_filteringto create settings to filter detected tracks based upon optional distances, such asmaximum linking,gap closing,track splitting & mergingandmaximum frame gap.imcflibs.imagej.trackmate.run_trackmateto run Trackmate with given settings (which can be set up with the methods in theimcflibs.imagej.trackmatesubmodule) to create a label image.
Providing helper functions to connect to OMERO using user credentials, fetch and upload images, retrieve datasets or save ROIs to OMERO.
imcflibs.imagej.omerotools.parse_urlto parse the OMERO URL and get a list ofImageWrappersfrom multiple image or datasets IDs.imcflibs.imagej.omerotools.connectto connect to OMERO using user credentials.imcflibs.imagej.omerotools.fetch_imageto fetch an image from OMERO using the image ID.imcflibs.imagej.omerotools.upload_image_to_omeroto upload a local image to OMERO and returning the new image ID.imcflibs.imagej.omerotools.add_keyvalue_annotationto add an annotation to an OMERO object.imcflibs.imagej.omerotools.delete_keyvalue_annotationsto delete key/value annotations from an OMERO object.imcflibs.imagej.omerotools.find_datasetto find a dataset in OMERO using the dataset ID.imcflibs.imagej.omerotools.get_acquisition_metadatato get the acquisition metadata from an image in OMERO.imcflibs.imagej.omerotools.get_info_from_original_metadatato get the original metadata from an image in OMERO.imcflibs.imagej.omerotools.create_table_columnsto create OMERO table headings from a list of column names.imcflibs.imagej.omerotools.upload_array_as_omero_tableto upload a table to OMERO.imcflibs.imagej.omerotools.save_rois_to_omeroto save ROIs to OMERO.
imcflibs.imagej.shading.simple_flatfield_correctionto perform a simple flatfield correction to an ImagePlus.
Utilities for filtering and thresholding.
imcflibs.imagej.processing.apply_filterto apply a filter to an ImagePlus.imcflibs.imagej.processing.apply_rollingball_bg_subtractionto apply a rolling ball background subtraction to an ImagePlus.imcflibs.imagej.processing.apply_thresholdto apply a threshold method to an ImagePlus.
imcflibs.imagej.bioformats.exportto export an image to a given file.imcflibs.imagej.bioformats.get_metadata_from_fileto extract various metadata from a given file using BioFormats.imcflibs.imagej.bioformats.get_stage_coordsto get stage coordinates and calibration for one or more given images.
imcflibs.strtools.pad_numberto pad a number with leading zeros.imcflibs.pathtools.create_directoryto create a new directory at the specified path if it does not exist (needed for Python 2.7).imcflibs.imagej.prefs.set_default_ij_optionsto configure ImageJ default options to ensure consistent behavior.imcflibs.imagej.projections.project_stackto project a stack along a defined axis using one of the available projection methods, such asmax,min,mean,sumorstandard_deviation.
imcflibs.pathtools.listdir_matchingnow has an additional optional boolean parameterregexto request the parametersuffixbeing interpreted as a regular expression for filtering.imcflibs.imagej.misc.calculate_mean_and_stdvnow has an optional parameterround_decimalsto allow for rounding the results, defaulting to0.
imcflibs.strtools.sort_alphanumericallyto sort a list of strings taking into account numerical values correctly.
imcflibs.pathtools.listdir_matchingis now using the newsort_alphanumerically()function from above.
- New functions in
imcflibs.pathtools:imcflibs.pathtools.join2can be used to join paths, much likeos.path.joinexcept that it will work withjava.io.Fileobjects as well (but doesn't support more than two path components / parameters).imcflibs.pathtools.find_dirs_containing_filetypeimcflibs.pathtools.folder_size
- New functions in
imcflibs.imagej.misc:imcflibs.imagej.misc.calculate_mean_and_stdvimcflibs.imagej.misc.elapsed_time_sinceimcflibs.imagej.misc.find_focusimcflibs.imagej.misc.get_free_memoryimcflibs.imagej.misc.percentageimcflibs.imagej.misc.progressbarimcflibs.imagej.misc.setup_clean_ij_environmentimcflibs.imagej.misc.timed_log
- New
imcflibs.imagej.labelimagesubmodule, providing:imcflibs.imagej.labelimage.filter_objectsimcflibs.imagej.labelimage.label_image_to_roi_listimcflibs.imagej.labelimage.measure_objects_size_shape_2dimcflibs.imagej.labelimage.relate_label_images
- New
imcflibs.imagej.gpusubmodule, providing:imcflibs.imagej.gpu.erode_labelsimcflibs.imagej.gpu.dilate_labelsimcflibs.imagej.gpu.merge_labels
- New
imcflibs.imagej.resultstablesubmodule, providing:imcflibs.imagej.resultstable.add_results_to_resultstableimcflibs.imagej.resultstable.get_resultstableimcflibs.imagej.resultstable.preset_results_column
- New
imcflibs.imagej.roimanagersubmodule, providing:imcflibs.imagej.roimanager.add_rois_to_roimanagerimcflibs.imagej.roimanager.change_roi_colorimcflibs.imagej.roimanager.clear_ij_roi_managerimcflibs.imagej.roimanager.count_all_roisimcflibs.imagej.roimanager.enlarge_all_roisimcflibs.imagej.roimanager.extract_color_of_all_roisimcflibs.imagej.roimanager.get_roimanagerimcflibs.imagej.roimanager.load_rois_from_zipimcflibs.imagej.roimanager.measure_in_all_roisimcflibs.imagej.roimanager.rename_rois_by_numberimcflibs.imagej.roimanager.rename_roisimcflibs.imagej.roimanager.save_rois_to_zipimcflibs.imagej.roimanager.scale_all_roisimcflibs.imagej.roimanager.select_rois_above_min_intensityimcflibs.imagej.roimanager.shift_roi_by_bounding_boximcflibs.imagej.roimanager.show_all_rois_on_image
- The functions below now also accept parameters of type
java.io.File(instead ofstr), making them safe for being used directly with variables retrieved via ImageJ2's Script Parameter@# File:imcflibs.pathtools.parse_pathimcflibs.strtools.filename
- Several changes in
imcflibs.pathtools.parse_path:- The returned dict now contains an additional key
basenamethat provides the filename without extension. - OME-TIFF filenames are now treated as special cases in the sense that the
.omepart is stripped from thebasenamekey and added to theextkey instead (as it is part of the suffix).
- The returned dict now contains an additional key
imcflibs.pathtools.listdir_matchingnow has an additional optional argumentsort(defaulting toFalse) to request the resulting list to be sorted.- Many improvements / clarifications in function docstrings.