Mingze101/CT-RATE-bucket / dataset /data_correction_note.md
Mingze101's picture
|
download
raw
2.51 kB

Data Correction Note

Note: Data correction applies only to CT-RATE (v1). In CT-RATE (v2), these corrections have already been applied, and the metadata from [train/validation]_metadata.csv has been embedded into the NIfTI headers.

1. Intensity Correction

The original DICOM images contained RescaleSlope and RescaleIntercept values required to reconstruct correct voxel intensities. During conversion to NIfTI format, this metadata was saved in [train/validation]_metadata.csv, and the NIfTI headers defaulted to scl_slope=1 and scl_inter=0, leading to shifted intensity values.

Applying window functions (e.g., for display) directly to the raw NIfTI voxel values without correcting for the missing intercept is not appropriate. While windowing can visually enhance contrast, it does not recover the true underlying voxel intensities.

Instructions:

  1. Open the [train/validation]_metadata.csv file.
  2. For each volume:
    • Find the corresponding RescaleSlope and RescaleIntercept values.
  3. Read the raw NIfTI file (e.g., using SimpleITK or nibabel).
  4. Apply the correction:
    • corrected_voxel = raw_voxel * RescaleSlope + RescaleIntercept
  5. Use the corrected voxel values for all subsequent processing and analysis.

2. Brain Scans

Some series in the dataset appear to be brain scans rather than chest CTs. 752 scans in the training set and 37 scans in the validation set have been identified.

The list of identified volumes is provided in no_chest_train.txt and no_chest_valid.txt.

3. Missing Z-spacing

Three images have missing z-spacing metadata, resulting in a NaN z-spacing when loaded. While voxel values are unaffected, SimpleITK issues a warning during construction of the direction matrix due to invalid spacing:

/tmp/SimpleITK-build/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_svd.hxx: suspicious return value (3) from SVDC
/tmp/SimpleITK-build/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_svd.hxx: M is 3x3
M = [
-0.2812500000000                0              nan
               0 -0.2811816192560              nan
               0                0              nan
]

Affected volumes:

  • train_1267/train_1267_a/train_1267_a_4.nii.gz
  • train_11755/train_11755_a/train_11755_a_3.nii.gz
  • train_11755/train_11755_a/train_11755_a_4.nii.gz

Manual assignment of a valid z-spacing is required for spatial operations (e.g., resampling or registration).

Xet Storage Details

Size:
2.51 kB
·
Xet hash:
04beef8ec305ae3e8d03215b46f8ea022af5536e08716a5f98e9b4ac15962171

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.