Surface3D: How to Import Third Party Files: Difference between revisions

From Software Product Documentation
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(25 intermediate revisions by the same user not shown)
Line 1: Line 1:
There are many third-party software packages for segmenting 3D image data (segmentation) and creating surface models (3D reconstruction), including Mimics, ScanIP, and 3D Slicer. These programs provide sophisticated segmentation functions as well as tools for decimating and smoothing the polyhedral surface models. Additionally, there are open-source programs with powerful tools for manipulating surface models, such as MeshLab and Blender. Our goal with Surface3D is not to replace these programs, which are robust, well-maintained, and widely used. It is to provide a solution to users who do not currently use these other prorgams and whose segmentation and surface smoothing needs are relatively simple. The primary benefit of Surface3D is that it is integrated into the DSX Suite so that updating the subject file and handling reference frames and file formats consistently is automatic.
There are many third-party software packages for segmenting 3D image data (segmentation) and creating surface models (3D reconstruction), including Mimics, ScanIP, and 3D Slicer. These programs provide sophisticated segmentation functions as well as tools for decimating and smoothing the polyhedral surface models. Additionally, there are open-source programs with powerful tools for manipulating surface models, such as MeshLab and Blender. Our goal with Surface3D is not to replace these programs, which are robust, well-maintained, and widely used. It is to provide a solution to users who do not currently use these other prorgams and whose segmentation and surface smoothing needs are relatively simple. The primary benefit of Surface3D is that it is integrated into the DSX Suite so that updating the subject file and handling reference frames and file formats consistently is automatic.
Nevertheless, if you already use one or more of these third-party programs for segmentation or 3D reconstruction, we encourage you to continue using them. This guideline is designed to help you integrate the outputs of those programs into DSX Suite. Before continuing, please familiarize yourself with the DSX terminology for [[DSX:_Image_and_Surface_Files|Image and Surface Files]].
Nevertheless, if you already use one or more of these third-party programs for segmentation or 3D reconstruction, we encourage you to continue using them. This guideline is designed to help you integrate the outputs of those programs into DSX Suite. Before continuing, please familiarize yourself with the DSX terminology for [[DSX:_Image_and_Surface_Files|'''Image and Surface Files''']].


There are two primary methods of integrating data from these third-party programs into DSX Suite. The best one for you depends on your data set and your level of expertise with the other programs. For ease of description this guide will assume you are using Mimics and MeshLab, but any of the other programs could be substituted for those.
There are two primary methods of integrating data from these third-party programs into DSX Suite. The best one for you depends on your data set and your level of expertise with the other programs. For ease of description this guide will assume you are using Mimics and MeshLab, but any of the other programs could be substituted for those.
Line 6: Line 6:
'''Method 1: Segmentation is performed in Mimics. 3D reconstruction is performed in Surface3D.'''
'''Method 1: Segmentation is performed in Mimics. 3D reconstruction is performed in Surface3D.'''


