Data Loading and Saving — 3D Slicer documentation (2024)

There are two major types of data that can be loaded to Slicer: DICOM and non-DICOM.

DICOM data

DICOM is a widely used and sophisticated set of standards for digital radiology.

Data can be loaded from DICOM files into the scene in two steps:

  1. Import: add files into the application’s DICOM database, by switching to DICOM module and drag-and-dropping files to the application window

  2. Load: get data objects into the scene, by double-clicking on items in the DICOM browser. The DICOM browser is accessible from the toolbar using the DICOM button Data Loading and Saving — 3D Slicer documentation (1).

Data in the scene can be saved to DICOM files in two steps:

  1. Export to database: save data from the scene into the application’s DICOM database

  2. Export to file system: copy DICOM files from the database to a chosen folder in the file system

More details are provided in the DICOM module documentation.

Non-DICOM data

Non-DICOM data, covering all types of data ranging from images (nrrd, nii.gz, …) and models (stl, ply, obj, …) to tables (csv, txt), point lists (json), etc.

Load data

To load data:

  • drag&drop file on the application window, or

  • in application menu: File -> Add Data (or Add Data toolbar button) Data Loading and Saving — 3D Slicer documentation (2)

Data Loading and Saving — 3D Slicer documentation (3)

Save data

To save the entire scene (all data, visualization and processing settings, etc.):

  • in application menu File -> Save Data, or

  • Save Data toolbar button Data Loading and Saving — 3D Slicer documentation (4)

Tip

The entire workspace, including all data and settings can be saved into a single, independent, self-contained .mrb file by clicking on the small package icon at the top-left corner. A new copy of all files is written and zipped into a single file, therefore saving takes longer time than an incremental saving of only the modified files.

Data Loading and Saving — 3D Slicer documentation (5)

Export data

To export selected data sets - for sharing with others or for loading into other applications: go to Data module, right-click on an item, and choose Export to file.... Settings used for exporting (file format, filename, options) do not modify settings used for saving.

Data Loading and Saving — 3D Slicer documentation (6)

Tip

Multiple nodes can be exported at once by placing them into a folder and then by exporting the folder. When exporting an entire folder hierarchy the Export folder structure option can be enabled to have the directory structure in the output directory match the subject hierarchy folder structure.

Supported Data Formats

Note

On use of LPS/RAS coordinate systems

DICOM and medical imaging software use the LPS (Left, Posterior, Superior)coordinate system, while Slicer’s internal representation employs RAS(Right, Anterior, Superior). For file compatibility, Slicer assumes data infiles are in LPS coordinates and may flip the first two axes during read orwrite operations.

To learn more, see the Coordinate systemsdocumentation, and the Coordinate system convention in Slicer.

Images

