Skip to main content
Version: Next

Working with Layer Data

Layer Data (ROIs, Annotations, Labels and Heatmaps) of the active image can be saved to a file and imported to other images, or processed in other programs.

Alternatively, the Regions Of Interest (ROIs) can be extracted separately to an .xml

Export Layer Data

  1. Click on or on .

  2. Navigate to and select the image with the layer data to export.

  3. Click File | Export | Layer Data to start the export process.

  4. Browse to the location where the file should be saved and give it an appropriate name. Select the export type and click Save to export the layer data in the selected format.

Use separate file formats for export depending on the layer data. .mld exports all layer data, while .xml files extract only the ROI data etc.
Use separate file formats for export depending on the layer data. .mld exports all layer data, while .xml files extract only the ROI data etc.

Supported Export Formats

The following file formats are available for export in Visiopharm:

File TypeDescriptionExtension
Visiopharm Layer DataContains data layers created in Visiopharm for analysis or visualization..mld
GeoJSON formatExport labels in geojson format compatible with Xenium Eplorer software..geojson
Nanostring OME-XML AnnotationsExported annotations in XML format compatible with Nanostring OME analysis workflows..ome.xml
TIFF imageHigh-resolution image format commonly used in microscopy and imaging software..tif .tiff
Remapped TIFF imageUsed to save overlays in the reference frame of a linked Tissuealign image. It will create the same output as TIFF in a single image..tif .tiff
Leica Laser Microdissection LMDExported ROI annotations in XML format compatible with Leica LMD software..xml
Visiopharm ROI Annotations XMLRegion of interest annotations exported as XML files for integration with other systems..xml
Label CropsUsed for import of whole slide 32-bit TIFFs with segmentation or annotation data, and convert the objects into Visiopharm Labels. Used when the TIFF image comes with 32-bit integer values (intensity levels) with uniquely IDed objects.​​ All objects in the imported TIFF file will be converted to overlay Labels of type 1, and objects are split with NN4 connectivity. 0 intensity will give no Label..tif .tiff

GeoJSON for 10X Genomics Xenium Export

Labels created in the Visiopharm software can be exported in the .geojson format for further analysis in Xenium Explorer. Please see https://www.10xgenomics.com/support/software/xenium-ranger/latest/analysis/running-pipelines/XR-import-segmentation for more details.

note

Only label objects are exported and non-solid labels (that is, those with any holes) will be excluded upon import. For each label object, an Object ID is written both to the GeoJSON file and the "Object Info" output variable which allows correlation of the Visiopharm and Xenium objects after import.

Remapped TIFF image Export

The Remapped TIFF image format is used to save overlays in the reference frame of a linked Tissuealign image. It will create the same output as TIF in a single image. Tissuealign workflows are detailed in the section Tissuealign. One usage is exemplified in the following analysis where a slide is scanned over two points in time, and each scan is slightly misaligned due to being moved in and out of the scanner. The analysis has been made on a reference slide denoted Section 1, resulting in an ROI around the tissue. If this is exported as layer data in a standard TIFF image format. When importing the layer data from Section 1 onto a later scan of the same slide, denoted Section 2, the layer data is misaligned due to the misalignment between the Section 1 and Section 2 scans.

Old Poly

Section 1 with a ROI around the tissue exported as layer data in TIFF format.

New Poly

Section 2 with the misaligned layer data from the Section 1 slide.

In such cases one would go through a Tissuealign workflow, or potentially merely auto align the Section 1 and Section 2 scans, to align the layer data and continue with the analysis on the Section 2 scan.

Section 1 and Section 2 scans after tissue alignment but before saving the layer data.
Section 1 and Section 2 scans after tissue alignment but before saving the layer data.

Once the analysis on the aligned Section 2 scan is finalised, and the resulting ROIs, Labels, Heatmaps etc. needs to be exported as layer data, they need to be exported in the Remapped TIFF image Format in order to be aligned with the Section 2 slide. When selecting the Remapped TIFF format after tissue alignment you will be asked which slide the layer data should be aligned to. Here, Section 2 is picked, to remap the ROI layer data from being aligned with Section 1 to Section 2.

Old Poly

When selecting remapped you will be asked to pick which image to remap on to.

New Poly

The resulting layer data aligned with the section 2 scan.

note

Be aware that using the Remapped TIFF format might cause merging issues.

Leica Laser Microdisector (LMD) XML Export

To export Visiopharm ROIs in Leica LMD XML format, ensure you have at least three calibration points. These can be specified by using Visiopharm Text Annotations placed in three well-distributed and easily recognizable image locations. Have the text for the calibration spots being Calibration 1, Calibration 2, ..., as shown in the example image below.

Example of the three calibration points in the image.
Example of the three calibration points in the image.

The export will save all non-clear ROI objects on the overlay after performing a morphological closing, followed by a simplification using one-fifth of the closing diameter. The default closing diameter is 50 μm. This can be adjusted in Registry Editor under Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Visiopharm\VPSDK as shown below.

Registry Editor showing the closing diameter setting.
Registry Editor showing the closing diameter setting.

To see which object was written to the LMD xml pass the LMD objects back as annotations to the Visiopharm overlay by enabling the option Pass Back LMD Objects in Registry Editor under Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Visiopharm\VPSDK.

Registry Editor showing the Pass Back LMD Objects setting.
Registry Editor showing the Pass Back LMD Objects setting.

Import of whole slide 32-bit integer value TIFFs

It is possible to import whole slide 32-bit TIFFs with segmentation or annotation data, and convert the objects into Visiopharm Labels, using the Label Crop format. This is neccesary when the TIFF image comes with 32-bit integer values (intensity levels) with uniquely IDed objects. When importing using the Label Crop format,​​ all objects in the imported TIFF file will be converted to overlay Labels of type 1, and objects are split with NN4 (Nearest neighbour) connectivity. 0 intensity will give no Label.

Example of 32 bit image with intensity values
Example of 32 bit image with intensity values
The resulting import where all objects with intensity values different from 0 will be converted to label 1, and objects are split with the NN4 connectivity.
The resulting import where all objects with intensity values different from 0 will be converted to label 1, and objects are split with the NN4 connectivity.

Batch Import Layer Data

  1. Click on .

  2. Navigate to the folder to import the layer data to.

  3. Click on and select Layer data to current folder.

  4. Browse the folder containing the layer data and press Select folder.

  5. Select Import folder in the newly opened window.

The following window will appear if the data has been successfully imported.
The following window will appear if the data has been successfully imported.
The following window will appear if the data has not been successfully imported.
The following window will appear if the data has not been successfully imported.
note

The layer data files must have a file name matching the file name of the image in the study they should be imported to. This ensures that the files will be imported and attached to the appropriate images.