[vtkusers] extracting a volume of interest

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Sun Apr 15 11:59:57 EDT 2001


>>>>> "Shiva" == Shiva Bissoon <sbissoo2 at hotmail.com> writes:

    Shiva> Hi all, I was wondering if anyone knows if it is possible
    Shiva> to extract a volume of interest and save the associated
    Shiva> file as a bitmap....????

You can save the renderwindow to a BMP image, if that is what you are
looking for.  You will have to do something like.

  w2if = vtkWindowToImageFilter()
  w2if.SetInput(renwin)
  ex = vtkBMPWriter()
  ex.SetFileName(file_name)
  ex.SetInput(w2if.GetOutput ())
  ex.Write() 

Or you could dump the renderwindow to a PPM image and convert the PPM
to a BMP.

  renwin.SetFileName(file_name)
  renwin.SaveImageAsPPM()

    Shiva> I have a cube filled with particles and I wanted to extract
    Shiva> a plane in the x direction ....can anyone suggest the
    Shiva> functions to use and a method I can follow.Are there any
    Shiva> examples I can look at besides extractd.tcl???

Depends on the type of data you have.  You can use a vtkCutter and
slice thru the data and then show whatever you want...

prabhu




More information about the vtkusers mailing list