[Insight-users] problem drawing a line into image with setPixel and
write it to HD
a.bongers at mediri.com
a.bongers at mediri.com
Sun Jun 18 15:57:49 EDT 2006
Hi,
I've been trying to draw lines into an image using the setPixel method.
And having some problems with writing image with the changed values to
disk.
This is how I set the pixelvalue:
image->SetPixel(index, value);
When I read the pixel values I set befor using
image->GetPixel(index, value);
I can retrieve the value - so far everything seems to be O.K.
The problem occurs when I try to write the image to disk using:
writer->SetInput(image);
writer->Update();
The image does not change. So I don't see the line in the image. It
seems that when I update the writer it just uses the unmodified image.
when I repeat
image->GetPixel(index, value);
after updating the writer I get the value I had before making the
change...
Could anybody tell me what I am doing wrong ?
Is this the correct way to draw some figures into images, or is there
some other method ?
Seems to be that only the value is passed to the method and not the
reference ?!
Would be great if anybody could give me a hint...
Thanks
André
More information about the Insight-users
mailing list