[Insight-users] Compilation error for TCoordRep=float in MeshTraits
nadan zhu
nadan.zhu at gmail.com
Thu Oct 9 05:54:34 EDT 2008
As SimplexMeshGeometry::PointType is defined as itk::Point<double,3>
in itkDeformableSimplexMesh3DFilter.txx(164)
data->pos = points.Value(); //error because itk::Point<double,3> =
itk::Point<float,3>
One possible way to solve it is to make class SimplexMeshGeometry template
or
overload function operator= in itk::Point
template<class PointValueType>
Point& operator= (const Point<PointValueType,NPointDimension> & r)
{
const FixedArray<PointValueType, NPointDimension> & fa = r;
BaseArray::operator=(fa);
return *this;
}
regards
nadan
On Thu, Oct 9, 2008 at 7:52 PM, Dan Mueller <dan.muel at gmail.com> wrote:
> Hi Insight Users,
>
> I am trying to use itk::DeformableSimplexMesh3DFilter with a specific
> mesh trait. However I am encountering compilation errors. Can someone
> point out what I am doing wrong?
>
> Changing TCoordRep (below) from float to double makes the error go
> away. However, I would like the pixel type and coord rep type to be
> the same (ie. float). Why is this not allowed?
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20081009/066a0eb6/attachment.htm>
More information about the Insight-users
mailing list