This page contains instructions on how to perform MRI prostate segmentation and surface reconstruction in MIPAV. The algorithm facilities the validation of multi-parametric MRI with histopathology slides from radical prostatectomy specimens and targeted biopsy specimens. It employs the technique that combines image processing and computer aided design to construct a high resolution 3D prostate surface from MRI images in three orthogonal views with non-isotropic voxel resolution.
The algorithm outline is shown below, refer to (Applying the algorithm.
The algorithm could be applied to the following image types (TBD). In order to use the segmentation tool, the image dataset must contain 3 orthogonal images centered at prostate center, similar to ones in the sample image dataset available for download via this link.
We encourage you to test the algorithm on the prostate images provided in the sample image dataset. The sample image dataset provided by NCI can be downloaded using this link. The data included are orthogonal MR images obtained from a 3.0 T whole-body MRI system (Achieva, Philips Healthcare).
T2-weighted MR images of the entire prostate were obtained in three orthogonal planes (sagittal, axial and coronal) using the following settings:
The center of the prostate is the focal point for the MRI scan. To reduce the scan time, a lower refocusing pulse of 100 degrees was used for sagittal and coronal images, which alters the contrast on these images compared to the axial images.
Applying the algorithm involves the following major steps:
If you are working with DICOM images, convert DICOM images into MIPAV XML format, first. In order to do that,
Naming conventions: When you convert a DICOM image to a MIPAV XML image, we advise you to use the following file names: image_ax_83.xml, image_sag_83.xml, image_cor_83.xml. The ax, sag, and cor suffixes are used to specify axial, sagittal, and coronal images correspondingly. These are names used in the the sample image dataset. And these are file names used in this instruction.
To open an axial image, use File > Open image (A) from disk menu. If you are using the sample image dataset provided, open the img_ax_83.xml file.
To delineate prostate VOIs, use the Polygon/Polyline VOI tool
from the MIPAV toolbar.
For example, if you work with the sample image dataset:


Smoothing VOIs. After delineating VOIs, we need to smooth each VOI. In order to do this, select each VOI and call the Smooth VOI dialog box. The dialog is available from the main MIPAV menu (VOI > Smooth VOI).
In the Smooth VOI dialog box, check the "Replace Original Contour" box, and set "Number of interpolation points" to 100. Click OK. Repeat for all 3 contours.
Sagittal and coronal images. Repeat the same process of delineating and smoothing VOIs for both sagittal and coronal images. In the sample image dataset provided, the saggital image name is img_sag_83 and the coronal image name is img_cor_83. See Naming Conventions.
In the sample image dataset provided, VOIs files are already available for all 3 types of images (axial, saggital and coronal). Under the image dataset directory, one can find 3 orthogonal images and corresponding VOIs:
| Orientation | Image file | VOI file |
|---|---|---|
| axial | img_ax_83.xml | voi_ax_83.xml |
| coronal | img_cor_83.xml | voi_cor_83.xml |
| saggital | img_sag_83.xml | voi_sag_83.xml |
Note: The VOIs from the sample image dataset were drawn by clinical researchers, and verified by radiologist expert at NCI. For experimental purposes, we could recommend performing quick VOIs copying instead of manually drawing all three VOIs for all 3 image files.

We use the semi-automatic segmentation dialog to segment the MRI prostate image. Before proceeding, please, make sure you open 3 orthogonal prostate images with VOIs - img_ax_83.xml and voi_ax_83.xml, img_sag_83.xml and voi_ax_sag.xml, and img_cor_83.xml and voi_cor_83.xml.


Note that the drawn VOIs slice numbers are automatically populated in the dialog box.

For each named VOIs based mask, the console window shows the number of voxels and volume. Created VOIs are used for the surface reconstruction step. Each VOI contour has 100 points.
Axial image VOIs: number of voxels = 333795 volume = 74871.586 mm^3 Sagittal image VOIs: number of voxels = 340633 volume = 76405.41 mm^3 Coronal image VOIs: number of voxels = 320149 volume = 71810.766 mm^3 time elapse = 1 mins 55 sec
To save each new segmented VOI, select the VOI first, and then call the Save VOI dialog box.
To avoid confusions save these VOIs separately as _new.xml files. You can consider using the following naming convention for the axial, sagittal, and coronal VOIs respectively: voi_ax_new.xml, voi_sag_new.xml and voi_cor_new.xml

To form a cloud points set used for surface reconstruction, we need to merge 3 VOIs (axial, coronal and sagittal) in DICOM space.
We provide a unified dialog to use the Ball-Pivoting and Poisson surface reconstruction algorithms to build the smooth 3D surface with the generated point cloud dataset.

Input - the final point set data file - merged_VOI.ply.
Output - the final surface file -prostate_surface.ply and the coarse surface output file bpt_output.ply.
To run the Surface Reconstruction algorithm:
The coarse surface output file is generated after running the Ball-Pivoting algorithm. The surface is constructed with many holes left. The Poisson algorithm takes the coarse surface as an input, and finishes up with a final smoothed prostate surface.
After generating the smoothed prostate surface, the MIPAV GPU based 3D visualization software is used to prepare the surface data for 3D printing. The axial image is used to visualize the prostate surface. This is because the apex and base VOIs contours of axial image might be big enough to go beyond the sagittal and coronal image boundary. Thus, the axial image is the best to hold the final generated prostate surface.
MIPAV GPU based Volume Renderer works with DICOM matrix files, therefore we need to save the axial image DICOM matrix. During visualization, the DICOM matrix file is used to transfer the surface points from DICOM space to image space.
In order to save the DICOM matrix:
Note: in MIPAV all axial, sagittal, and coronal VOIs are saved in DICOM space, therefore the final generated prostate surface is also saved in DICOM space.
See also Volume renderer GPU support listing.
Input - the DICOM matrix file, e.g. img_ax_83.dicomMatrix
Output - STL surface file, e.g.3D printing_Prostate.stl
- To run MIPAV GPU Renderer, click the GPU based Volume Renderer icon on MIPAV toolbar. The MIPAV GPU Visualization window appears (see a in the figure below).
![]() |
![]() |
![]() |
![]() |
The uploaded surface contains 7362 triangles. For the final 3D prostate mold printing, this number is too big. We need to decimate the surface to a smaller number of triangles, and make the triangle meshes printable with Solidworks 3D CAD software.
The final prostate 3D surface STL file is imported into Solidworks 3D CAD software to generate the mold.
To quantitatively evaluate the performance of the semi-automatic segmentation algorithm, comparison based on VOIs binary mask, VOIs volume and 3D prostate surface volume are conducted.
VOIs binary mask method generates the binary mask from VOIs. Then it compares the overlapped region with false negative (FN), false positive (FP), and true positive (TP) volume fractions.
The VOI binary masks use the expert manual segmentation as the established truth. Truth Positive (TP) reflects the majority overlapped region between the semi-automatic and manual segmentation.
For volumetric measure, the VOIs volume is computed by multiplying the total VOI pixels with a single voxel volume. The 3D surface volume is calculated from the binary surface volumetric mask by multiplying the total surface volumetric voxels with a single voxel volume.
The expert drawn VOIs files are provided in the sample image dataset. To compare the image wise segmentation quality, we simply add the expert drawn VOI file into the segmented result image.