Hi Michal,<br><br><div><span class="gmail_quote">On 7/31/07, <b class="gmail_sendername">Michal Plotkowiak</b> <<a href="mailto:michal.plotkowiak@bnc.ox.ac.uk">michal.plotkowiak@bnc.ox.ac.uk</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>thanks Luis for your help. I'm still having some difficulties.<br><br>trying to compile programs from InsightApplications/Auxiliary/vtk I got the<br>following error: fatal error LNK1104:cannot open file vtkRendering.lib
</blockquote><div><br>You probably need to download and build a copy of VTK, if you haven't already. If you have already, make sure that cmake is looking in the correct lib directory.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I tried another approach. I took SurfaceExtraction code and added the following<br>lines:<br><br>typedef itk::MeshSpatialObject<MeshType> MeshSpatialObjectType;<br> MeshSpatialObjectType::Pointer myMeshSpatialObject =
<br> MeshSpatialObjectType::New();<br> myMeshSpatialObject->SetMesh(meshSource->GetOutput());<br> myMeshSpatialObject->GetMesh();<br><br> typedef itk::SpatialObjectWriter<3> WriterType;
<br> WriterType::Pointer writer = WriterType::New();<br> writer->SetInput(myMeshSpatialObject);<br> writer->SetFileName("mesh.mha");<br> writer->Update();<br><br>but the program crashes and I dont get any output.
<br><br>could you give me some suggestions?</blockquote><div><br>I'd suggest giving the *exact* error message.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
meny thanks<br>michal</blockquote><div><br>Cheers,<br> - Dan<br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">In message <<a href="mailto:46AE5DBF.3000201@kitware.com">
46AE5DBF.3000201@kitware.com</a>> Luis Ibanez <<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>><br>writes:<br>><br>> Hi Michal,<br>><br>> From the list of file formats listed in:
<br>> <a href="http://tetgen.berlios.de/fformats.html">http://tetgen.berlios.de/fformats.html</a><br>><br>> One possibility seems to be for you to use the STL file format.<br>><br>> ITK doesn't directly write to it, but
<br>> you can take your segmented image, save it as a<br>> .vtk or .mhd images, using the itkImageFileWriter.<br>><br>> Then read the image into VTK and use the vtkContourFilter<br>> <a href="http://www.vtk.org/doc/nightly/html/classvtkContourFilter.html">
http://www.vtk.org/doc/nightly/html/classvtkContourFilter.html</a><br>> and save the resulting surface as an STL file<br>> using the STL Writer<br>> <a href="http://www.vtk.org/doc/nightly/html/classvtkSTLWriter.html">
http://www.vtk.org/doc/nightly/html/classvtkSTLWriter.html</a><br>><br>><br>> You can also do it in a single program mixing ITK and<br>> VTK and converting the ITK image into a vtkImageData.<br>> You will find examples of this conversion in the directory
<br>><br>><br>> InsightApplications/Auxiliary/vtk<br>> itkReadITKImage3DSegmentShowVTK.cxx<br>> itkReadITKImageSegmentShowVTK.cxx<br>> itkReadITKImageShowSplineVTK.cxx
<br>> itkReadITKImageShowVTK.cxx<br>><br>><br>> Regards,<br>><br>><br>> Luis<br>><br>><br>> ------------------------<br>> Michal Plotkowiak wrote:<br>> > Hi<br>
> ><br>> > could someone tell me how can I convert a segmented image stored in .mha<br>file<br>> > to a spatial object readable by TetGen (FE mesh generator)?<br>> ><br>> > many thanks<br>> > michal
<br>> ><br>> ><br>><br><br>--<br>Michal Plotkowiak<br>Doctoral Researcher<br>Oxford University LSI DTC<br><br>_______________________________________________<br>Insight-users mailing list<br><a href="mailto:Insight-users@itk.org">
Insight-users@itk.org</a><br><a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br></blockquote></div><br>