Readers may support 2D, 3D, and 4D images of various types, such as scalar, vector, DWI or DTI, containing images, dose maps, displacement fields, etc.

  • DICOM (.dcm, or any other): Slicer core supports reading and writing of some data types, while extensions add support for additional ones. Coordinate system: LPS (as defined by DICOM standard).

    • Supported DICOM information objects:

    • Notes:

      • For a number of dMRI formats we recommend use of the DICOM to NRRD converter before loading the data into Slicer.

      • Image volumes, RT structure sets, dose volumes, etc. can be exported using DICOM module’s export feature.

      • Limited support for writing image volumes in DICOM format is provided by the Create DICOM Series module.

      • Support of writing DICOM Segmentation Objects is provided by the Reporting extension

  • NRRD (.nrrd, .nhdr): General-purpose 2D/3D/4D file format. Coordinate system: as defined in the file header (usually LPS).

    • NRRD sequence (.seq.nrrd): 4D volume

    • To load an image file as segmentation (also known as label image, mask, region of interest) see Segmentations module documentation

  • MetaImage (.mha, .mhd): Coordinate system: LPS (AnatomicalOrientation in the file header is ignored).

  • VTK (.vtk): Coordinate system: LPS. Important limitation: image axis directions cannot be stored in this file format.

  • Analyze (.hdr, .img, .img.gz): Image orientation is specified ambiguously in this format, therefore its use is strongle discouraged. For brain imaging, use Nifti format instead.

  • Nifti (.nii, .nii.gz): File format for brain MRI. Not well suited as a general-purpose 3D image file format (use NRRD format instead).

    • To load an image file as segmentation (also known as label image, mask, region of interest) see Segmentations module documentation

  • Tagged image file format (.tif, .tiff): can read/write single/series of frames

  • PNG (.png): can read single/series of frames, can write a single frame

  • JPEG (.jpg, .jpeg): can read single/series of frames, can write a single frame

  • Windows bitmap (.bmp): can read single/series of frames

  • BioRad (.pic)

  • Brains2 (.mask)

  • GIPL (.gipl, .gipl.gz)

  • LSM (.lsm)

  • Scanco (.isq)

  • Stimulate (.spr)

  • MGH-NMR (.mgz)

  • MRC Electron Density (.mrc)

  • SlicerRT extension

    • Vista cone beam optical scanner volume (.vff)

    • DOSXYZnrc 3D dose (.3ddose)

  • SlicerHeart extension: 2D/3D/4D ultrasound (GE, Philips, Eigen Artemis, and other; reading only)

    • Philips 4D ultrasound: from Cartesian DICOM exported from QLab

    • GE Kretz 3D ultrasound (.vol, .v01)

    • Eigen Artemis 3D ultrasound

    • Any 3D/4D ultrasound image and ECG signal: if the user obtains Image3dAPI plugin from the vendor (GE Voluson, Philips, Siemens, etc.)

  • RawImageGuess extension

    • RAW volume (.raw): requires manual setting of header parameters

    • Samsung 3D ultrasound (.mvl): requires manual setting of header parameters

  • SlicerIGSIO extension:

    • Compressed video (.mkv, .webm)

    • IGSIO sequence metafile (.igs.mha, .igs.mhd, .igs.nrrd, .seq.mha, .seq.mhd, .mha, .mhd, .mkv, .webm): image sequence with metadata, for example for storing surgical navigation and position-tracked ultrasound data

  • OpenIGTLink extension:

    • PLUS toolkit configuration file (.plus.xml): configuration file for real-time data acquisition from imaging and tracking devices and various sensors

  • Sandbox extension:

    • Topcon OCT image file (.fda, reading only)

Models

Surface or volumetric meshes.

  • VTK Polygonal Data (.vtk, .vtp): Default coordinate system: LPS. Coordinate system (LPS/RAS) can be specified in header. Full color (RGB or RGBA) meshes can be read and written (color must be assigned as point scalar data of unsigned char type and 3 or 4 components). Texture image can be applied using “Texture model” module (in SlicerIGT extension).

  • VTK Unstructured Grid Data (.vtk, .vtu): Volumetric mesh. Default coordinate system: LPS. Coordinate system (LPS/RAS) can be specified in header.

  • STereoLithography (.stl): Format most commonly used for 3D printing. Default coordinate system: LPS. Coordinate system (LPS/RAS) can be specified in header.

  • Wavefront OBJ (.obj): Default coordinate system: LPS. Coordinate system (LPS/RAS) can be specified in header. Texture image can be applied using “Texture model” module (in SlicerIGT extension). The non-standard technique of saving vertex color as additional values after coordinates is not supported - if vertex coloring is needed then convert to PLY, VTK, or VTP format using another software.

  • Stanford Triangle Format (.ply): Default coordinate system: LPS. Coordinate system (LPS/RAS) can be specified in header. Full color (RGB or RGBA) meshes can be read and written (color must be assigned to vertex data in uchar type properties named red, green, blue, and optional alpha). Texture image can be applied using “Texture model” module (in SlicerIGT extension).

  • BYU (.byu, .g; reading only): Coordinate system: LPS.

  • UCD (.ucd; reading only): Coordinate system: LPS.

  • ITK meta (.meta; reading only): Coordinate system: LPS.

  • FreeSurfer extension:

    • Freesurfer surfaces (.orig, .inflated, .sphere, .white, .smoothwm, .pial; reading only)

  • SlicerHeart extension:

    • CARTO surface model (.vtk; writing only): special .vtk polydata file format variant, which contains patient name and ID to allow import into CARTO cardiac electrophysiology mapping systems

