[Insight-users] CellInterface & PolygonCell & Region
Ofri Sadowsky
ofri@cs.jhu.edu
Tue, 26 Nov 2002 15:53:23 -0500
Hi,
1
---
I look at the documentation for itk::CellInterface and itk::PolygonCell.
My hypothesis was, that these should have compatible interfaces, as
PolygonCell is a case of CellInterface. But they seem to be
incompatible: PolygonCell declares the method AddPointId() and
CellInterface does not.
If I want to insert a PolygonCell into a Mesh, I do the following:
typedef itk::Mesh<PixelType, VDimension> MeshType;
typedef MeshType::CellType CellType;
typedef CellType::CellAutoPointer CellAutoPointer;
typedef itk::PolygonCell<CellType> PolygonType;
MeshType::Pointer _mesh;
CellAutoPointer _polygonCellPtr;
_mesh = MeshType::New();
_polygonCellPtr.TakeOwnership(new PolygonType); /* (1) */
_mesh->SetCell(0, cellptr);
But I could not use AddPointId() on my _polygonCellPtr, because it only
allows access to the methods of CellInterface.
I tried to make my CellAutoPointer a itk::AutoPointer<PolygonCell>, but
then I fell into type incompatibility in (1).
How do I get out of this?
2
---
the classes ImageRegion and ImageIORegion declare a public method
IsInside() but MeshRegion does not seem to have one. I would question
the usability of a Region object without a function of this sort.
Furthermore, MeshRegion hardly declares any public methods. Are there
plans to extend MeshRegion, or should I avoid using it?
Thanks,
Ofri.