[Addon] Analyse DICOM 3D Models

Hello!

I wrote my first addon for Blender 2.73, which can make examining of a scanned body part model more efficient. After importing it to Blender we can find it in 3D View Tools panel in Analyse DICOM tab. To create a 3D object from DICOM file we can use 3D Slicer – open source software for medical image analysis. We can export this model to supported by plugin .ply or .stl format. This addon is targeted to people who are not necessarily familiar with menu layout and shortcuts in a Blender. For this reason, I gathered in one panel most of the functions that I think may by useful and that already are available in Blender. What is most interesting in this addon are new features such as trim, intersect and dissect.

Trim cuts out part of the object with the cuboid that faces are made of the planes intersecting the X, Y and Z axes. For each axis we give the initial and final value of the cut, which is represented by percentage value of the position relative to the object’s bounding box. In addition, we can determine whether the intersected geometry have to be filled by face. We can perform this operation by modifying the active object or saving the result of transformations as a new object. By ticking the ‘origin translation’ box you can determine whether origin of the newly created object will be in the same location as the input object’s or in translated location. Trim is designed to reduce calculations for the processor by getting rid of inessential geometry, leaving only a desired fragment.

[TABLE=“width: 500”]

http://i59.tinypic.com/33fb1xk.jpg
http://i60.tinypic.com/foj1uq.jpg

[/TABLE]

Intersect is a modified, bit simplified version of the Blender’s built-in bisect. This simplification consists in the fact that the intersection can be performed only across X, Y and Z axes in the 0 point for each axis. It is aimed at speeding up the operation because the models derived from DICOM files have complex geometries and a large number of vertices which slows down your computer. Other intersection planes we can get by simply rotating and moving object. Intersect function has already known parameters responsible for filling the intersections with faces and removing the geometry before and after the cut. The result of this operation also can be performed on the active object or be saved as a new. We can also determine whether newly created objects have to have the same origin as the active object, moved to a different location for each axis or moved but common for each axis. If we choose to translate the origin and we will make several cuts while moving the object on the same axis, origins of the newly created objects will translate relative to each other to form a ‘chopped’ input object. Names of the produced objects will depend on in which axis they were cutted. We also have available navigation buttons that allow us to switch between intersections for each axis separately. There is also an option that hides behind already visited objects. For instance, you can set the camera along a given axis and by navigating between intersections and by displaying only active cut we can get the effect of watching slides, for example X-rays of bones or other organs.

[TABLE=“width: 500”]

http://i57.tinypic.com/351xtf4.jpg
http://i62.tinypic.com/5x076v.jpg

[/TABLE]

Dissect is an enhanced form of intersect. The difference is that it does not perform only one cut but several at once. This method consists in cutting object into slices. In addition to the same options as the intersect (orientation of intersecting plane, filling intersection with face, location of origin), dissect additionally has an option similar to trim, which we define what part of the object will be sliced in a given axis. With ‘step’ value we can set how big will be the gap between each successive cut. We can also define whether uncutted parts that do not fit in given area are supposed to be assigned to the first and last cuts or supposed to be removed. Just like in the intersect, every slice will be saved as a new object with particular name, so we can easily browse them.

[TABLE=“width: 500”]

http://i59.tinypic.com/e0fl3s.jpg
http://i59.tinypic.com/sztnrl.jpg

[/TABLE]

Other, available functions in this addon are:

in Navigation section: 

    orbit / pan / zoom / roll : the view;   set: left / right / front / back / top / bottom : viewpoint;   change view projection to: perspective / orthographic; 

[TABLE=“width: 500”]

http://i61.tinypic.com/2vajk00.jpg

[/TABLE]

in Selection section: 

    show/hide selected objects;   show all objects;   hide all inactive objects;   (de)select all objects, vertices, edges or faces;   inverse selection;   border / circle : select;   select : all linked vertices / loop of connected edges;   fill loop with faces;   duplicate selection;   delete selected: objects / vertices / edges / faces / only faces / only edges & faces; 

[TABLE=“width: 500”]

Object mode:
Edit mode:

http://i57.tinypic.com/2j0f18n.jpg
http://i59.tinypic.com/2mxkhuw.jpg

[/TABLE]

in Tools section: 

    undo;   redo;   load a: PLY geometry file / STL triangle mesh data;   go to: edit / object : mode;   move origin to center of object geometry bounds;   add:  Decimate / Smooth : modifier; 

[TABLE=“width: 500”]

Object mode:
Edit mode:

http://i59.tinypic.com/2ur9xq9.jpg
http://i61.tinypic.com/bedfg3.jpg

[/TABLE]

in Transform section: 

 change object's name;   transform / clear / apply : location / rotation / delta scale / scale;  

[TABLE=“width: 500”]

[/TABLE]

I’ve made this plugin as a part for my master’s thesis and I wanted to share it. So if you are interested, fell free to add some new features, upgrade some existing functions, extend its functionality or just share your thoughts.

Perfect!!!

Sorry, I’m really interested in this, but, as is installed? I have tried in the 2.73ay version in version 2.74 of Blender and I have not been able to run the program. Thank you !!!

You have to download this file to [Blender folder]\2.73[or whatever version you have]\scripts\addons directory. Next, open User Preferences in Blender, choose Addons tab and in 3D View category you should be able to find Analyse DICOM 3D Model, just simply check the enable box. Now, in 3D View Tools panel should be Analyse DICOM tab.

Hi froggman ,

A very great Thanks for sharing your work! I am very interested…
Congratulations.

hi, froggman,
awesome work, there’s really some good tools you have created.
would you mind if I borrow some?

Thanks!

Sure thing Meta-Androcto, you can use it if you want