[Insight-developers] NRRD Image Format (and tensor estimation thereafter?)

Gordon Kindlmann gk at bwh.harvard.edu
Fri Dec 2 03:08:19 EST 2005


hello,

Which version of ITK are you using?
The most general handling of NRRD files was added by me prior to the  
2.2 release.

Are you reading the file as a scalar image?
I am guessing this may be the problem.

I believe you can follow the example of:
Insight/Testing/Code/IO/itkNrrdVectorImageReadTest.cxx

which uses a itk::Vector<float, N> PixelType for which the length N  
is known at compile time,

or the example of:
Insight/Testing/Code/Common/itkVectorImageTest.cxx

which uses VectorImage<float, D> image type for which the image  
dimension D is known at compile time, but the length (number of  
values per sample) can be set at run-time, based on a read file.

However, others more knowledgeable than I can chime in with further  
details on the use of VectorImage, also new with ITK 2.2.

Once you have DWIs loaded in, you probably want to do tensor  
estimation.  I am not sure what the current status of ITK-based  
tensor estimation is, specifically, can it work with VectorImages?

Gordon


On Dec 1, 2005, at 10:50 AM, Vincent A. Magnotta wrote:

> I am trying to use the NRRD format to store diffusion weighted  
> images. I
> have been using the information provided on the NA-MIC website:
>
> http://www.na-mic.org/Wiki/index.php/NAMIC_Wiki%3ADTI%3ATensor_format
>
> It appears that the ITK implementation for diffusion weighted images
> does not work properly. From just a first pass analysis, it seems that
> if the NRRD file describes an image that is 4D, but it only has three
> spatial dimensions, the 4th dimension upon loading the images has a  
> size
> of only 1. I have a very small image example that illustrates the
> problem that is attached. When I print out the image after loading  
> it, I
> get the following information:
>
>
> Image (0x84e5bd8)
>   RTTI typeinfo:   itk::Image<short, 4>
>   Reference Count: 2
>   Modified Time: 131
>   Debug: Off
>   Observers:
>     none
>   Source: (none)
>   Source output index:  0
>   Release Data: Off
>   Data Released: False
>   Global Release Data: Off
>   PipelineMTime: 11
>   UpdateMTime: 130
>   LargestPossibleRegion:
>     Dimension: 4
>     Index: [0, 0, 0, 0]
>     Size: [2, 2, 2, 1]
>   BufferedRegion:
>     Dimension: 4
>     Index: [0, 0, 0, 0]
>     Size: [2, 2, 2, 1]
>   RequestedRegion:
>     Dimension: 4
>     Index: [0, 0, 0, 0]
>     Size: [2, 2, 2, 1]
>   Spacing: [2, 2.5, 2, 1]
>   Origin: [0, 0, 0, 0]
>   Direction:
> -1 0 0 0
> 0 -1 0 0
> 0 0 1 0
> 0 0 0 1
>
> I will look into this some more over the next couple of days, but I
> thought that I would post it here as well. I am just getting familiar
> with the format, so if anyone else has suggestions they would be
> helpful.
>
> Vince
>
>
>
> -- 
> Assistant Professor
> Department of Radiology
> 0453-D JCP
> 200 Hawkins Drive
> Iowa City, IA 52242
> E-mail: vincent-magnotta at uiowa.edu
> Phone: 319-356-8255
> Fax: 319-353-6275
> Website: http://www.radiology.uiowa.edu
> <tmp.img>
> <tmp.nhdr>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers



More information about the Insight-developers mailing list