I’m having an issue with how SCT crops the QC images for canal segmentations when using sct_qc.
– When there is no existing canal segmentation label: segmentation runs through "sct_deepseg canal…” and the QC file is cropped appropriately (I can visualize the entire canal).
– However, when QC is generated by “sct_qc”, it crops tightly to the spinal cord and cuts off the canal. I’ve tried -p sct_propseg and -p sct_deepseg_sc, and both still cut off the canal.
Please advise on how to ensure that the QC images are correctly cropped so that the canal is not cut off.
sct_deepseg canal should have its own argument called -qc-seg that controls the cropping behavior of the built-in QC report for sct_deepseg:
> sct_deepseg canal -h
-qc-seg <file> Segmentation file to use for cropping the QC. This
option is useful when you want to QC a region that is
different from the output segmentation. For example, it
might be useful to provide a dilated cord segmentation
to expand the QC field of view.
If `-qc-seg` is not provided, the default behavior will
depend on the value of `-qc-plane`:
- 'Axial': Without '-qc-seg', a sensible crop radius
between 15-40 vox will be automatically used,
depending on the resolution and segmentation type.
- 'Sagittal': Without '-qc-seg', the full image will
be displayed by default. (For very large images, this
may cause a crash, so using `-qc-seg` is highly
recommended.)
However, now that I look at sct_qc by comparison, it seems as though this -qc-seg option (as well as the default cropping behavior with the seg padding) has not been extended to the sct_qc script. I see that we have a longstanding issue to improve the QC report for sct_deepseg via sct_qc:
Thank you for clarifying! Glad to hear that this issue will be bumped in priority.
Do you know any temporary work-around to adjust cropping behavior for sct_qc while we await updates?
In the very short term, it is safe to modify the hard-coded radius value in SCT’s QC-generating source code to a larger value. The default radius is 15 (30x30 mosaic squares) while the default canal value is 27.