<div>Hi Tomáš and Luis,</div>
<div><strong></strong> </div>
<div>Thank you so much. It works! I changed the declaration of PointSet from</div>
<div>//typedef itk::PointSet< double, Dimension > PointSetType;</div>
<div>to:<br>typedef itk::PointSet<double,Dimension, itk::DefaultStaticMeshTraits<double,Dimension,Dimension,double, double>> PointSetType;</div>
<div>And use Method 2: : Use TransformPoint() for each individual point.</div>
<div>It seems more changes (which I don't know) need to be made if I want to use Method 1.</div>
<div> </div>
<div>Regards,</div>
<div>Steven<br> </div>
<div><br><br> </div>
<div><span class="gmail_quote">On 9/4/07, <b class="gmail_sendername">Tomáš Kazmar</b> <<a href="mailto:Tomash.Kazmar@seznam.cz">Tomash.Kazmar@seznam.cz</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi Steven,<br><br>think I found the solution: PointSet<PixelType, Dimension> takes its definition<br>
of PointType and PointContainer from<br>DefaultStaticMeshTraits<PixelType,Dimension,Dimension>. The problem is that<br>such DefaultStaticMeshTraits is in fact<br>DefaultStaticMeshTraits<PixelType,Dimension,Dimension,float,float,PixelType>
<br>where the first of the two floats is the source of your problem.<br><br>Define PointSet with explicit MeshTraits template parameter, eg. like this:<br><br>typedef itk::PointSet<double,2,itk::DefaultStaticMeshTraits<double,2,2,double>> PointSetType;
<br><br>This way the PointSet will use double for its TCoordRep.<br><br>Regards,<br>Tomas<br><br><br># ------------ Původní zpráva ------------<br># Od: Steven ITK <<a href="mailto:itklearner@gmail.com">itklearner@gmail.com
</a>><br># Předmět: Re: [Insight-users] About TransformPoint<br># Datum: 04.9.2007 08:11:17<br># ----------------------------------------<br># Hi Luis,<br>#<br># Maybe the following is the full error message:<br># //+++++++++++++++++++++++++++++++++++
<br># for Method 1: Use TransformMeshFilter<PointSetType, PointSetType,<br># TransformType><br># 1>c:\steven\installation\itk\insighttoolkit-<br># 3.2.0\code\basicfilters\itktransformmeshfilter.txx(95) : error C2664:
<br># 'itk::MatrixOffsetTransformBase<TScalarType,NInputDimensions,NOutputDimensions>::TransformPoint'<br># : cannot convert parameter 1 from 'const<br># itk::Point<TCoordRep,NPointDimension>' to 'const
<br># 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<br># itk::Point<TCoordRep,NPointDimension>' to 'const<br># 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<br># this conversion, or the operator cannot be called<br># 1> c:\steven\installation\itk\insighttoolkit-
<br># 3.2.0\code\basicfilters\itktransformmeshfilter.txx (60) : while compiling<br># class template member function 'void<br># 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
<br># template instantiation<br># 'itk::TransformMeshFilter<TInputMesh,TOutputMesh,TTransform>' being compiled<br>#<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-<br># 3.2.0\code\basicfilters\itktransformmeshfilter.txx(105) : error C2039:
<br># '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-<br># 3.2.0\code\basicfilters\itktransformmeshfilter.txx(105) : error C2039:<br># '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-<br># 3.2.0\code\basicfilters\itktransformmeshfilter.txx
(107) : error C2039:<br># '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-<br># 3.2.0\code\basicfilters\itktransformmeshfilter.txx(107) : error C2039:<br># '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-<br># 3.2.0\code\basicfilters\itktransformmeshfilter.txx
(108) : error C2039:<br># '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-<br># 3.2.0\code\basicfilters\itktransformmeshfilter.txx(108) : error C2039:<br># '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-<br># 3.2.0\code\basicfilters\itktransformmeshfilter.txx
(111) : error C2039:<br># 'MaxTopologicalDimension' : is not a member of<br># '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-<br># 3.2.0\code\basicfilters\itktransformmeshfilter.txx(111) : error C2065:<br># 'MaxTopologicalDimension' : undeclared identifier
<br># 1>c:\steven\installation\itk\insighttoolkit-<br># 3.2.0\code\basicfilters\itktransformmeshfilter.txx(115) : error C2039:<br># 'SetBoundaryAssignments' : is not a member of<br># '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-<br># 3.2.0\code\basicfilters\itktransformmeshfilter.txx
(116) : error C2039:<br># 'GetBoundaryAssignments' : is not a member of<br># '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:<br># 'itk::MatrixOffsetTransformBase<TScalarType,NInputDimensions,NOutputDimensions>::TransformPoint'
<br># : cannot convert parameter 1 from 'PointType' to 'const<br># 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<br># 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<br># 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<br># 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>#<br>#<br></blockquote></div><br>