[vtkusers] Change pixel value from vtkImageData

shekharc Shekhar.Chandra at sci.monash.edu.au
Sun Nov 2 19:01:23 EST 2008


Hi Flory,

SetScalarComponent members work for me. Make sure you have set the right 
component and/or have the right number of components. You can use 
GetScalarComponentAs to check as well.

Cheers
Shakes

flory wrote:
> Hello,
> 
> I want to change the value of a pixel given its coordinates(x, y, z). I am
> using VTK with Java wrapping. I have tried to set the value with
> img.SetScalarComponentFromDouble(x, y, z, 0, value);
> but the value is not changed.
> Unfortunately in Java the GetScalarPointer is not available so I cannot use
> this solution.
> Has anyone tried to do this before?
> I would appreciate any help or suggestion.
> 
> Regards,
>               Flory
> 




More information about the vtkusers mailing list