Skip to content

sci-colorado/sub-5740_T2w.nii.gz - weird intensity range #59

@valosekj

Description

@valosekj

The sci-colorado/sub-5740/anat/sub-5740_T2w.nii.gz image has a weird intensity range:

$ fslstats sub-5740_T2w.nii.gz -R
-32767.000000 32516.000000

This results in a "gray nothing" when opening the image in FSLeyes:

image

When manually adjusting the min and max to 0-1000 interval, the image looks good:

image

The weird intensity range results in the failure of sct_deepseg_sc:

$ sct_deepseg_sc -i sub-5740_T2w.nii.gz -c t2 -kernel 2d 

--
Spinal Cord Toolbox (git-jv/sct_analyze_lesion_improvements-16742e4eada8e9853993e61fe4ce559767d4f42a*)

sct_deepseg_sc -i sub-5740_T2w.nii.gz -c t2 -kernel 2d
--

Config deepseg_sc:
  Centerline algorithm: svm
  Brain in image: True
  Kernel dimension: 2d
  Contrast: t2
  Threshold: 0.7
Creating temporary folder (/var/folders/w6/bnzr2qls11l69w0_8q95ghtr0000gn/T/sct_2023-09-11_10-43-36_deepseg-sc_sk1d9x5y)
Reorient the image to RPI, if necessary...
Finding the spinal cord centerline...
Creating temporary folder (/var/folders/w6/bnzr2qls11l69w0_8q95ghtr0000gn/T/sct_2023-09-11_10-43-37_optic-detect-centerline_8wgfjh8r)
/Users/valosek/code/sct_latest/spinalcordtoolbox/centerline/optic.py:102: RuntimeWarning: overflow encountered in short_scalars
  data_rescaled = img_data.astype('float') * (max_out - min_out) / (max_in - min_in)
To avoid intensity overflow due to convertion to +uint16+, intensity will be rescaled to the maximum quantization scale
Remove temporary files...
rm -rf /var/folders/w6/bnzr2qls11l69w0_8q95ghtr0000gn/T/sct_2023-09-11_10-43-37_optic-detect-centerline_8wgfjh8r
Cropping the image around the spinal cord...
Normalizing the intensity...
Segmenting the spinal cord using deep learning on 2D patches...
Reassembling the image...
Resampling the segmentation to the native image resolution using linear interpolation...
Spinal cord could not be detected for /Users/valosek/data/data.neuro.polymtl.ca/sci-colorado/sub-5740/anat/sub-5740_T2w.nii.gz
    EmptyArrayError: 'Spinal cord not detected. Please make sure that there is sufficient contrast between the spinal cord and CSF to ensure good results.'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions