Create volumes from 3D model (*.obj file)

Hello,
i would like to ask you, how can i create and save volumes (DICOM data) from 3D model saved in *.obj file.
Thank you

Selector

Hi,

There are several ways to do this; here’s one straightforward but not so efficient one… (Assuming I understand what you want to do (create voxel volume from a polygonal surface))

  1. Install the Image Maker extension from the extensions manager, and create a volume by defining a resolution, and set the origin/spacing such that all the coordinates of your *.obj will be contained within it.

  2. Import your *.obj into Slicer as a Model.

  3. Create a segmentation using the “Segmentations” module

  4. Navigate to the “Export/import models and labelmaps” drop-down in this module. Select “import” and “models” and select the model that you imported earlier.

  5. Go to the “Segment editor” module. Select your segment.

  6. Use the “Mask volume” function and fill inside your segment with some value.

If your model consists of a bunch of components, separate it into individual components and repeat this. If the components need to overlap, start with the outermost and work inward.

And then export your final volume as DICOM

1 Like

In most recent nightly builds you can do it even simpler:

  • Drag-and-drop the .obj file to Slicer application (or use menu: File / Add data and select the .obj file)
  • In “Description” column select “Segmentation” and click OK
  • Go to “Segmentations” module and in “Export/import…” section click “Export” button (by default select “Export” and “Labelmap” are selected, which create a new labelmap node)
1 Like