Measuring in 3d CT

I am using 3d slicer for the first time. Can someone please guide me regarding how to draw a perpendicular line in 3D CT. When i try using the markup function, the angle gets calculated in a different plane. (see image 1 and 2)

Hi! Measuring and drawing are quite different operations. What do you want to achieve?

I want to make 2 points on the base of coracoid( where there is a curve on the en face view of glenoid)process and extend it downwards ( this extension should be a perfect straight line ( 180 degree with the base of coracoid line). Hope you understood what I am trying to explain and thank you so much for your reply

I’m not familiar with a feature that would directly achieve this.

The only thing I think of right now that only involves the GUI is to put a transform on the line and extend it by scaling it, but calculating the transform is not that straightforward (the origin needs to be carefully set).

I’d probably create a very simple Python module that takes your line and extends it by a given amount in the direction of ControlPoint0->ControlPoint1. This involves using the Extension wizard to create a new module, the Qt Designer to modify a bit the module GUI, and the Python code to calculate the new point and apply it. It would probably take 2 hours to an experienced Slicer programmer, but to a novice it could take weeks… not sure if anyone else has an idea.

Or to go more DIY a simple Python script that you call from the console would do it too, but that little code has to be written (get vector between two points, apply it in a certain distance, set new control point 1 position).

I just tested this and it works for me:

>>> f = getNode('Model fixed points') # Replace with the name of your node (Data module, double click item name, copy)
>>> f.GetNumberOfControlPoints()
2
>>> import numpy as np
>>> p0 = np.zeros(3)
>>> p1 = np.zeros(3)
>>> f.GetNthControlPointPositionWorld(0,p0)
1
>>> p0
array([ 0.43038881, -4.647295  ,  0.6284796 ])
>>> f.GetNthControlPointPositionWorld(1,p1)
1
>>> p1
array([14.29884148, -4.90982199, 21.0538559 ])
>>> v01 = p1 - p0
>>> p1p = p1 + v01 * 2 # Instead of "* 2" whatever elongation you want
>>> f.SetNthControlPointPositionWorld(1,p1p)

Thanks for your guide, but i have zero knowledge about coding and python

I just did it for you. Edit my code accordingly in an editor (see the two comments), open the Python interactor in Slicer, and copy-paste the code there.

EDIT: You need to ignore the lines not starting with >>> , and for the rest delete the >>> . Then copy-paste and run.

thank you so much for your help mate. But I think I am not with coding, can you suggest me some other Dicom Viewer were I would be able to do this measurements (Best DICOM viewer for measuring (angles, area of a circles, to draw a perpendicular line) in 3D CT.

Thanks again Mate

Horos or Osirix lite

Could you explain a little more clearly what you want to do and what you are ultimately trying to measure on the scapula? I am sure 3D slicer can do what you want. If I get a bit more of an idea of exactly what you want I could make a step by step video on how to use cpinters code in slicer. It is not too complicated seeing as the code is already written.

Thank you Juicy, I am doing this to check the glenoid bone loss % (% of glenoid bone loss determines the type of treatment a patient will receive). We take an en-face view of the glenoid (Glenoid facing you). we have to make two points on the base of glenoid (one superior and one inferior - on the enface view this appears like a straight line, but in reality it has a lot complicated 3d structure). Next we have to connect the two points and extend it downwards. If I am able to do this then I can calculate the glenoid bone loss from it.

Thanks again Juicy. and is it possible to draw a circle and measure the area within the circle in slicer??

Thanks brother. Osirix is for Mac. I hope Horos is available for Windows!!!

You should be able to do that with this tool. Install SlicerVMTK extension in a recent preview release.

My bad Osirix and Horos are both MAC based

Thank you Chi.set, will give it a try

Ok, I still don’t understand exactly where you want the points on the glenoid. It seems that 3D slicer could do what you need but if you are not wanting to do any coding then perhaps you could try RadiAnt DICOM. It is easy to get a free trial of the software. It has a 3D MPR mode where you can orient the slice views any way through the volume and has the ability to draw perfect circles, angles in a plane and lengths. Maybe this would be an easier way to do what you want? In the image below I have loaded a scan of a scapula and reoriented the slices so the top left view is looking straight at the glenoid. I have drawn some circles, angles and lines to demonstrate the tools. RadiAnt DICOM can make a 3D model of your scan but you cant really put measurement points on the model. See if this works for you otherwise, there will definitely be ways to do it in slicer using python code. I can show you how to use the code as it is simple enough to paste code into the python interactor.

1 Like