[Insight-users] Copy Mesh Points and Cells to QuadEdgeMesh using MeshToMeshFilter
Stefan Dänzer
stefan.daenzer at gmail.com
Mon Dec 13 10:40:51 EST 2010
Hi Luis,
thanks for your reply. I have tried to use the
itkQuadEdgeMeshToQuadEdgeMeshFilter already. The output is a a
QuadEdgeMesh with no points and no faces. I'm working on itk 3.20 at
the moment. This is how I use the filter in my code right now:
typedef itk::QuadEdgeMesh<itk::Vector<double,3>, 3>
meshType;
typedef itk::QuadEdgeMeshToQuadEdgeMeshFilter<meshType, meshType>
qeToQeFilterType;
qeToQeFilterType::Pointer qeToQeFilter = qeToQeFilterType::New();
qeToQeFilter->SetInput(meanShapeQe);
qeToQeFilter->Update();
meshType::Pointer currentShape = qeToQeFilter->GetOutput();
Might the problem be that I use a non scalar PointType (itk::Vector<double,3>) ?
stefan
On Fri, Dec 10, 2010 at 1:56 PM, Luis Ibanez <luis.ibanez at kitware.com> wrote:
> Hi Stefan,
>
> the itkMeshToMeshFilter is an abstract class
> that only serves as base class for other filters.
>
> See the inheritance diagram in:
> http://www.itk.org/Doxygen/html/classitk_1_1MeshToMeshFilter.html
>
> You may want to try
>
> itkQuadEdgeMeshToQuadEdgeMeshFilter.txx
> http://www.itk.org/Doxygen/html/classitk_1_1QuadEdgeMeshToQuadEdgeMeshFilter.html
>
> and to use an itkQuadEdgeMesh type for the
> reader that gets the input mesh from the .meta
> file.
>
>
> Regards,
>
>
> Luis
>
>
> ----------------------------------------------------------------
> On Thu, Dec 2, 2010 at 9:36 PM, Stefan Dänzer <stefan.daenzer at gmail.com> wrote:
>> Hi,
>> I'm trying to read an itk::Mesh from a .meta file and copy the points
>> and cells of this itk::Mesh to a itk::QuadEdgeMesh. My first approach
>> was to use itk::MeshToMeshFilter to achive this. The problem is that
>> the output mesh is empty after running the filter. Here is a part of
>> my code:
>>
>> itk::MetaMeshConverter<3,double>* metaConv = new
>> itk::MetaMeshConverter<3,double>;
>> itk::MetaMeshConverter<3,double>::SpatialObjectPointer meshSO =
>> metaConv->ReadMeta(inFilename.c_str());
>>
>> // get the itk::mesh
>> typedef itk::QuadEdgeMesh<double, 3> qeMeshType;
>> typedef itk::MeshToMeshFilter<MeshType, qeMeshType> qeFilterType;
>>
>> qeMeshType::Pointer qeMesh;
>> qeFilterType::Pointer qeFilter = qeFilterType::New();
>> qeFilter->SetInput(mesh);
>> qeFilter->Update();
>> qeMesh = qeFilter->GetOutput();
>>
>> Am I missing something? Thanks for any advice.
>>
>> Stefan
>> _____________________________________
>> 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.html
>>
>> 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
>>
>
--
--
Stefan Daenzer
Körnerplatz 8
04107 Leipzig
Tel.: +49-157-84993879
"Work like you don't need the money, love like you've never been hurt
and dance like no one is watching." - Randall G Leighton
More information about the Insight-users
mailing list