[Insight-users] from image to spatial object

Michal Plotkowiak michal.plotkowiak at bnc.ox.ac.uk
Tue Jul 31 14:48:06 EDT 2007


Hi,

could someone give me detailed instruction how to install vtk?

many thanks
michal


In message <b9e170000707310838u21214002wc042de10061a32e6 at mail.gmail.com> "Dan 
Homerick" <danhomerick at gmail.com> writes:
> 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
> >

-- 
Michal Plotkowiak
Doctoral Researcher
Oxford University LSI DTC



More information about the Insight-users mailing list