Segmentations

  • Segmentation labelmap representation (.seg.nrrd, .nrrd, .seg.nhdr, .nhdr, .nii, .nii.gz, .hdr): 3D volume (4D volume if there are overlapping segments) with custom fields specifying segment names, terminology, colors, etc.

  • Segmentation closed surface representation (.vtm): saved as VTK multiblock data set, contains custom fields specifying segment names, terminology, colors, etc.

  • Labelmap volume (.nrrd, .nhdr, .nii, .nii.gz, .hdr): segment names can be defined by using a color table. To write segmentation in NIFTI formats, use Export to file feature or export the segmentation node to labelmap volume.

  • Closed surface (.stl, .obj): Single segment can be read from each file. Segmentation module’s Export to files feature can be used to export directly to these formats.

  • SlicerOpenAnatomy extension:

    • GL Transmission Format (.glTF, writing only)

  • Sandbox extension:

    • Osirix ROI file (.json, reading only)

    • sliceOmatic tag file (.tag, reading only)

Transforms

  • ITK HDF transform (.h5): For linear, b-spline, grid (displacement field), thin-plate spline, and composite transforms. Coordinate system: LPS.

  • ITK TXT transform (.tfm, .txt): For linear, b-spline, and thin-plate spline, and composite transforms. Coordinate system: LPS.

  • Matlab MAT file (.mat): For linear and b-spline transforms. Coordinate system: LPS.

  • Displacement field (.nrrd, .nhdr, .mha, .mhd, .nii, .nii.gz): For storing grid transform as a vector image, each voxel containing displacement vector. Coordinate system: LPS.

  • SlicerRT extension

    • Pinnacle DVF (.dvf)

Markups

  • Markups JSON (.mkp.json): point list, line, curve, closed curve, plane, etc. Default coordinate system: LPS. Coordinate system (LPS/RAS) can be specified in image header. JSON schema is available here.

  • Markups CSV (.fcsv): legacy file format for storing point list. Default coordinate system: LPS. Coordinate system (LPS/RAS) can be specified in image header.

  • Annotation CSV (.acsv): legacy file format for storing markups line, ROI.

Scenes

  • MRML (Medical Reality Markup Language File) (.mrml): MRML file is a xml-formatted text file with scene metadata and pointers to externally stored data files. See MRML overview. Coordinate system: RAS.

  • MRB (Medical Reality Bundle) (.mrb, .zip): MRB is a binary format encapsulating all scene data (bulk data and metadata). Internally it uses zip format. Any .zip file that contains a self-contained data tree including a .mrml file can be opened. Coordinate system: RAS. Note: only .mrb file extension can be chosen for writing, but after that the file can be manually renamed to .zip if you need access to internal data.

  • Data collections in XNAT Catalog format (.xcat; reading only)

  • Data collections in XNAT Archive format (.xar; reading only)

Other

  • Text (.txt, .xml., json)

  • Table (.csv, .tsv)

  • Color tables:

    • Slicer color table (.ctbl, .txt)

    • ITK-Snap label description file (.txt, .label) (reading only) This can be used for loading segmentations that were created in ITK-Snap. The color table must be loaded in the scene first. Then, when the label image file is loaded then in Add Data window select Segmentation in the Description column and select the loaded color table in the Color node column.

  • Volume rendering properties (.vp)

  • Volume rendering shader properties (.sp)

  • Terminology (.term.json, .json): dictionary of standard DICOM or other terms

  • Node sequence (.seq.mrb): sequence of any MRML node (for storage of 4D data)

What if your data is not supported?

If any of the above listed file formats cannot be loaded then report the issue on the Slicer forum.

If you have a file of binary data and you know the data is uncompressed and you know the way it is laid out in memory, then one way to load it in Slicer is to create a .nhdr file that points to the binary file. RawImageGuess extension can be used to explore an unknown data set, determining unknown loading parameters, and generate header file.

You can also ask about support for a particular file format on the Slicer forum. There may be extensions or scripts that can read or write additional formats (any Python package can be installed and used for data import/export).

Data Loading and Saving — 3D Slicer  documentation (2024)

FAQs

How do you save data on a 3D Slicer? ›

Data in the scene can be saved to DICOM files in two steps:
  1. Export to database: save data from the scene into the application's DICOM database.
  2. Export to file system: copy DICOM files from the database to a chosen folder in the file system.

How do you save a segmentation on a 3D Slicer? ›

To force saving segmentation as a 3D volume, export it to a labelmap volume by right-clicking on the segmentation in Data module. For advanced export options, Segmentations module's Export/import models and labelmaps section can be used.

How do I load a 3D Slicer in Dicom? ›

DICOM loading
  1. Go to DICOM module. ...
  2. Double-click on the patient, study, or series to load.
  3. Click “Show DICOM database” button to toggle between the database browser (to load more data) and the viewer (to see what is loaded into the scene already)

