[vtkusers] 3D visualization

anast.jm at pg.com anast.jm at pg.com
Wed Aug 7 12:56:20 EDT 2002


Javier,

you can read your volume directly using vktImageReader...here's a short piece of
tcl example code. Perhaps this will get around some of your other
problems...john

vtkImageReader reader
  reader DebugOn
  reader SetFileName "myData.raw"
  reader SetFileDimensionality 3
  reader SetDataExtent 0 100 0 50 1 51
  reader SetDataOrigin 0 0 0
  reader SetDataScalarTypeToUnsignedChar
  reader SetDataMask 0x7fff
  reader SetDataSpacing 0.0301 0.0301 0.0300
  reader SetDataByteOrderToLittleEndian
  reader SetHeaderSize 44



                                                                
 Internet Mail Message                                          
 Received from host:      public.kitware.com                    
 [24.97.130.19]                                                 
                                                                


From: "Javier Maicas Sebastian" <s011124 at student.dtu.dk>@public.kitware.com on
08/07/2002 05:29 PM ZE2
                                                                                                  
                   "Javier Maicas Sebastian"           To:   vtkusers at public.kitware.com          
 <s011124 at student.dtu.dk>@public.kitware.com           Cc:    (bcc: John Anast-JM/PGI)            
                                               Subject:      [vtkusers] 3D visualization          
                                                                                                  
 Sent by:  vtkusers-admin at public.kitware.com                                                      
                         08/07/2002 11:29 AM                                                      
                                                                                                  
                                                                                                  




Hi vtkusers

I am Javier Maicas. I have installed VTK libraries in the release and in
the debug versions by compiling the nightly source code in my
computer. What I want to do is:

* I have mi program that, in the end, produces a volume that I want to
show in 3D. Is it possible to load this volume (it is a 3D matrix) in the
VTK libraries directly? How?

This is what I really want. What I have been doing so far is writing slice
by slice as a set of images in a folder and afterwards I read them using
a standard image reader of VTK (TIFFReader, BMPReader). The problem with
this method is that I have to write and read images; and I would like to
avoid it.

When I try with the compiled libraries, that I can download directly from
the official page of VTK, the TIFFReader works, but now, with the
libraries that I have compiled in my computer in order to have access to
the patented libraries, the TIFFReader doesn't work. I cannot compile my
program if I want to use the TIFFReader, and I want to use it. The reason
is that when I use the BMPReader (that works in the two versions of
libraries) instead I cannot perform a clip, using
the function ClipVolume, as with the tiff images. The questions are: Can I
change a library from the precompiled libraries (that contains the
TIFFReader) instead of the "compiled-by-me" libraries to make TIFFReader
works? If I can't, could I get the same results by using the BMPReader? I
mean, how do I have to use ClipVolume to clip bmp images?

(when I use tiff images, I write the images as unsigned short values 0 for
the background, 1 for the volume, 2 for the surfaces and if, for example,
I use ClipVolume with value 0.1 I get the volume and the surfaces. So it
works as it is expected. When I use bmp images I do the same with unsigned
shorts, but with a ClipVolume of 0.1 it doesn't show anything. Which
values do I have to use for bamp images?)

And as a last question, I want to apply marching cubes. Which is the
sequence of instructions from the TIFFReader to the iren() to use the
marching cubes?

Thanks in advance

Javier



_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: <
http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers






More information about the vtkusers mailing list