Import Third Party Files
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:
- Mimics: Select New Mask from the Segment toolbar.
- Mimics: Select the entire threshold region.
- Mimics: Rename the mask to All.
- Mimics: Create a mask covering the object of interest, using the various segmentation tools available.
- 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.
- Mimics: Rename the new mask to something appropriate for the object being segmented. Select Apply.
- Mimics: Right click on the mask and select Properties…. Choose the black color in the bottom left of the color options.
- Mimics: Turn off Visibility for all masks except the object mask you just created.
- Mimics: Export → Images/Masks → Images to DICOM. Select the object mask.
- 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: 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).
- Orient3D: Load the subject, select the object, and define an LCS for it using the **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.
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:
- Mimics: Select New Mask from the Segment toolbar.
- Mimics: Select the entire threshold region.
- Mimics: Rename the mask to All.
- Mimics: Create a mask covering the object of interest, using the various segmentation tools available.
- 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.
- Mimics: Rename the new mask to something appropriate for the object being segmented. Select Apply.
- Mimics: Right click on the mask and select Properties…. Choose the black color in the bottom left of the color options.
- Mimics: Turn off Visibility for all masks except the object mask you just created.
- Mimics: Export → Images/Masks → Images to DICOM. Select the object mask.
- 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 **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 **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.