Is there a way to convert a ROI box in to a segment or Model ?
I tried to create a vtkModel object with the centroid of the segment as the center but its orientation is not what i want. I was simply thinking is there a way of simply converting the ROI box in to a sement or model ?
I guess the problem is with the principle axis direction. But I do not see a argument to set that in the vtkModel.
There are many options for implementing this. What would you like to achieve?
I want to make it work for two purposes.
- When we are working with Models/Segments only i want to align basic objects like cylinder or cube along the segment bounding box.
Something like this, (i use the transform to get it in to somewhat align to show you what i want to do. )
- When we define a ROI of certain size in a volume (e.g CT) convert it directly to a segment. The way did was that use crop volume and use that to make a segment but it would be much convenient if there is a way i can directly use the ROI and convert it to a segment.
For example scissor tool with rectangle or circle does not allow us to control the size of area we draw
We can define the height (one length )via symmetric option but we cannot control the other two dimensions ( or Radius of the circle).
For this, I would recommend to create a transform from the bounding box or principal component axes and apply that transform to models.
You can define a box-shaped ROI using Scissors effect in two steps. First step is fill inside in one slice view. Second step is erase outside in an orthogonal view.
You can also define box ROIs using “Surface cut” effect by disabling “Smooth model” option and placing 8 points.
Dear Prof Lasso, Thank you for as always taking time to help.
What I tried to do before was apply the transformation of the ROI box to the model. It works well if it is a Square. But if it is cylinder or rectangle the long axis can be oriented in a plane that we do not want to. I am not sure if i am explaining my problem this correctly but please have a look at the photos.
As you can see in he last photo if it is a rectangle or a cylinder it can get oriented at 90 degrees to the long axis.
- I do not know how to apply the principal component axes to these models. I think if i can do that it will solve the problem. But I hope my problem is clear for you. Please let me know how to apply the principal component axes ?
The way i use to rotate this is by placing a fiducial at the centroid of the model and then rotating the model around that specific point. If i try to apply the transform without this I believe by default in slicer objects simply get transformed around the world origin of the slicer.
- Is there a simple way of setting the object origin to the center of the model ? so the objects are transformed much easily. For example in any 3D modelling software like Blender, we can simply select the object origin to world origin, object center by volume , weight etc… or to any arbitrary location. This can be achieved in 3D Slicer too by placing a fiducial and transforming around that but is there a simple way of achieving this ?
If not It would be a great feature to add.
I am sorry I am at complete loss. Can you please direct me to a example as i do not understand this at all.
- Most of the problem in my line of work need segmenting same ROI repeatedly. Is it possible to make the Scissor draw a circle of prefixed radius ?
Or the make the scissor to draw a rectangle of fixed x and y length ?
If the scissor can made to limit the slice cut in positive and negative directions with the prefixed length in mm like it does in symmetric almost all the ROI problems will be solved in my opinion. The way i do this is by masking the direction i do not want to segment and use the symmetric option but if the slice cut length can be defined for positive and negative cuts it would be great.