[vtkusers] Surface-Colour from another vtkImageData
Tobias Mönch
Tobias.Moench at Student.Uni-Magdeburg.DE
Fri Oct 7 05:38:23 EDT 2005
Hi again,
I found a solution on my own. This old posting helped a lot:
http://public.kitware.com/pipermail/vtkusers/2002-May/060658.html
I add the scalars of the second dataset to the first vtkImageData with
"AddArray(...)" and tell my mapper to use this second array component
(ColorByArrayComponent(...)).
But now I have a new problem. The solution I found works perfectly if both
datasets are of the same size. Now I noticed that in my application it is
possible, that the second dataset (where the colour should come from) could be
of another size. That means, both datasets are in the same space, but have
different voxel sizes and thus differenz dimensions. The result is that it's not
possible to join both datasets into one vtkImageData (my application crashs if I
tried it. So I believe this is the reason).
How could I solve this problem without doing normalisations and interpolations
before?
Greetings,
Tobias
> Hi vtk'ers!
>
> I have the surface of a 3D-object. This surface is created based on a
> previous
> segmentation step. So the vtkImageData I use to compute the surface contains
> just binary data.
> What I want now, is to colour the displayed surface depending on a second
> vtkImageData, which has the same size and contains gray-values. So the
> colour
> for each vertex point of the surface should come from the corresponding voxel
> of
> the second dataset.
>
> How can I apply this second dataset to my vtkPolyDataMapper?
>
> Thanks for your help,
> Tobias
> _______________________________________________
> 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
>
More information about the vtkusers
mailing list