Closed matthewdeancooper closed 4 years ago
One RTSTRUCT file stores many contours, so knowing the filename will not help. Also, if you removed a contour, it would mean that the structure does not appear on the associated slice, which would be incorrect information.
I would recommend to get rid of RTSTRUCT immediately (import to segmentation, maybe export to labelmap volume) and do quality control check in a separate step.
If you need to review only a couple of hundred frames then it is probably easier to remove the frames manually (take note of invalid slice indices and remove from the image volume and associated labelmap using simple numpy slicing: acceptedImageSlices = imageVolume(validSliceIndices,:,:); acceptedLabelmapSlices = segmentationLabelmapVolume(validSliceIndices,:,:)
).
If you need to review tens of thousands of frames then it may pay off if you spend 1-2 hours writing a simple Python scripted module that automates the process: iterates through the slices and asks you to click Accept or Reject, and then creates the valid image+segmentation volumes automatically.
Thanks for such a quick response Iassoan
Yep. I am not attempting to remove any contours, rather, remove CT DICOM files associated with the RTSTRUCT file that have not been contoured correctly. I am using CT DICOM file names in a python generating function which then grabs the correct RTSTRUCT file and pulls the contours for the CT DICOM FILE by its location with respect to the z-axis.
A quick script seems to be the right way to go. SlicerRT displays the image slice location while scrolling through, which I can store in a list and use to automate the removal.
All the best and thank you for your help and your work on SlicerRT!
Hey all at SlicerRT,
I'm wondering if there is a way to view slice file names while observing contours on the current slice. I am preparing a dataset for a machine learning application and need a quick way to view and delete image slices (ie. the CT DICOM file associated with that slice) that have not been contoured accurately in the DICOM RS file.
I have written a script to do this in python but it might be quicker to use 3D slicer if this feature is available. Thanks for your help in advance!
Matthew