<HTML>
<HEAD>
<TITLE>Re: [Insight-users] About TransformPoint</TITLE>
</HEAD>
<BODY>
<FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>Hi steven,<BR>
<BR>
As for the TransformMeshFilter, you have a lot of errors related to your using a pointset instead of a Mesh.<BR>
Typically, you should not be able to write this:<BR>
typedef itk::TransformMeshFilter<PointSetType, PointSetType, TransformType> TransformFilterType;<BR>
<BR>
You should write this instead<BR>
typedef itk::TransformMeshFilter<MeshType, MeshType, TransformType> TransformFilterType;<BR>
<BR>
You can mdify your code by creating a mesh, and using its SetPoints() method to attach your instance of a Poinset.<BR>
<BR>
You might want to instanciate the meshtraits manually to avoid the pointype problem.<BR>
<BR>
Alex.<BR>
<BR>
On 9/3/07 10:46 PM, "Steven ITK" <itklearner@gmail.com> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>Hi Luis,<BR>
<BR>
Maybe the following is the full error message:<BR>
//+++++++++++++++++++++++++++++++++++<BR>
for Method 1: Use TransformMeshFilter<PointSetType, PointSetType, TransformType><BR>
1>c:\steven\installation\itk\insighttoolkit-3.2.0\code\basicfilters\itktransformmeshfilter.txx(95) : error C2664: 'itk::MatrixOffsetTransformBase<TScalarType,NInputDimensions,NOutputDimensions>::TransformPoint' : cannot convert parameter 1 from 'const itk::Point<TCoordRep,NPointDimension>' to 'const itk::Point<TCoordRep,NPointDimension> &' <BR>
1> with<BR>
1> [<BR>
1> TScalarType=double,<BR>
1> NInputDimensions=3,<BR>
1> NOutputDimensions=3<BR>
1> ]<BR>
1> and<BR>
1> [<BR>
1> TCoordRep=float, <BR>
1> NPointDimension=3<BR>
1> ]<BR>
1> and<BR>
1> [<BR>
1> TCoordRep=double,<BR>
1> NPointDimension=3<BR>
1> ]<BR>
1> Reason: cannot convert from 'const itk::Point<TCoordRep,NPointDimension>' to 'const itk::Point<TCoordRep,NPointDimension>' <BR>
1> with<BR>
1> [<BR>
1> TCoordRep=float,<BR>
1> NPointDimension=3<BR>
1> ]<BR>
1> and<BR>
1> [<BR>
1> TCoordRep=double,<BR>
1> NPointDimension=3 <BR>
1> ]<BR>
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called<BR>
1> c:\steven\installation\itk\insighttoolkit-3.2.0\code\basicfilters\itktransformmeshfilter.txx (60) : while compiling class template member function 'void itk::TransformMeshFilter<TInputMesh,TOutputMesh,TTransform>::GenerateData(void)'<BR>
1> with<BR>
1> [<BR>
1> TInputMesh=PointSetType, <BR>
1> TOutputMesh=PointSetType,<BR>
1> TTransform=TransformType<BR>
1> ]<BR>
1> c:\steven\gdc\segmentation.cpp(1362) : see reference to class template instantiation 'itk::TransformMeshFilter<TInputMesh,TOutputMesh,TTransform>' being compiled <BR>
1> with<BR>
1> [<BR>
1> TInputMesh=PointSetType,<BR>
1> TOutputMesh=PointSetType,<BR>
1> TTransform=TransformType<BR>
1> ]<BR>
1>c:\steven\installation\itk\insighttoolkit- 3.2.0\code\basicfilters\itktransformmeshfilter.txx(105) : error C2039: 'SetCellLinks' : is not a member of 'itk::PointSet<TPixelType,VDimension>'<BR>
1> with<BR>
1> [<BR>
1> TPixelType=double, <BR>
1> VDimension=3<BR>
1> ]<BR>
1>c:\steven\installation\itk\insighttoolkit-3.2.0\code\basicfilters\itktransformmeshfilter.txx(105) : error C2039: 'GetCellLinks' : is not a member of 'itk::PointSet<TPixelType,VDimension>' <BR>
1> with<BR>
1> [<BR>
1> TPixelType=double,<BR>
1> VDimension=3<BR>
1> ]<BR>
1>c:\steven\installation\itk\insighttoolkit-3.2.0\code\basicfilters\itktransformmeshfilter.txx (107) : error C2039: 'SetCells' : is not a member of 'itk::PointSet<TPixelType,VDimension>'<BR>
1> with<BR>
1> [<BR>
1> TPixelType=double,<BR>
1> VDimension=3 <BR>
1> ]<BR>
1>c:\steven\installation\itk\insighttoolkit-3.2.0\code\basicfilters\itktransformmeshfilter.txx(107) : error C2039: 'GetCells' : is not a member of 'itk::PointSet<TPixelType,VDimension>' <BR>
1> with<BR>
1> [<BR>
1> TPixelType=double,<BR>
1> VDimension=3<BR>
1> ]<BR>
1>c:\steven\installation\itk\insighttoolkit-3.2.0\code\basicfilters\itktransformmeshfilter.txx (108) : error C2039: 'SetCellData' : is not a member of 'itk::PointSet<TPixelType,VDimension>'<BR>
1> with<BR>
1> [<BR>
1> TPixelType=double,<BR>
1> VDimension=3 <BR>
1> ]<BR>
1>c:\steven\installation\itk\insighttoolkit-3.2.0\code\basicfilters\itktransformmeshfilter.txx(108) : error C2039: 'GetCellData' : is not a member of 'itk::PointSet<TPixelType,VDimension>' <BR>
1> with<BR>
1> [<BR>
1> TPixelType=double,<BR>
1> VDimension=3<BR>
1> ]<BR>
1>c:\steven\installation\itk\insighttoolkit-3.2.0\code\basicfilters\itktransformmeshfilter.txx (111) : error C2039: 'MaxTopologicalDimension' : is not a member of 'itk::PointSet<TPixelType,VDimension>'<BR>
1> with<BR>
1> [<BR>
1> TPixelType=double,<BR>
1> VDimension=3 <BR>
1> ]<BR>
1>c:\steven\installation\itk\insighttoolkit-3.2.0\code\basicfilters\itktransformmeshfilter.txx(111) : error C2065: 'MaxTopologicalDimension' : undeclared identifier<BR>
1>c:\steven\installation\itk\insighttoolkit- 3.2.0\code\basicfilters\itktransformmeshfilter.txx(115) : error C2039: 'SetBoundaryAssignments' : is not a member of 'itk::PointSet<TPixelType,VDimension>'<BR>
1> with<BR>
1> [<BR>
1> TPixelType=double, <BR>
1> VDimension=3<BR>
1> ]<BR>
1>c:\steven\installation\itk\insighttoolkit-3.2.0\code\basicfilters\itktransformmeshfilter.txx(116) : error C2039: 'GetBoundaryAssignments' : is not a member of 'itk::PointSet<TPixelType,VDimension>' <BR>
1> with<BR>
1> [<BR>
1> TPixelType=double,<BR>
1> VDimension=3<BR>
1> ]<BR>
1>Build log was saved at "file://c:\Steven\GDC\Debug\BuildLog.htm "<BR>
1>GDC - 11 error(s), 0 warning(s)<BR>
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========<BR>
<BR>
//+++++++++++++++++++++++++++++++++++<BR>
<BR>
For Method 2: : Use TransformPoint for each individual point<BR>
1>c:\steven\gdc\GDC.cpp(1379) : error C2664: 'itk::MatrixOffsetTransformBase<TScalarType,NInputDimensions,NOutputDimensions>::TransformPoint' : cannot convert parameter 1 from 'PointType' to 'const itk::Point<TCoordRep,NPointDimension> &' <BR>
1> with<BR>
1> [<BR>
1> TScalarType=double,<BR>
1> NInputDimensions=3,<BR>
1> NOutputDimensions=3<BR>
1> ]<BR>
1> and<BR>
1> [<BR>
1> TCoordRep=double, <BR>
1> NPointDimension=3<BR>
1> ]<BR>
1> Reason: cannot convert from 'PointType' to 'const itk::Point<TCoordRep,NPointDimension>'<BR>
1> with<BR>
1> [ <BR>
1> TCoordRep=double,<BR>
1> NPointDimension=3<BR>
1> ]<BR>
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called <BR>
1>Build log was saved at "file://c:\Steven\GDC\Debug\BuildLog.htm"<BR>
//+++++++++++++++++++++++++++++++++++<BR>
<BR>
I noticed that in the error message for Method 1, one TCoordRep is float type,<BR>
1> and<BR>
1> [<BR>
1> TCoordRep=float,<BR>
1> NPointDimension=3<BR>
1> ]<BR>
<BR>
but I don't know what I should do to change it to double. <BR>
Thank you.<BR>
<BR>
Regards,<BR>
Steven<BR>
<BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="95%"></SPAN></FONT><FONT SIZE="2"><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:10.0px'>_______________________________________________<BR>
Insight-users mailing list<BR>
Insight-users@itk.org<BR>
<a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><BR>
</SPAN></FONT></FONT></BLOCKQUOTE><FONT SIZE="2"><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:10.0px'><BR>
</SPAN></FONT></FONT>
</BODY>
</HTML>