[vtkusers] voxel values in vtkImageData

Thomas Faust tf at thermoanalytics.com
Thu May 6 18:28:06 EDT 2004


Thanks David, but this doesn't solve my problem at all.

I was changing the interpolation method back and for, but the output didn't 
changed.

I'm not dealing with values that are defined on the gridpoints; my values are 
the voxel itself. 

I'll give you (David and all out there) an example:
My matrix is 3x3x3 with the values: 000 010 000 - 010 111 010 - 000 010 000
Do I expect to much brain grease if i would ask you to picture this values in 
your imagination in 3D? Right, this is an 3D cross.
But, if this is my vtkImageData I'll get a volume, that is just 2 voxels in 
each direction. Please give it a try. (I'll at the 15 line source code if you 
want me to)

What I'd like to see as an output is an volume, that comes with 27 (3x3x3) 
voxel. This means that this volume would have 64 (4x4x4) gridpoints. What I 
told about interpolation is, that i can't interpolate these 64 gridpoints out 
of the 27 values to create my own new vtkImageData.
It's all about the interpretation of values in vtkImageData by 
vtkVolumeMapper.

Thanks for your efforts.
Thomas

On Thursday 06 May 2004 05:56 pm, you wrote:
> Hi Thomas,
>
> It looks like all you need to do is turn off interpolation:
>
> volume->GetProperty()->SetInterpolationTypeToNearest();
>
> On Thu, 6 May 2004, Thomas Faust wrote:
> > Hi VTK users,
> >
> > Lately I'm confronted with volume rendering. I decided to use VTK as
> > graphical tool to render a huge mass of data. So far, I'm impressed by
> > the power and usability of VTK.
> >
> > My problem is the handling of vtkImageData in vtkVolumeMapper.
> > My model is created by a collection of values in 3 directions (x,y,z).
> > These are stored in vtkImageData.
> > I expect a volume that extent 3 values(voxels) in each direction to be 3
> > length units long. But it isn't (It's just 2). The reason for this is,
> > that the vtkVolumeMapper interprets 3 points in one direction as 3 corner
> > points (vertices) of voxels. So I end up with 2 voxels that are a mixture
> > between my original values.
> >
> > The problem is that a interpolation between these values is not a option,
> > because two values that are even close together means totaly different
> > things. (e.g. 0x40 is material A, 0x41 is material B)
> >
> > How can I change one of the vtkVolumeMappers to interpret the values in
> > vtkImageData to be voxel-based and not vertex-based?
> >
> > Any comments are welcome and will be answered.
> > Thanks in advance
> > _______________________________________________
> > 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://www.vtk.org/mailman/listinfo/vtkusers



More information about the vtkusers mailing list