[Insight-users] Writing itk::Mesh to disk
Yasser Bashir
itk_at_stanford at yahoo.com
Mon, 22 Mar 2004 12:14:48 -0800
Hi Thomas,
Thank you for the code.
Unfortunately we want our itk::Mesh to be much more flexible than the
unstructuredGrid as we want neighbourhood and boundary feature
information also serialized to disk.
Therefore I was looking for something more generic and apparently ITK
doesn't have that facility yet.
Regards,
Yasser
-----Original Message-----
From: insight-users-admin at itk.org [mailto:insight-users-admin at itk.org]
On Behalf Of Thomas Boettger
Sent: Monday, March 22, 2004 12:40 AM
To: Yasser Bashir
Cc: insight-users at itk.org
Subject: Re: [Insight-users] Writing itk::Mesh to disk
Hi Yasser,
I would convert itk to vtkPolyData or vtkUnstructuredGrid and save it to
disk.
You find and example on how this can be done in
InsightApplications-1.6.0/Auxiliary/vtk/vtk2itk.cxx
Furthermore I send you some code, which is based on the example, but
where you can additionally create a vtkPolyData by calling the static
method
static vtkPolyData* meshToPolyData(typename
MeshType::Pointer mesh,
bool onlyTriangles = false);
Regards,
Thomas
Yasser Bashir wrote:
> Hi,
>
> Is there a convenient way to perform file I/O for itk::Mesh?
>
> All of the IO filters seem to be catering to images.
>
> Regards,
>
> Yasser
>
>
> Do you Yahoo!?
> Yahoo! Finance Tax Center - File online. File on time.
--
Dipl.-Inform. Thomas Boettger
Deutsches Krebsforschungszentrum (German Cancer Research Center)
Div. Medical and Biological Informatics B010 Tel: (+49) 6221-42 2328
Im Neuenheimer Feld 280 Fax: (+49) 6221-42 2345
D-69120 Heidelberg e-mail: t.boettger at dkfz.de
Germany http://www.dkfz.de/mbi/people/thomasb.shtml