[Insight-users] changing the type of image.

Arindam Bhattacharya arindamb86 at gmail.com
Tue Jun 5 12:34:04 EDT 2012


hi ,

I am working on a gradient of a 3-dimensional image which is stored
in nrrd format
here is the header

type: float
dimension: 4
sizes: 3 100 100 100
spacings: 1 1 1 1
endian: little
encoding: raw
ijkDatasetType:=annulusGradients
center:=50 50 50
annulusAxisDirection:=1 1 0
radius:=20
ratioHeightToWidth:=1
handleGradientDiscontinuity:=setToZero


i wish to apply the itk::VectorGradientAnisotropicDiffusionImageFilter
to it ,  the documentation states that this vector only takes in
vector image , so I would like to convert this to may be something of
type

typedef itk::Image< itk::Vector<float, 3>, 3 >  FloatImageType;

after reading it as type

typedef itk::Image< float, 4 >  FloatImageType;

which i presume the filter will accept

i am looking at iterator examples , but was hoping there is some
easier way to do this.
thanks for the help
-- 
Arindam


More information about the Insight-users mailing list