<html>
<body>
Hi Ramzy,<br><br>
Clipping planes for volume rendering in VTK are set on the
vtkVolumeMapper. (I assume the mapper you are using is
vtkVolumeTextureMapper2D, a subclass of vtkVolumeMapper.) The
clipping planes must be axis-aligned. There are 3 methods you need
to call on the volume mapper to set up clip planes.<br><br>
mapper->CroppingOn();<br>
mapper->SetCroppingRegionPlanes( Xmin, Xmax, Ymin, Ymax, Zmin,
Zmax);<br>
mapper->SetCroppingRegionFlagsTo*****();<br><br>
For a description of the CroppingRegionFlags, see
VTK/Rendering/vtkVolumeMapper.h or
<a href="http://www.vtk.org/doc/nightly/html/classvtkVolumeMapper.html" eudora="autourl">
http://www.vtk.org/doc/nightly/html/classvtkVolumeMapper.html</a>.
You probably want to use SetCroppingRegionFlagsToSubVolume(), which is
the default. (See the constructor of vtkVolumeMapper.)<br><br>
- Amy<br><br>
At 06:52 PM 11/17/2004, Ramzy Darwish wrote:<br>
<blockquote type=cite class=cite cite=""><font face="arial" size=2>Hello
All,<br>
I have been using VTK in school for a little more than a year now, and I
am having some problems.<br>
</font> <br>
<font face="arial" size=2>Don't worry, I am not asking anyone to do my
homework.<br>
</font> <br>
<font face="arial" size=2>I am doing an independent study continuing some
work with medical volume rendering using the bruce gooch data set:
<a href="http://www.cs.utah.edu/~bgooch/BruceBrain.html">
http://www.cs.utah.edu/~bgooch/BruceBrain.html</a> <br>
</font> <br>
<br>
<font face="arial" size=2>Now, the data file he gives out is a simple
list of densities.<br>
I was not allowed to use any vtkReaders, so I loaded the data in by hand,
swapping byte-order and all that good stuff.<br>
</font> <br>
<font face="arial" size=2>So I got a rendering of the head, but because I
had no other information other than density, I was only able to somewhat
get the brain isolated was by using the vtkVolume object with texture
mapping.<br>
</font> <br>
<font face="arial" size=2>This produced some nice (although not greatly
useful) images, but I have always wanted to get the brain by itself.<br>
</font> <br>
<font face="arial" size=2>I tried using the vtkContourFilter, which
didn't seem to want to work right. Instead of leaving values all through
the head in my ranges, it left sections of the entire head (i.e. I would
get from the neck/chin to the nose instead of the whole head with only
say, the skin removed).<br>
</font> <br>
<font face="arial" size=2>I tried using a combination of vtkClipPolyData
with scalar values and implicit planes, but this didn't work because
after cutting, the resulting geometry would be full of holes. I think I
was using it wrong.<br>
</font> <br>
<font face="arial" size=2>So I went back to the drawing board and I have
decided to look at the densities in the file and ignore those outside of
the brain wherever possible. So now I have a range of values within to
use, but I still have some extraneous (sp) pieces laying about that I
might be able to remove, but I can't figure out how. Is there a way to
remove chunks out of a volume? Not by scalar though. I could use a sphere
or other builtin implicit function if necessary, but it seems that the
other methods of doing stuff like this are not set up to work with
vtkVolume's (as they are derived from vtkProp).<br>
</font> <br>
<font face="arial" size=2>Can anyone point me in the direction of some
more objects that I can use to interact with or modify vtkVolume
objects?<br>
</font> <br>
<font face="arial" size=2>Sorry this was so long, this is my first post
here.<br>
</font> <br>
<font face="arial" size=2>thanks,<br>
ramzy<br>
</font>_______________________________________________<br>
This is the private VTK discussion list. <br>
Please keep messages on-topic. Check the FAQ at:
&lt;http://www.vtk.org/Wiki/VTK_FAQ&gt;<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" eudora="autourl">
http://www.vtk.org/mailman/listinfo/vtkusers</a></blockquote></body>
</html>