In this case you must export the Image File for each object from Mimics. The Image File is the 3D image data where all voxels representing the object of interest have their original intensities (Hounsfield units for CT) and all other voxels are set to zero. This file is usually cropped to the minimum axis-aligned bounding box of the object, but cropping is optional. The RAW format is preferred for this file, but TIFF ia also acceptable.
In this case you must export from Mimics a DICOM stack for each object. In each DICOM stack, all voxels representing the object of interest have their original intensities (Hounsfield units for CT) and all other voxels are set to zero. The steps for processing an object with this method are:
The steps for processing each object with this method are:
# Mimics: Select ''New Mask'' from the ''Segment'' toolbar.
# In Mimics, segment the object in the DICOM images. Save the segmentation as a mask file in the TIFF format. This is an image file with the same dimensions as the DICOM stack, and with voxel values of 1 for the object of interest and 0 everywhere else. In DSX Suite this is called a ''label file'' because it labels all of the voxels representing the object.
# Mimics: Select the entire threshold region.
# In xManager, load the subject and add the DICOM files as a Scan Data item for the session. The individual object definitions should not have any image or surface files specified for them.
# Mimics: Rename the mask to ''All''.
# In Surface3D, load the subject, select the object, and choose the DICOM scan data.
# Mimics: Create a mask covering the object of interest, using the various segmentation tools available.
# Surface3D: File -> Load Label, selecting the TIFF label file for that object.
# Mimics: Select ''Boolean Operations'' from the ''Segment'' toolbar. Set ''Mask A'' to the ''All'' mask, the ''Operation'' to ''Minus'', ''Mask B'' to the object mask, and ''Result'' to a new mask.
# Surface3D: Image -> Mask Labeled Image Data
# Mimics: Rename the new mask to something appropriate for the object being segmented. Select ''Apply''.
# Surface3D: Image -> Crop Image Data to Labels (optional)
# Mimics: Right click on the mask and select ''Properties…''. Choose the black color in the bottom left of the color options.
# Surface3D: Model -> Create Surface Model
# Mimics: Turn off ''Visibility'' for all masks except the object mask you just created.
# Surface3D: File -> Save Segmented Object -- creates the Image File (RAW format is preferred)
# Mimics: ''Export -> Images/Masks -> Images to DICOM''. Select the object mask.
# Surface3D: File -> Save Surface Model -- creates the Surface File (OBJ format is preferred)
# xManager: Load the subject and add the DICOM stack as a ''Scan Data'' item for the session. The individual object definitions should not have any image or surface files specified for them.
# Surface3D: File -> Save Subject
# Surface3D: Load the subject, select the object, and choose the appropriate DICOM stack from the list of ''Scan Data'' items.
# Surface3D: ''Segmentation -> Add Object Label''
# Surface3D: In the Segmentation widget, click on the label to select it. Set the ''Lower Threshold'' to 1 and the ''Upper Threshold'' to the maximum possible value.
# Surface3D: ''Segmentation -> Select Thresholding Seed'', then in any 2D view of the data click on any voxel of the object.
# Surface3D: ''Image -> Crop Image Data to Labels'' (optional). This crops the image data to the minimum axis-aligned bounding box of the labelled voxels.
# Surface3D: ''Model -> Create Surface Model''. This creates a polyhedral surface surrounding the labelled voxels.
# Surface3D: ''File -> Save Segmented Object''. This writes the Image File (RAW format is preferred).
# Surface3D: ''File -> Save Surface Model''. This writes the Surface File (OBJ format is preferred).
# Surface3D: ''File -> Save Subject''.
# Load the OBJ surface model into MeshLab and decimate and smooth it as appropriate for your project. You can either save it back to the original OBJ file or save it to a new file and update the object definition in xManager accordingly (the Surface File).
# Load the OBJ surface model into MeshLab and decimate and smooth it as appropriate for your project. You can either save it back to the original OBJ file or save it to a new file and update the object definition in xManager accordingly (the Surface File).
# In Orient3D, load the subject and define an LCS for the object using the <span id="Orient3DWidget01"></span>[[Orient3D: Local Coordinate System|Local Coordinate System (LCS) widget]].
# Orient3D: Load the subject, select the object, and define an LCS for it using the <span id="Orient3DWidget01"></span>[[Orient3D: Local Coordinate System|'''Local Coordinate System (LCS) widget''']].
# Orient3D: File -> Save ROI Surface (local frame).
# Orient3D: ''File -> Save ROI Surface (local frame)''. This writes the ROI Surface File (OBJ format is preferred).
# Orient3D: File -> Save Subject.
# Orient3D: ''File -> Save Subject''.


'''Method 2. Segmentation and 3D reconstruction are performed in Mimics.'''
'''Method 2. Segmentation and 3D reconstruction are performed in Mimics.'''


