[Insight-users] Deformable3DFilterType??????????
Waltraud Henrich
henrich@ira.uka.de
Sat, 30 Nov 2002 18:07:01 +0100
Hallo,
I have made a download of the new ITK version. I work with the
Deformable3DFilterType , but I have the following mistake:
SnakeModel.cpp
c:\development\itk\code\algorithms\itkdeformablemesh3dfilter.txx(436) :
error C2664: 'SetCell' : Konvertierung des Parameters=20
2 von 'class itk::AutoPointer<class itk::CellInterface<double,class
itk::CellTraitsInfo<3,float,float,unsigned long,unsigne
d long,unsigned long,class itk::Point<float,3>,class
itk::VectorContainer<unsigned long,class itk::Point<float,3> >,class=20
std::set<unsigned long,struct std::less<unsigned long>,class
std::allocator<unsigned long> > > > >' in 'class itk::AutoPointer<
class itk::CellInterface<float,class
itk::CellTraitsInfo<3,float,float,unsigned long,unsigned long,unsigned
long,class=20
itk::Point<float,3>,class itk::VectorContainer<unsigned long,class
itk::Point<float,3> >,class std::set<unsigned long,struct std::
less<unsigned long>,class std::allocator<unsigned long> > > > > &' =
nicht
moeglich
Ein Verweis, der nicht auf ein 'const' zeigt, kann nicht an =
einen
Wert gebunden werden, bei dem es sich nicht um einen=20
L-Wert handelt
c:\programme\microsoft visual studio\vc98\include\xtree(559) : =
Bei
der Kompilierung der Member-Funktion 'void=20
__thiscall itk::DeformableMesh3DFilter<class itk::Mesh<float,3,class
itk::DefaultStaticMeshTraits<float,3,3,float,float,float>=20
>,cl
ass itk::Mesh<float,3,class
itk::DefaultStaticMeshTraits<float,3,3,float,float,float> >
>::ComputeOutput(void)' der=20
Klassenvorlage
Fehler beim Ausf=FChren von cl.exe.
mediframe.exe - 1 Fehler, 0 Warnung(en)
and I don't know why this happens.
I add my code.
I want to thanks for your help in advance.
Waltraut Henrich
typedef itk::DeformableMesh3DFilter<floatMesh,floatMesh>
Deformable3DFilterType;
typedef Deformable3DFilterType::GradientImageType GradientImageType;
typedef itk::GradientRecursiveGaussianImageFilter< myImageType,
GradientImageType > GradientImageFilterType;
typedef itk::SphereSource<floatMesh> FloatSphereSource;
typedef SimpleSphereSource::OPointType OPointType;
FloatSphereSource::Pointer m_spheresource =3D =
FloatSphereSource::New();
OPointType m_spherecenter;
OPointType m_scale;
m_spherecenter[0] =3D (double) SEEDX;
m_spherecenter[1] =3D (double) SEEDY;
m_spherecenter[2] =3D (double) SEEDZ;
m_scale[0] =3D 10;
m_scale[1] =3D 10;
m_scale[2] =3D 10;
m_spheresource->SetCenter(m_spherecenter);
m_spheresource->SetScale(scale);
m_spheresource->SetResolutionX(20);
m_spheresource->SetResolutionY(20);
m_spheresource->SetSquareness1(1);
m_spheresource->SetSquareness2(1);
m_spheresource->Update();
GradientImageFilterType::Pointer gradient =3D =
GradientImageFilterType::New();
gradient->SetInput(itkImporter->GetOutput());
gradient->SetSigma(3.0);
gradient->Update();
double m_stiff[2];
m_stiff[0]=3D0.00001;
m_stiff[1]=3D0.04;
myIndexType m_center=3D{{SEEDX, SEEDY, SEEDZ}};
Deformable3DFilterType::Pointer m_bfilter =3D =
Deformable3DFilterType::New();
m_bfilter->SetCenter(m_center);
m_bfilter->SetStiffness(m_stiff);
m_bfilter->SetTimeStep(0.002);
m_bfilter->SetStepThreshold(2);
m_bfilter->SetGradient(gradient->GetOutput());
m_bfilter->SetInput(m_spheresource->GetOutput()); //ok die Anfangsnetz
setzen
m_bfilter->Update();