[vtkusers] How to save the stenciled images?
Cory Quammen
cquammen at cs.unc.edu
Sun May 18 11:08:01 EDT 2008
Try vtkXMLImageDataWriter:
http://www.vtk.org/doc/nightly/html/classvtkXMLImageDataWriter.html.
It will save a single 3D image to a file with the data type of your CT
image (probably unsigned shorts), so you don't have to worry about the
lower dynamic range of BMP or JPEG images. To read it back, use the
vtkXMLImageDataWriter class.
Hope that helps,
Cory
On Sat, May 17, 2008 at 10:47 PM, Mark Jefferson <mark.jefferson at qq.com> wrote:
> Hi, vtkusers,
>
> I have stenciled one CT image successfully, and I want to extract a ROI in
> another CT image. but how to save the stenciled images? of course, I could
> use vtkBMPWriter or vtkJPEGWriter to save the stenciled images to be .bmp or
> .jpg images, but this is not the best method, I think.
>
> on the one hand, if I save the stenciled images to be .bmp images, there
> would be many many many images that I need to save, and some message would
> be lost, because the pixel's range in CT image is 0-4095 while in bmp image
> is 0-255. on the other hand, if I want to see the prior image before I
> extract another image, I should read the images, it is very complex.
>
> so I want to know, is there any class in VTK that could save the images
> temporarily and then save them to be one .vtk file after I have extracted
> all the images?
>
> if there is no, could you give me any better suggestion? thank you very
> much!
>
>
> M.J.
>
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
--
Cory Quammen
Department of Computer Science
University of North Carolina at Chapel Hill
http://www.cs.unc.edu/~cquammen
More information about the vtkusers
mailing list