[Insight-users] using itkGradientVectorFlowFilter

Pieter Vos pieterv@radiology.azn.nl
Mon, 15 Apr 2002 11:06:51 +0200 (CEST)


Hello,

As a gradient input for the deformable model I would like to use the
itkGradientVectorFlowFilter. However, when calling the constructor I get a
lot of error which go back to the .txx-file. Could it be that the class
is still under construction? Is there an example available which explains
the use of the class? 
I am working on a Linux machine and use the most updated version of itk.

Thanks for the help.
----------------------------

This is the the code:

  const unsigned int myDimension = 3;
  typedef itk::Image<double, myDimension>	myImageType;

  typedef itk::CovariantVector<double, myDimension> myGradientType;
  typedef itk::Image<myGradientType, myDimension>  myGradientImageType;

  typedef itk::GradientVectorFlowImageFilter <
  					myImageType ,
					myGradientImageType > 
					myVectorFlowFilter;
				
  myVectorFlowFilter::Pointer vectorFlowFilter=myVectorFlowFilter::New();

This is the error:

/data/cemri/Insight/Code/Algorithms/itkGradientVectorFlowImageFilter.txx: In
method `void
itk::GradientVectorFlowImageFilter<TInputImage,
TOutputImage>::InitInterImage () [with TInputImage =
myImageType, TOutputImage = myGradientImageType]':
/data/cemri/Insight/Code/Algorithms/itkGradientVectorFlowImageFilter.txx:43:   instantiated
from `itk::GradientVectorFlowImageFilter<TInputImage,
TOutputImage>::GenerateData () [with TInputImage = myImageType,
TOutputImage = myGradientImageType]'
/usr/include/g++-3/std/ldcomplex.h:74:   instantiated from here
/data/cemri/Insight/Code/Algorithms/itkGradientVectorFlowImageFilter.txx:79: cannot
convert `const
itk::Image<double, 3> *' to `myImageType *' for argument `1' to
`itk::SimpleImageRegionIterator<TImage>::SimpleImageRegionIterator (TImage
*, typename
TImage::RegionType &) [with TImage = myImageType]'
/data/cemri/Insight/Code/Algorithms/itkGradientVectorFlowImageFilter.txx:43:   instantiated
from `itk::GradientVectorFlowImageFilter<TInputImage,
TOutputImage>::GenerateData () [with TInputImage = myImageType,
TOutputImage = myGradientImageType]'
/usr/include/g++-3/std/ldcomplex.h:74:   instantiated from here
/data/cemri/Insight/Code/Algorithms/itkGradientVectorFlowImageFilter.txx:82: no
matching function for
call to
`itk::SimpleImageRegionIterator<myImageType>::SimpleImageRegionIterator
(itk::SmartPointer<itk::Image<myGradientType, 3> > &, const
itk::ImageRegion<3> &)'
/data/cemri/Insight/Code/Common/itkSimpleImageRegionIterator.h:119: candidates
are:
itk::SimpleImageRegionIterator<TImage>::SimpleImageRegionIterator () [with
TImage = myImageType]
/data/cemri/Insight/Code/Common/itkSimpleImageRegionIterator.h:124:
itk::SimpleImageRegionIterator<TImage>::SimpleImageRegionIterator (TImage
*, typename
TImage::RegionType &) [with TImage = myImageType]
/data/cemri/Insight/Code/Common/itkSimpleImageRegionIterator.h:133:
itk::SimpleImageRegionIterator<TImage>::SimpleImageRegionIterator (const
itk::ImageIteratorWithIndex<TImage> &) [with TImage = myImageType]
/data/cemri/Insight/Code/Common/itkSimpleImageRegionIterator.h:88:
itk::SimpleImageRegionIterator<myImageType>::SimpleImageRegionIterator
(const
itk::SimpleImageRegionIterator<myImageType> &)
/data/cemri/Insight/Code/Algorithms/itkGradientVectorFlowImageFilter.txx:43:   instantiated
from `itk::GradientVectorFlowImageFilter<TInputImage,
TOutputImage>::GenerateData () [with TInputImage = myImageType,
TOutputImage = myGradientImageType]'
/usr/include/g++-3/std/ldcomplex.h:74:   instantiated from here
/data/cemri/Insight/Code/Algorithms/itkGradientVectorFlowImageFilter.txx:94: invalid
types `double[int]' for array subscript



-- 
Pieter Vos
UMZ Radboud Nijmegen
The Netherlands
mailto:pieterv@radiology.azn.nl