In this case, you must export the Image File as described above, and also the polyhedral surface model (Surface File). The OBJ format is preferred for the Surface File, but STL is also acceptable (coming soon). The vertices of the surface model must be expressed in the same reference frame as the implicit frame in the Image File (ref).
In this case, you must export the segmented image file as described above (Image File), and also the polyhedral surface model (Surface File). The OBJ format is preferred for the Surface File, but STL is also acceptable. The vertices of the surface model must be expressed in the same reference frame as the implicit frame in the Image File (as described [[DSX:_Image_and_Surface_Files|'''here''']]).
The steps for processing each object with this method are:
The steps for processing each object with this method are:
# In Mimics, segment the object in the DICOM images.
# Mimics: Select ''New Mask'' from the ''Segment'' toolbar.
# Crop the image data to the segmented object (optional).
# Mimics: Select the entire threshold region.
# Save the image data to a RAW file. In this file, all voxels representing the object should have their original intensity values and all other voxels should be set to zero. Make a note of the image dimensions, voxel size, and other formatting parameters (bits/voxel, signed/unsigned, little- or big-endian).
# Mimics: Rename the mask to ''All''.
# Create a polyhedral surface model from the segmentation. Save it to an OBJ file.
# Mimics: Create a mask covering the object of interest, using the various segmentation tools available.
# Use MeshLab to decimate and smooth the surface model.
# Mimics: Select ''Boolean Operations'' from the ''Segment'' toolbar. Set ''Mask A'' to the ''All'' mask, the ''Operation'' to ''Minus'', ''Mask B'' to the object mask, and ''Result'' to a new mask.
# In xManager, add the data files to the object definition. The RAW file is the object's Image File. Fill in the file specifications from the notes you made in step 3. The OBJ file is the object's Surface File. The units are the units of the image data (usually millimeters).
# Mimics: Rename the new mask to something appropriate for the object being segmented. Select ''Apply''.
# In Orient3D, load the subject, select the object, and use the <span id="Orient3DWidget01"></span>[[Orient3D: Image/Surface Match|Image/Surface Match widget]] to make sure the Surface File is in the same reference frame as the Image File.
# Mimics: Right click on the mask and select ''Properties…''. Choose the black color in the bottom left of the color options.
# In Orient3D, define an LCS for the object using the <span id="Orient3DWidget01"></span>[[Orient3D: Local Coordinate System|Local Coordinate System (LCS) widget]].
# Mimics: Turn off ''Visibility'' for all masks except the object mask you just created.
# Orient3D: File -> Save ROI Surface (local frame).
# Mimics: ''Export -> Images/Masks -> Images to DICOM''. Select the object mask.
# Orient3D: File -> Save Subject.
# Mimics: Create a polyhedral surface model from the segmentation.
# Use Mimics or MeshLab to decimate and smooth the surface model. Save it to an OBJ file.
# xManager: Add the data files to the object definition. The DICOM stack is the object's Image File. The OBJ file is the object's Surface File. The units are the units of the image data (usually millimeters). The object should not have an ROI Surface File defined.
# Orient3D: Load the subject, select the object, and use the <span id="Orient3DWidget01"></span>[[Orient3D: Image/Surface Match|'''Image/Surface Match widget''']] to make sure the Surface File is in the same reference frame as the Image File.
# Orient3D: Define an LCS for the object using the <span id="Orient3DWidget01"></span>[[Orient3D: Local Coordinate System|'''Local Coordinate System (LCS) widget''']].
# Orient3D: ''File -> Save ROI Surface (local frame)''. This writes the ROI Surface File (OBJ format is preferred).
# Orient3D: ''File -> Save Subject''.

Latest revision as of 16:24, 6 July 2021

There are many third-party software packages for segmenting 3D image data (segmentation) and creating surface models (3D reconstruction), including Mimics, ScanIP, and 3D Slicer. These programs provide sophisticated segmentation functions as well as tools for decimating and smoothing the polyhedral surface models. Additionally, there are open-source programs with powerful tools for manipulating surface models, such as MeshLab and Blender. Our goal with Surface3D is not to replace these programs, which are robust, well-maintained, and widely used. It is to provide a solution to users who do not currently use these other prorgams and whose segmentation and surface smoothing needs are relatively simple. The primary benefit of Surface3D is that it is integrated into the DSX Suite so that updating the subject file and handling reference frames and file formats consistently is automatic. Nevertheless, if you already use one or more of these third-party programs for segmentation or 3D reconstruction, we encourage you to continue using them. This guideline is designed to help you integrate the outputs of those programs into DSX Suite. Before continuing, please familiarize yourself with the DSX terminology for Image and Surface Files.

There are two primary methods of integrating data from these third-party programs into DSX Suite. The best one for you depends on your data set and your level of expertise with the other programs. For ease of description this guide will assume you are using Mimics and MeshLab, but any of the other programs could be substituted for those.

Method 1: Segmentation is performed in Mimics. 3D reconstruction is performed in Surface3D.

