[Insight-users] itkGradientVectorFlowImageFilter problems at compilation
Julien Mercenier
itk_julienmercenier at hotmail.com
Sun, 11 Apr 2004 18:53:00 +0200
This is a multi-part message in MIME format.
------=_NextPart_000_0005_01C41FF6.360DB3A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi everyone,
I've got problems with itkGradientVectorFlowImageFilter.
I've tried many things but do not understand the error =
message.
Here is the part of my code related to this filter :
#include "itkGradientMagnitudeRecursiveGaussianImageFilter.h" //egdes =
#include "itkGradientVectorFlowImageFilter.h"
#include "itkImage.h"
#include "itkCovariantVector.h"
#include "itkImageFileReader.h"=20
#include "itkRescaleIntensityImageFilter.h"
#include "itkPoint.h"
main...
...
const unsigned int Dimension =3D 3; =20
typedef double PixelType;=20
typedef itk::Image<PixelType, Dimension> ImageType;=20
typedef itk::CovariantVector< double, Dimension > GradientPixelType;
typedef itk::Image< GradientPixelType, Dimension > GradientImageType;
=20
typedef =
itk::GradientMagnitudeRecursiveGaussianImageFilter<ImageType,ImageType> =
=20
GradientMagnitudeFilterType;
typedef itk::GradientVectorFlowImageFilter<ImageType, =
GradientImageType>
GradientVectorFlowFilterType;
=20
typedef itk::ImageFileReader< ImageType > ReaderType;
ReaderType::Pointer imageReader =3D ReaderType::New();
imageReader->SetFileName( "cible2.img");
=20
GradientMagnitudeFilterType::Pointer gradientMagnitudeFilter =
=20
=3D GradientMagnitudeFilterType::New();
GradientVectorFlowFilterType::Pointer gradientVectorFlowFilter
=3D GradientVectorFlowFilterType::New();
gradientMagnitudeFilter->SetInput( imageReader->GetOutput() );=20
gradientMagnitudeFilter->SetSigma( 1.0 );
gradientVectorFlowFilter->SetInput( =
gradientMagnitudeFilter->GetOutput());
gradientVectorFlowFilter->SetTimeStep(1.0);
gradientVectorFlowFilter->SetNoiseLevel(0.1);
gradientVectorFlowFilter->SetIterationNum(20);
gradientVectorFlowFilter->Update();
the first lignes of the error message is :
--------------------Configuration: ferrantsansfixeGVF - Win32 =
Debug--------------------
Compiling...
ferrantsansfixeGVF.cxx
J:\Documents and Settings\Administrateur\Mes =
documents\cours\TFE\ITK\Code\Algorithms\itkGradientVectorFlowImageFilter.=
txx(115) : error C2109: subscript requires array or pointer type
J:\Documents and Settings\Administrateur\Mes =
documents\cours\TFE\ITK\Code\Common\itkSize.h(177) : while compiling =
class-template member function 'void __thiscall =
itk::GradientVectorFlowImageFilter<class itk::Image<double,3>,class =
itk::Image<
class itk::CovariantVector<double,3>,3> >::InitInterImage(void)'
J:\Documents and Settings\Administrateur\Mes =
documents\cours\TFE\ITK\Code\Algorithms\itkGradientVectorFlowImageFilter.=
txx(135) : error C2109: subscript requires array or pointer type
J:\Documents and Settings\Administrateur\Mes =
documents\cours\TFE\ITK\Code\Common\itkSize.h(177) : while compiling =
class-template member function 'void __thiscall =
itk::GradientVectorFlowImageFilter<class itk::Image<double,3>,class =
itk::Image<
class itk::CovariantVector<double,3>,3> >::InitInterImage(void)'
Thanks in advance for your answers...
Best regards.
Julien, Belgium.
------=_NextPart_000_0005_01C41FF6.360DB3A0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi everyone,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> =20
I've got problems with=20
itkGradientVectorFlowImageFilter.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =20
I've tried many things but do not understand the =
error=20
message.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Here is the part of my code =
related to this=20
filter :</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>#include=20
"itkGradientMagnitudeRecursiveGaussianImageFilter.h" =
//egdes=20
<BR>#include "itkGradientVectorFlowImageFilter.h"</FONT></DIV><FONT =
face=3DArial=20
size=3D2>
<DIV><BR>#include "itkImage.h"</DIV>
<DIV> </DIV>
<DIV>#include "itkCovariantVector.h"</DIV>
<DIV> </DIV>
<DIV>#include "itkImageFileReader.h" </DIV>
<DIV> </DIV>
<DIV>#include "itkRescaleIntensityImageFilter.h"</DIV>
<DIV> </DIV>
<DIV>#include "itkPoint.h"</DIV>
<DIV> </DIV>
<DIV><STRONG>main</STRONG>...</DIV>
<DIV> ...</DIV>
<DIV> </DIV>
<DIV> const unsigned int =20
Dimension =3D 3; <BR> typedef =20
double PixelType;=20
<BR> typedef itk::Image<PixelType,=20
Dimension> ImageType; </DIV>
<DIV> </DIV>
<DIV> typedef itk::CovariantVector< double, Dimension > =
GradientPixelType;<BR> typedef itk::Image< GradientPixelType, =
Dimension=20
> GradientImageType;<BR> <BR> typedef=20
itk::GradientMagnitudeRecursiveGaussianImageFilter<ImageType,ImageType=
> =20
<BR> GradientMagnitudeFilterType;<BR> typedef=20
itk::GradientVectorFlowImageFilter<ImageType,=20
GradientImageType><BR> GradientVectorFlowFilterType;<BR>&nb=
sp;=20
<BR> typedef itk::ImageFileReader<=20
ImageType > =20
ReaderType;<BR> ReaderType::Pointer &nb=
sp;=20
imageReader =3D ReaderType::New();</DIV>
<DIV> </DIV>
<DIV> imageReader->SetFileName( "cible2.img");<BR> =20
<BR> GradientMagnitudeFilterType::Pointer =20
gradientMagnitudeFilter &n=
bsp; &nb=
sp; &nbs=
p; =20
<BR> =3D GradientMagnitudeFilterType::New();</DIV>
<DIV> </DIV>
<DIV> GradientVectorFlowFilterType::Pointer=20
gradientVectorFlowFilter<BR> =3D=20
GradientVectorFlowFilterType::New();</DIV>
<DIV> </DIV>
<DIV> gradientMagnitudeFilter->SetInput( =
imageReader->GetOutput() );=20
<BR> gradientMagnitudeFilter->SetSigma( 1.0 );</DIV>
<DIV> </DIV>
<DIV> gradientVectorFlowFilter->SetInput(=20
gradientMagnitudeFilter->GetOutput());<BR> gradientVectorFlowFilt=
er->SetTimeStep(1.0);<BR> gradientVectorFlowFilter->SetNoiseLe=
vel(0.1);<BR> gradientVectorFlowFilter->SetIterationNum(20);<BR><=
BR> gradientVectorFlowFilter->Update();</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>the first lignes of the error message is :</DIV>
<DIV> </DIV>
<DIV>--------------------Configuration: ferrantsansfixeGVF - Win32=20
Debug--------------------<BR>Compiling...<BR>ferrantsansfixeGVF.cxx<BR>J:=
\Documents=20
and Settings\Administrateur\Mes=20
documents\cours\TFE\ITK\Code\Algorithms\itkGradientVectorFlowImageFilter.=
txx(115)=20
: error C2109: subscript requires array or pointer=20
type<BR> J:\Documents and=20
Settings\Administrateur\Mes =
documents\cours\TFE\ITK\Code\Common\itkSize.h(177) :=20
while compiling class-template member function 'void __thiscall=20
itk::GradientVectorFlowImageFilter<class =
itk::Image<double,3>,class=20
itk::Image<<BR>class itk::CovariantVector<double,3>,3>=20
>::InitInterImage(void)'</DIV>
<DIV>J:\Documents and Settings\Administrateur\Mes=20
documents\cours\TFE\ITK\Code\Algorithms\itkGradientVectorFlowImageFilter.=
txx(135)=20
: error C2109: subscript requires array or pointer=20
type<BR> J:\Documents and=20
Settings\Administrateur\Mes =
documents\cours\TFE\ITK\Code\Common\itkSize.h(177) :=20
while compiling class-template member function 'void __thiscall=20
itk::GradientVectorFlowImageFilter<class =
itk::Image<double,3>,class=20
itk::Image<<BR>class itk::CovariantVector<double,3>,3>=20
>::InitInterImage(void)'</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Thanks in advance for your answers...</DIV>
<DIV> </DIV>
<DIV> Best=20
regards.</DIV>
<DIV> </DIV>
<DIV> Julien, Belgium.</FONT></DIV></BODY></HTML>
------=_NextPart_000_0005_01C41FF6.360DB3A0--