[Insight-users] About TransformPoint

Alexandre GOUAILLARD hanfei at caltech.edu
Tue Sep 4 12:10:20 EDT 2007


Hi steven,

As for the TransformMeshFilter, you have a lot of errors related to your
using a pointset instead of a Mesh.
Typically, you should not be able to write this:
typedef itk::TransformMeshFilter<PointSetType, PointSetType, TransformType>
TransformFilterType;

You should write this instead
typedef itk::TransformMeshFilter<MeshType, MeshType, TransformType>
TransformFilterType;

You can mdify your code by creating a mesh, and using its SetPoints() method
to attach your instance of a Poinset.

You might want to instanciate the meshtraits manually to avoid the pointype
problem.

Alex.

On 9/3/07 10:46 PM, "Steven ITK" <itklearner at gmail.com> wrote:

> Hi Luis,
>  
> Maybe the following is the full error message:
> //+++++++++++++++++++++++++++++++++++
> for Method 1: Use TransformMeshFilter<PointSetType, PointSetType,
> TransformType>
> 1>c:\steven\installation\itk\insighttoolkit-3.2.0\code\basicfilters\itktransfo
> rmmeshfilter.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> &'
> 1>        with
> 1>        [
> 1>            TScalarType=double,
> 1>            NInputDimensions=3,
> 1>            NOutputDimensions=3
> 1>        ]
> 1>        and
> 1>        [
> 1>            TCoordRep=float,
> 1>            NPointDimension=3
> 1>        ]
> 1>        and
> 1>        [
> 1>            TCoordRep=double,
> 1>            NPointDimension=3
> 1>        ]
> 1>        Reason: cannot convert from 'const
> itk::Point<TCoordRep,NPointDimension>' to 'const
> itk::Point<TCoordRep,NPointDimension>'
> 1>        with
> 1>        [
> 1>            TCoordRep=float,
> 1>            NPointDimension=3
> 1>        ]
> 1>        and
> 1>        [
> 1>            TCoordRep=double,
> 1>            NPointDimension=3
> 1>        ]
> 1>        No user-defined-conversion operator available that can perform this
> conversion, or the operator cannot be called
> 1>        
> c:\steven\installation\itk\insighttoolkit-3.2.0\code\basicfilters\itktransform
> meshfilter.txx (60) : while compiling class template member function 'void
> itk::TransformMeshFilter<TInputMesh,TOutputMesh,TTransform>::GenerateData(void
> )'
> 1>        with
> 1>        [
> 1>            TInputMesh=PointSetType,
> 1>            TOutputMesh=PointSetType,
> 1>            TTransform=TransformType
> 1>        ]
> 1>        c:\steven\gdc\segmentation.cpp(1362) : see reference to class
> template instantiation
> 'itk::TransformMeshFilter<TInputMesh,TOutputMesh,TTransform>' being compiled
> 1>        with
> 1>        [
> 1>            TInputMesh=PointSetType,
> 1>            TOutputMesh=PointSetType,
> 1>            TTransform=TransformType
> 1>        ]
> 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>'
> 1>        with
> 1>        [
> 1>            TPixelType=double,
> 1>            VDimension=3
> 1>        ]
> 1>c:\steven\installation\itk\insighttoolkit-3.2.0\code\basicfilters\itktransfo
> rmmeshfilter.txx(105) : error C2039: 'GetCellLinks' : is not a member of
> 'itk::PointSet<TPixelType,VDimension>'
> 1>        with
> 1>        [
> 1>            TPixelType=double,
> 1>            VDimension=3
> 1>        ]
> 1>c:\steven\installation\itk\insighttoolkit-3.2.0\code\basicfilters\itktransfo
> rmmeshfilter.txx (107) : error C2039: 'SetCells' : is not a member of
> 'itk::PointSet<TPixelType,VDimension>'
> 1>        with
> 1>        [
> 1>            TPixelType=double,
> 1>            VDimension=3
> 1>        ]
> 1>c:\steven\installation\itk\insighttoolkit-3.2.0\code\basicfilters\itktransfo
> rmmeshfilter.txx(107) : error C2039: 'GetCells' : is not a member of
> 'itk::PointSet<TPixelType,VDimension>'
> 1>        with
> 1>        [
> 1>            TPixelType=double,
> 1>            VDimension=3
> 1>        ]
> 1>c:\steven\installation\itk\insighttoolkit-3.2.0\code\basicfilters\itktransfo
> rmmeshfilter.txx (108) : error C2039: 'SetCellData' : is not a member of
> 'itk::PointSet<TPixelType,VDimension>'
> 1>        with
> 1>        [
> 1>            TPixelType=double,
> 1>            VDimension=3
> 1>        ]
> 1>c:\steven\installation\itk\insighttoolkit-3.2.0\code\basicfilters\itktransfo
> rmmeshfilter.txx(108) : error C2039: 'GetCellData' : is not a member of
> 'itk::PointSet<TPixelType,VDimension>'
> 1>        with
> 1>        [
> 1>            TPixelType=double,
> 1>            VDimension=3
> 1>        ]
> 1>c:\steven\installation\itk\insighttoolkit-3.2.0\code\basicfilters\itktransfo
> rmmeshfilter.txx (111) : error C2039: 'MaxTopologicalDimension' : is not a
> member of 'itk::PointSet<TPixelType,VDimension>'
> 1>        with
> 1>        [
> 1>            TPixelType=double,
> 1>            VDimension=3
> 1>        ]
> 1>c:\steven\installation\itk\insighttoolkit-3.2.0\code\basicfilters\itktransfo
> rmmeshfilter.txx(111) : error C2065: 'MaxTopologicalDimension' : undeclared
> identifier
> 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>'
> 1>        with
> 1>        [
> 1>            TPixelType=double,
> 1>            VDimension=3
> 1>        ]
> 1>c:\steven\installation\itk\insighttoolkit-3.2.0\code\basicfilters\itktransfo
> rmmeshfilter.txx(116) : error C2039: 'GetBoundaryAssignments' : is not a
> member of 'itk::PointSet<TPixelType,VDimension>'
> 1>        with
> 1>        [
> 1>            TPixelType=double,
> 1>            VDimension=3
> 1>        ]
> 1>Build log was saved at "file://c:\Steven\GDC\Debug\BuildLog.htm "
> 1>GDC - 11 error(s), 0 warning(s)
> ========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
>  
> //+++++++++++++++++++++++++++++++++++
>  
> For Method 2: : Use TransformPoint for each individual point
> 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> &'
> 1>        with
> 1>        [
> 1>            TScalarType=double,
> 1>            NInputDimensions=3,
> 1>            NOutputDimensions=3
> 1>        ]
> 1>        and
> 1>        [
> 1>            TCoordRep=double,
> 1>            NPointDimension=3
> 1>        ]
> 1>        Reason: cannot convert from 'PointType' to 'const
> itk::Point<TCoordRep,NPointDimension>'
> 1>        with
> 1>        [ 
> 1>            TCoordRep=double,
> 1>            NPointDimension=3
> 1>        ]
> 1>        No user-defined-conversion operator available that can perform this
> conversion, or the operator cannot be called
> 1>Build log was saved at "file://c:\Steven\GDC\Debug\BuildLog.htm"
> //+++++++++++++++++++++++++++++++++++
>  
> I noticed that in the  error message for Method 1, one TCoordRep is float
> type,
> 1>        and
> 1>        [
> 1>            TCoordRep=float,
> 1>            NPointDimension=3
> 1>        ]
>  
> but I don't know what I should do to change it to double.
> Thank you.
>  
> Regards,
> Steven
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070904/c7e1f95a/attachment.html


More information about the Insight-users mailing list