Dear support team,
I am currently working on cervical segmentations and find that quite a few of these CTs are not aligned correctly (meaning neck being turned left/right/back/forth). As I am analyzing 2D-segmentations and not 3D-models, it is of interest to get these scans aligned in a similarly upright fashion.
Now, I already found a good video which describes the ways of realigning the 3 CT orientations via using the 3D-model and turning it into the right position (using a transform):
This works out but I would like to be more specific about the new orientation: Is there a way of defining a self-drawn plane to become the new axial/coronal/sagittal slice orientation and save it as such for segmentation?
Thank you very much for looking into it!
If you are using a very recent Slicer Preview release, there is available a few flavors of MarkupsPlane objects which are likely to be helpful for you here (some documentation is here). You can define the location and orientation of the markups plane by placing control points, and depending on the type of plane definition you choose, these control points can be
- the plane origin and normal direction
- the plane origin and two points which are contained on the plane and define the plane axis directions
- any number of control points, and the plane is the best fit plane to the set of points supplied
Once placed, a plane can also be manipulated interactively.
To get further on your problem, however, I think you will need to work with some simple linear algebra (vector cross products) and some python code. Once you have defined one plane, you want to ensure that the other two planes are perpendicular to each other and to the original plane. And, once you have done that, you want to assign the orientations of the slice views to your chosen planes or create a transform based on your chosen planes and apply it to your image volume so that the existing slice view orientations show the planes you want. This is all very achievable in Slicer, but there are not built-in methods to do it. Slicer is designed for users to easily be able to add functionality which is helpful for them in scripted python modules.
If you want to go this route, there are a lot of resources available (a python script repository with examples of accomplishing many types of tasks, a developer guide, and tutorials) and this forum is a very helpful and friendly place. You may also decide that the method you’ve found already works well enough for your purposes.
Thank you very much for your kind and helpful reply. I will contemplate getting into the fundamentals of python.