[Insight-users] Transform Mesh Filter
Federico J. Lopez Bertoni
fjlb at duke.edu
Mon Oct 13 18:28:50 EDT 2008
Hi all,
I'm trying to implement the itkTransformMeshFilter and i run into some
problems. I have a deformation field (bspline parameters from an image to
image registration) and I want to deform a mesh using the Bspline transform
and its final parameters. I also tried using an affine transform and it gave
me the same error on the .txx file. I tried the same thing using the
Identity Transform and the filter compiled with no problems. I was wondering
if I can get some help on what I'm doing wrong or just on how I can deform a
mesh using my registration results. I attached the code and the error below.
Thanks,
.txx line where error appears:
m_Transform->TransformPoint( inputPoint.Value() );
e:\Federico\CT\Source\Insight\Code\BasicFilters\itkTransformMeshFilter.txx(96)
: error C2664:
'itk::BSplineDeformableTransform<TScalarType,NDimensions,VSplineOrder>::OutputPointType
itk::BSplineDeformableTransform<TScalarType,NDimensions,VSplineOrder>::TransformPoint(const
itk::BSplineDeformableTransform<TScalarType,NDimensions,VSplineOrder>::InputPointType
&) const' : cannot convert parameter 1 from 'const
itk::MapContainer<TElementIdentifier,TElement>::Element' to 'const
itk::BSplineDeformableTransform<TScalarType,NDimensions,VSplineOrder>::InputPointType
&'
Here's the code:
typedef itk::BSplineDeformableTransform< CoordinateRepType,
SpaceDimension, SplineOrder > BsplineTransformType;
BsplineTransformType::Pointer bsplineFinalTransform =
BsplineTransformType::New();
RegistrationType2::ParametersType finalPar =
registration2->GetLastTransformParameters();
bsplineFinalTransform->SetParameters( finalPar );
//Transform Meshes
typedef itk::TransformMeshFilter< HeartMeshType, HeartMeshType,
BsplineTransformType > TransformHeartMeshFilterType;
TransformHeartMeshFilterType::Pointer transformHeartMesh =
TransformHeartMeshFilterType::New();
transformHeartMesh->SetInput( heartMesh );
transformHeartMesh->SetTransform( bsplineFinalTransform );
transformHeartMesh->Update();
The error:
e:\Federico\CT\Source\Insight\Code\BasicFilters\itkTransformMeshFilter.txx(96)
: error C2664:
'itk::BSplineDeformableTransform<TScalarType,NDimensions,VSplineOrder>::OutputPointType
itk::BSplineDeformableTransform<TScalarType,NDimensions,VSplineOrder>::TransformPoint(const
itk::BSplineDeformableTransform<TScalarType,NDimensions,VSplineOrder>::InputPointType
&) const' : cannot convert parameter 1 from 'const
itk::MapContainer<TElementIdentifier,TElement>::Element' to 'const
itk::BSplineDeformableTransform<TScalarType,NDimensions,VSplineOrder>::InputPointType
&'
with
[
TScalarType=CoordinateRepType,
NDimensions=3,
VSplineOrder=3
]
and
[
TElementIdentifier=itk::DefaultDynamicMeshTraits<float,3,3>::PointIdentifier,
TElement=itk::DefaultDynamicMeshTraits<float,3,3>::PointType
]
and
[
TScalarType=CoordinateRepType,
NDimensions=3,
VSplineOrder=3
]
Reason: cannot convert from 'const
itk::MapContainer<TElementIdentifier,TElement>::Element' to 'const
itk::BSplineDeformableTransform<TScalarType,NDimensions,VSplineOrder>::InputPointType'
with
[
TElementIdentifier=itk::DefaultDynamicMeshTraits<float,3,3>::PointIdentifier,
TElement=itk::DefaultDynamicMeshTraits<float,3,3>::PointType
]
and
[
TScalarType=CoordinateRepType,
NDimensions=3,
VSplineOrder=3
]
No constructor could take the source type, or constructor overload
resolution was ambiguous
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\xtree(267) : while compiling class-template member function
'void
itk::TransformMeshFilter<TInputMesh,TOutputMesh,TTransform>::GenerateData(void)'
with
[
TInputMesh=HeartMeshType,
TOutputMesh=HeartMeshType,
TTransform=TransformType3
]
\Federico\CT\C\DeformHeart3D\DeformHeart3D.cxx(467) : see reference
to class template instantiation
'itk::TransformMeshFilter<TInputMesh,TOutputMesh,TTransform>' being compiled
with
[
TInputMesh=HeartMeshType,
TOutputMesh=HeartMeshType,
TTransform=TransformType3
]
--
Federico J. Lopez Bertoni
Graduate Research Assistant
Duke University
Department of Biomedical Engineering
Office: 1373 CIEMAS
Phone: 919-660-5125
fjlb at duke.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20081013/0cf34069/attachment.htm>
More information about the Insight-users
mailing list