[Insight-users] Question re itkVTKPolyDataToMesh.hxx

Karthik Krishnan karthik.krishnan at kitware.com
Thu Jul 11 10:52:06 EDT 2013


indeed.. it is a duplicate.


On Thu, Jul 11, 2013 at 8:25 AM, Andriy Fedorov <fedorov at bwh.harvard.edu>wrote:

> Hi,
>
> I have a question about the following lines in
> rapping/ExternalProjects/ItkVtkGlue/src/itkVTKPolyDataToMesh.hxx
>
> 100:   m_ItkMesh->SetPoint( p, typename TriangleMeshType::PointType(
> apoint ));
> 101:
> 102:    // Need to convert the point to PoinType
> 103:    typename TriangleMeshType::PointType pt;
> 104:    for(unsigned int i=0;i<3; i++)
> 105:      {
> 106:       pt[i] = apoint[i];
> 107:       }
> 108:     m_ItkMesh->SetPoint( p, pt);
>
> I was incorporating this code into a Slicer module, and line 100 kept
> giving me compile error:
>
> error: no matching conversion for functional-style cast from
> 'vtkFloatingPointType *' (aka 'double *') to 'typename
> TriangleMeshType::PointType'
>       (aka 'Point<CoordRepType, 3U>')
>     m_ItkMesh->SetPoint( p, typename TriangleMeshType::PointType( apoint
> ));
>
> Getting rid of line 100 fixes the compile error.
>
> Looking at the code, lines 104-107 duplicate what #100 does. Am I
> missing something?
>
> AF
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>



-- 
karthik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130711/6fc5c21d/attachment.htm>


More information about the Insight-users mailing list