[Insight-users] About TransformPoint

Steven ITK itklearner at gmail.com
Tue Sep 4 08:16:02 EDT 2007


Hi Tomáš and Luis,
**
Thank you so much. It works! I changed the declaration of PointSet from
//typedef itk::PointSet< double, Dimension >   PointSetType;
to:
typedef itk::PointSet<double,Dimension,
itk::DefaultStaticMeshTraits<double,Dimension,Dimension,double, double>>
PointSetType;
And use Method 2: : Use TransformPoint() for each individual point.
It seems more changes (which I don't know) need to be made if I want to use
Method 1.

Regards,
Steven




On 9/4/07, Tomáš Kazmar <Tomash.Kazmar at seznam.cz> wrote:
>
> Hi Steven,
>
> think I found the solution: PointSet<PixelType, Dimension> takes its
> definition
> of PointType and PointContainer from
> DefaultStaticMeshTraits<PixelType,Dimension,Dimension>. The problem is
> that
> such DefaultStaticMeshTraits is in fact
>
> DefaultStaticMeshTraits<PixelType,Dimension,Dimension,float,float,PixelType>
> where the first of the two floats is the source of your problem.
>
> Define PointSet with explicit MeshTraits template parameter, eg. like
> this:
>
> typedef
> itk::PointSet<double,2,itk::DefaultStaticMeshTraits<double,2,2,double>>
> PointSetType;
>
> This way the PointSet will use double for its TCoordRep.
>
> Regards,
> Tomas
>
>
> # ------------ Původní zpráva ------------
> # Od: Steven ITK <itklearner at gmail.com>
> # Předmět: Re: [Insight-users] About TransformPoint
> # Datum: 04.9.2007 08:11:17
> # ----------------------------------------
> # 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\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> &'
> # 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\itktransformmeshfilter.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\itktransformmeshfilter.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\itktransformmeshfilter.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\itktransformmeshfilter.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\itktransformmeshfilter.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\itktransformmeshfilter.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\itktransformmeshfilter.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\itktransformmeshfilter.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\itktransformmeshfilter.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
> #
> #
> #
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070904/32de9260/attachment-0001.html


More information about the Insight-users mailing list