[Insight-users] from image to spatial object

Dan Homerick danhomerick at gmail.com
Tue Jul 31 11:38:07 EDT 2007


Hi Michal,

On 7/31/07, Michal Plotkowiak <michal.plotkowiak at bnc.ox.ac.uk> wrote:
>
>
> thanks Luis for your help. I'm still having some difficulties.
>
> trying to compile programs from InsightApplications/Auxiliary/vtk I got
> the
> following error: fatal error LNK1104:cannot open file vtkRendering.lib


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.


> I tried another approach. I took SurfaceExtraction code and added the
> following
> lines:
>
> typedef itk::MeshSpatialObject<MeshType>     MeshSpatialObjectType;
>   MeshSpatialObjectType::Pointer myMeshSpatialObject =
>                                         MeshSpatialObjectType::New();
>   myMeshSpatialObject->SetMesh(meshSource->GetOutput());
>   myMeshSpatialObject->GetMesh();
>
>   typedef itk::SpatialObjectWriter<3> WriterType;
>   WriterType::Pointer writer = WriterType::New();
>   writer->SetInput(myMeshSpatialObject);
>   writer->SetFileName("mesh.mha");
>   writer->Update();
>
> but the program crashes and I dont get any output.
>
> could you give me some suggestions?


I'd suggest giving the *exact* error message.


> meny thanks
> michal


Cheers,
 - Dan


In message <46AE5DBF.3000201 at kitware.com> Luis Ibanez <
> luis.ibanez at kitware.com>
> writes:
> >
> > Hi Michal,
> >
> >  From the list of file formats listed in:
> > http://tetgen.berlios.de/fformats.html
> >
> > One possibility seems to be for you to use the STL file format.
> >
> > ITK doesn't directly write to it, but
> > you can take your segmented image, save it as a
> > .vtk or .mhd images, using the itkImageFileWriter.
> >
> > Then read the image into VTK and use the vtkContourFilter
> > http://www.vtk.org/doc/nightly/html/classvtkContourFilter.html
> > and save the resulting surface as an STL file
> > using the STL Writer
> > http://www.vtk.org/doc/nightly/html/classvtkSTLWriter.html
> >
> >
> > You can also do it in a single program mixing ITK and
> > VTK and converting the ITK image into a vtkImageData.
> > You will find examples of this conversion in the directory
> >
> >
> >     InsightApplications/Auxiliary/vtk
> >              itkReadITKImage3DSegmentShowVTK.cxx
> >              itkReadITKImageSegmentShowVTK.cxx
> >              itkReadITKImageShowSplineVTK.cxx
> >              itkReadITKImageShowVTK.cxx
> >
> >
> >    Regards,
> >
> >
> >       Luis
> >
> >
> > ------------------------
> > Michal Plotkowiak wrote:
> > > Hi
> > >
> > > could someone tell me how can I convert a segmented image stored in
> .mha
> file
> > > to a spatial object readable by TetGen (FE mesh generator)?
> > >
> > > many thanks
> > > michal
> > >
> > >
> >
>
> --
> Michal Plotkowiak
> Doctoral Researcher
> Oxford University LSI DTC
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070731/247cc870/attachment.html


More information about the Insight-users mailing list