[Insight-users] deformable model and gradient vector

Akiko Campbell adcampbell at shaw.ca
Sat Mar 12 01:01:24 EST 2005


Hello,
 
I am trying to get the slight modification of ”DeformableModel1.cxx”
example working.  Instead of calculating gradient vectorfield with
itkGradientRecursiveGaussianImageFilter and
itkGradientMagnitudeRecursiveGaussianImageFilter as in
the”DeformableModel1.cxx” example, I have my own vectorfield I would
like to use for guiding the deformation of a surface (which I created as
a triangular mesh).  My vectorfield is defined as:
 
const unsigned int Dimension = 3;
typedef itk::Vector< double, Dimension > PixelType;
typedef itk::Image< PixelType, Dimension > ImageType;
ImageType::Pointer myImage = ImageType::New();
typedef itk::DeformableMesh3DFilter<MeshType,MeshType>
DeformableFilterType;
DeformableFilterType::Pointer deformableModelFilter =
DeformableFilterType::New();
 
When I try to set the gradient:
 
deformableModelFilter->SetGradient( myImage ); 
 
I get:
 
error C2664:
'itk::DeformableMesh3DFilter<TInputMesh,TOutputMesh>::SetGradient' :
cannot convert parameter 1 from
'itk::Image<TPixel,VImageDimension>::Pointer' to 'const
itk::DeformableMesh3DFilter<TInputMesh,TOutputMesh>::GradientImagePointe
r'
        with
        [
            TInputMesh=MeshType,
            TOutputMesh=MeshType
        ]
        and
        [
            TPixel=itk::Vector<double,3>,
            VImageDimension=3
        ]
        and
        [
            TInputMesh=MeshType,
            TOutputMesh=MeshType
        ]
 
This is probably caused by my vectorfield being not in the format
DeformableMesh3DFilter expects.  Is there any way I could incorporate my
own vectorfield into DeformableMesh3DFilter?  Thank you very much for
your help.
 
Akiko
 
 
 

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.2 - Release Date: 2005-03-11
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20050311/fb93a168/attachment.htm


More information about the Insight-users mailing list