Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

niftiread(): rescaling phase in Matlab to [-pi,pi] #91

Open
rtopfer opened this issue May 25, 2020 · 2 comments
Open

niftiread(): rescaling phase in Matlab to [-pi,pi] #91

rtopfer opened this issue May 25, 2020 · 2 comments

Comments

@rtopfer
Copy link
Contributor

rtopfer commented May 25, 2020

A function is needed to shift+rescale phase images and recast to double from int16,
i.e. to perform what this bit of code in MaRdI does for DICOM's

  • info = niftiinfo( phase.nii ) ; : the info struct generally contains .MultiplicativeScaling and .AdditiveOffset fields which are probably needed
  • question: Will the conversion formula be consistent across sites/sequences? The last paragraph in Processing Steps - Step 2 on the FSL/FUGUE page suggests it would not; in which case, we might want a site-specific configuration file for field mapping.
  • btw: @evaalonsoortiz i noticed acquisitions 09-10 from ACDC108p (your custom sequence) don't have the normal rescaling info in the phase dicom header (so, the converted nifti's don't have it either). I'm not sure if there is a way to consistently determine what the actual phase (in radians) is without that. i.e. if there are wraps, a priori: 0=-pi, and 4095=+pi; but if there aren't any wraps present (e.g. max raw phase = 2000) then i think it might be impossible to determine the correct range.
@evaalonsoortiz
Copy link
Member

@rtopfer Hmm ... strange that's missing. What is the header name? Are you sure the range varies per sequence? I thought it only varied according to the software version and/or vendor.

@rtopfer
Copy link
Contributor Author

rtopfer commented May 25, 2020

RescaleIntercept and RescaleSlope—tags: (0028,1052) and (0028,1053).

No idea whether it actually varies between sequences: I think it's been consistent across the few Siemens GRE sequences we've used but the disclaimer on the FSL/FUGUE page is disconcerting since obviously we want an automated solution for the rescaling and ideally that wouldn't require a massive if/else tree...

@rtopfer rtopfer mentioned this issue Jun 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants