[Insight-users] Compilation error for TCoordRep=float in MeshTraits
Arnaud Gelas
arnaud_gelas at hms.harvard.edu
Thu Oct 9 08:29:52 EDT 2008
Hi,
You may have a look at the method CastFrom in itk::Point...
Regards,
Arnaud
On Oct 9, 2008, at 5:54 AM, nadan zhu wrote:
> 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?
>
>
> <ATT00001.txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20081009/5b007370/attachment-0001.htm>
More information about the Insight-users
mailing list