What file format is a 3D Slicer? ›

Commonly used communication formats to upload to slicer software are STL, OBJ, and VRML.

How is 3D model data stored? ›

3D models can be saved in different file formats, depending on the software you use and the purpose of the model. Some common formats are STL, OBJ, 3MF, and GCODE. Each format has its advantages and disadvantages, such as size, quality, compatibility, and features.

How is 3D data stored? ›

Surface data represents height values over an area, and the 3D information for each location within that area can be either stored as cell values or deduced from a triangulated network of 3D faces.

What is ROI in 3D slicer? ›

Input ROI: The region of interest driving the cropping process. ROIs have a box-like shape in which the interior of the box is the region to preserve and the exterior is the region to exclude.

What is the file format for segmentation? ›

Segmentation is stored in a standard VTK multiblock data set file format. Multiblock data set consists of an index (. vtm) file that stores the file path of each block. Each block file is a VTK polydata (.

What is segmentation in 3D slicer? ›

Basic concepts. Segmentation of images (also known as contouring or annotation) is a procedure to delinate regions in the image, typically corresponding to anatomical structures, lesions, and various other object space.

How do you reference a 3D Slicer? ›

To acknowledge 3D Slicer as a platform, please cite the Slicer web site (http://www.slicer.org) and the following publication: Fedorov A., Beichel R., Kalpathy-Cramer J., Finet J., Fillion-Robin J-C., Pujol S., Bauer C., Jennings D., Fennessy F., Sonka M., Buatti J., Aylward S.R., Miller J.V., Pieper S., Kikinis R.

What are the system requirements for 3D Slicer? ›

Recommended hardware configuration
  • Memory: more than 4GB (8 or more is recommended). ...
  • Display: a minimum resolution of 1024 by 768 (1280 by 1024 or better is recommended).
  • Graphics: Dedicated graphics hardware (discrete GPU) memory is recommended for fast volume rendering.

How do I load a module in slicer? ›

Run Slicer with your custom modules

Option A (recommended): Drag-and-drop the . py files (or the parent folder, or that folder's parent) to the application window, select Add Python scripted modules to the application in the popup window, click OK. Select which modules to add to load immediately and click Yes .

What files does slicer support? ›

Supported Data Formats
  • Slicer core: CT, MRI, PET, X-ray, some ultrasound images; secondary capture with Slicer scene (MRB) in private tag.
  • Quantitative Reporting extension: DICOM Segmentation objects, Structured reports.
  • SlicerRT extension: DICOM RT Structure Set, RT Dose, RT Plan, RT Image.

What is an STL slicer? ›

3D slicer software is used in the conversion of CAD models in . STL file formats or any other file formats such as . 3DF and . OBJ to a set of commands that the printer can understand. Most 3D printers come with their own 3D printing slicer software.

How do you save a 3D design? ›

To save your current project as a template, click the menu button and choose Export > Save as Template. Once you have saved a custom template, the program doesn't retain the link between the open project and the template. To update the template after modification, select it in the Save as Template dialog to overwrite.

How do I save a Cura file? ›

Save to disk

This will create a . 3mf file on your computer in the folder that you specify. Tip: Use the shortcut keys Ctrl+S on Windows or ⌘+S on Mac to quickly save your project. Cura will show you an overview of the project file, including information about the printer, extruder(s), and profile.

How do I save a 3D object as STL? ›

To Export 3D Solids to an STL File
  1. Click Application menu Export Other Formats. Find.
  2. In the Export Data dialog box, enter a file name.
  3. Under Files of type, select Lithography (*. stl). ...
  4. Select one or more solid objects. All objects must be entirely within the positive XYZ octant of the world coordinate system (WCS).

Top Articles
Latest Posts
Article information

Author: Rueben Jacobs

Last Updated:

Views: 5982

Rating: 4.7 / 5 (57 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Rueben Jacobs

Birthday: 1999-03-14

Address: 951 Caterina Walk, Schambergerside, CA 67667-0896

Phone: +6881806848632

Job: Internal Education Planner

Hobby: Candle making, Cabaret, Poi, Gambling, Rock climbing, Wood carving, Computer programming

Introduction: My name is Rueben Jacobs, I am a cooperative, beautiful, kind, comfortable, glamorous, open, magnificent person who loves writing and wants to share my knowledge and understanding with you.