In this case you must export from Mimics a DICOM stack for each object. In each DICOM stack, all voxels representing the object of interest have their original intensities (Hounsfield units for CT) and all other voxels are set to zero. The steps for processing an object with this method are:

  1. Mimics: Select New Mask from the Segment toolbar.
  2. Mimics: Select the entire threshold region.
  3. Mimics: Rename the mask to All.
  4. Mimics: Create a mask covering the object of interest, using the various segmentation tools available.
  5. Mimics: Select Boolean Operations from the Segment toolbar. Set Mask A to the All mask, the Operation to Minus, Mask B to the object mask, and Result to a new mask.
  6. Mimics: Rename the new mask to something appropriate for the object being segmented. Select Apply.
  7. Mimics: Right click on the mask and select Properties…. Choose the black color in the bottom left of the color options.
  8. Mimics: Turn off Visibility for all masks except the object mask you just created.
  9. Mimics: Export -> Images/Masks -> Images to DICOM. Select the object mask.
  10. xManager: Load the subject and add the DICOM stack as a Scan Data item for the session. The individual object definitions should not have any image or surface files specified for them.
  11. Surface3D: Load the subject, select the object, and choose the appropriate DICOM stack from the list of Scan Data items.
  12. Surface3D: Segmentation -> Add Object Label
  13. Surface3D: In the Segmentation widget, click on the label to select it. Set the Lower Threshold to 1 and the Upper Threshold to the maximum possible value.
  14. Surface3D: Segmentation -> Select Thresholding Seed, then in any 2D view of the data click on any voxel of the object.
  15. Surface3D: Image -> Crop Image Data to Labels (optional). This crops the image data to the minimum axis-aligned bounding box of the labelled voxels.
  16. Surface3D: Model -> Create Surface Model. This creates a polyhedral surface surrounding the labelled voxels.
  17. Surface3D: File -> Save Segmented Object. This writes the Image File (RAW format is preferred).
  18. Surface3D: File -> Save Surface Model. This writes the Surface File (OBJ format is preferred).
  19. Surface3D: File -> Save Subject.
  20. Load the OBJ surface model into MeshLab and decimate and smooth it as appropriate for your project. You can either save it back to the original OBJ file or save it to a new file and update the object definition in xManager accordingly (the Surface File).
  21. Orient3D: Load the subject, select the object, and define an LCS for it using the Local Coordinate System (LCS) widget.
  22. Orient3D: File -> Save ROI Surface (local frame). This writes the ROI Surface File (OBJ format is preferred).
  23. Orient3D: File -> Save Subject.

Method 2. Segmentation and 3D reconstruction are performed in Mimics.

In this case, you must export the segmented image file as described above (Image File), and also the polyhedral surface model (Surface File). The OBJ format is preferred for the Surface File, but STL is also acceptable. The vertices of the surface model must be expressed in the same reference frame as the implicit frame in the Image File (as described here). The steps for processing each object with this method are:

  1. Mimics: Select New Mask from the Segment toolbar.
  2. Mimics: Select the entire threshold region.
  3. Mimics: Rename the mask to All.
  4. Mimics: Create a mask covering the object of interest, using the various segmentation tools available.
  5. Mimics: Select Boolean Operations from the Segment toolbar. Set Mask A to the All mask, the Operation to Minus, Mask B to the object mask, and Result to a new mask.
  6. Mimics: Rename the new mask to something appropriate for the object being segmented. Select Apply.
  7. Mimics: Right click on the mask and select Properties…. Choose the black color in the bottom left of the color options.
  8. Mimics: Turn off Visibility for all masks except the object mask you just created.
  9. Mimics: Export -> Images/Masks -> Images to DICOM. Select the object mask.
  10. Mimics: Create a polyhedral surface model from the segmentation.
  11. Use Mimics or MeshLab to decimate and smooth the surface model. Save it to an OBJ file.
  12. xManager: Add the data files to the object definition. The DICOM stack is the object's Image File. The OBJ file is the object's Surface File. The units are the units of the image data (usually millimeters). The object should not have an ROI Surface File defined.
  13. Orient3D: Load the subject, select the object, and use the Image/Surface Match widget to make sure the Surface File is in the same reference frame as the Image File.
  14. Orient3D: Define an LCS for the object using the Local Coordinate System (LCS) widget.
  15. Orient3D: File -> Save ROI Surface (local frame). This writes the ROI Surface File (OBJ format is preferred).
  16. Orient3D: File -> Save Subject.
Retrieved from ""