Skip to content

Conversation

@mguaypaq
Copy link
Member

Images supplied by @renelabounek (thanks!)

Fixes #146.

@mguaypaq mguaypaq requested a review from valosekj August 17, 2023 16:04
@valosekj
Copy link
Contributor

valosekj commented Aug 17, 2023

Thanks for the push @mguaypaq!

I visually checked a few subjects in FSLeyes, and I also checked the orientation. The re-defaced images correspond with the original images 👍🏻

However, I noticed that some of the re-defaced images have changed intensity range:

$ cd data-multi-subject

# master branch
$ fslstats sub-fslAchieva02/anat/sub-fslAchieva02_T1w.nii.gz -R
0.000000 4022.933105

# mgp/redefaced branch
$ git fetch
$ git checkout mgp/redefaced
$ git pull && git annex get .
$ fslstats sub-fslAchieva02/anat/sub-fslAchieva02_T1w.nii.gz -R
0.000000 3219834.250000

The data type is the same for both:

# master branch
$ sct_image -i sub-fslAchieva02/anat/sub-fslAchieva02_T1w.nii.gz -header | grep data_type                                              
data_type	FLOAT64                                                                                                                                                                                         

# mgp/redefaced branch
$ sct_image -i sub-fslAchieva02/anat/sub-fslAchieva02_T1w.nii.gz -header | grep data_type                                      
data_type	FLOAT64

And both images look identical in FSLeyes. So I wonder if this is a problem.

Kapture 2023-08-17 at 17 29 44

@mguaypaq
Copy link
Member Author

Ultimately, I don't know whether the difference in intensity range is a problem. But, I did look at the old and new versions of sub-fslAchieva02/anat/sub-fslAchieva02_T1w.nii.gz, and this is what I noticed:

  • The affines (both the sform and the qform) between the two versions are very slightly different (probably not a problem?)
  • The descrip header field is different, but probably not useful anyway (old: TE=3.6;Time=154907.020, looks like metadata; new: 6.0.4:ddd0a010, looks like a software version).
  • After rescaling the new image from the range [0, 3219834] to the range [0, 4023], the absolute difference outside of the re-faced region seems to be less than 40, that is, less than 1% of the max intensity.

Copy link
Contributor

@valosekj valosekj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @mguaypaq! Very sorry, this PR slipped through the cracks...

I can see on the 2023-09-07 SCT dev meeting agenda that we concluded that rescaling is not necessary, but should be documented in changelog (no dtype change, intensities rescaled for some images).

@mguaypaq mguaypaq merged commit 377bb5d into master Dec 12, 2023
@mguaypaq mguaypaq deleted the mgp/redefaced branch December 12, 2023 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update T1w scans with re-defaced images

3 participants