Skip to content

Conversation

@moloney
Copy link
Contributor

@moloney moloney commented Nov 20, 2012

Interface to the "dcmstack" software.

Copy link
Member

Choose a reason for hiding this comment

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

could you add an example here along the following lines. this serves two purposes:

  • gives users a starting point on the website
  • allows a demo of how diffusion vectors from siemens files could be decoded
Example ------- >>> from nipype.interfaces.dcmstack import LookupMetaInputSpec >>> res = LookupMetaInputSpec(in_file='diffusion_with_meta.nii', meta_keys = {'bvecs': 'CsaImage.DIffusionGradientDIrection'}) 

also if you change meta_keys to a dict, that would allow a user to rename the internal name to a more sematically useful form

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like the idea of allowing the user to map the meta data to shorter more semantically meaningful names. I will work on this.

I will also work on an example, but I know very little about the details of DTI. In particular it seems you need to do something additional with the DIffusionGradientDIrection to get the "bvecs" output by dcm2nii. I don't want to make a misleading or incorrect example.

Copy link
Member

Choose a reason for hiding this comment

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

here is how nibabel does it for siemens.

https://github.com/nipy/nibabel/blob/master/nibabel/nicom/dicomreaders.py

and @rfdougherty just posted the ge version here:

https://github.com/cni/nims/blob/master/nimsutil/dicomutil.py

i think we could try to include bob's code in nibabel and then use that bit to do it for both siemens and ge. hopefully nolan can provide some info about philips.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The code in nibabel.nicom for Siemens DTI is not using the DiffusionGradientDirection at all, but rather computing the "q_vector" from the "B_matrix".

It would probably make more sense to define an interface specifically for getting this information, rather than trying to bake it into the generic LookupMeta interface (although I am open to suggestions).

Copy link
Member

Choose a reason for hiding this comment

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

indeed - perhaps bvecs was a bad choice as an example. but the mapping idea would then allow extracting information that could then be used to generate other pieces of info.

@chrisgorgo chrisgorgo merged commit fe16163 into nipy:master Dec 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants