I was searching for a way to resample a volume in the orientation of multiplanar reformation (using 3d Slicer’s “interactive slice intersections” feature), with the goal of creating a 2d segmentation that lives in 1 slice in that space.
There are many ways to achieve this. What is your overall goal? Would you like to segment some 3D structures (vessels, bones, valves, etc.) slice by slice using some 2D segmentation model and then reconstruct a 3D volume from that?
Thanks for your reponse. For my purposes, I only need the 2D segmentations from this single slice in as streamlined of a fashion as possible; no 3D volume from multiple slices would be needed.
It seems necessary to resample in the multiplanar reformation’s axes to obtain a 2D mask. From this slice, I would segment a few ROIs that I’d like to save, then look at radiomic features.
Probably the easiest is to add a markup ROI, translate/rotate it to the desired location, and then use Crop volume module GUI to extract a slice (or a few slices).
Thank you for this. I’m having difficulty executing this; manual rotation is difficult to line up and I wasn’t able to find the . Cropping did make sense as well.
I wasn’t able to figure out from the UI or documentation how to use an existing closed curve to a segmentation using Surface cut (within segment editor, if there’s another way). Everything seemed to revolve around creating new fiducials rather than using the existing curve.
Sorry, I’ve only used Slicer in very limited capacity before (axial segmentations) and trying to take advantage of so many new features at once is a bit overwhelming!
There are many ways to achieve this, depending on what you exact needs are. But to make things really simple, I uploaded a simple script that you can use to extract an arbitrary slice from a volume designated by a markup plane. You can place a markup plane by a single click in any slice view and then copy-paste this code snippet into the Python console to extract that slice as a new volume.
I also had a follow-up question from one of your prior responses
Please keep this topic focused on the original question and post follow-up comments in that other topic or create a new topic for a new question. Thank you!
Thank you, the code snippet helped me extract the volume in the view of slicer.mrmlScene.GetFirstNodeByClass(“vtkMRMLScalarVolumeNode”)
This volume included voxels oriented in the original volume; would it be possible to resample the voxels in the new orientation so I could get a 2D cross section?
I tried resampling, which give the below image: however, using segment editor on the source volume “output volume (post-resampling)” still produces these angular annotations. Can I interpret this as that the resampled voxels are still in the same old orientation, despite what appears in the other views? If so, how can I resample to get an accurate 2d segmentation, for 2d shape properties?
I’m having difficulty resampling the volume in the desired orientation, my original aim. Whether one slice or the whole volume doesn’t matter, but I’d like it to use the normal vectors from the orientation.
I made some headway with taking normal vectors from the reformat module for each r/g/y slice view and using them in a transformation matrix, but I’m still not achieving the goal and the workflow seems impractical.
From FAQS from 4.6, I did see this snippet “How can I use the reformat widget view to resample my images?” but wasn’t able to figure out how to yield new transforms or volumes with it.