[Insight-users] Volume overlay
Sara Rolfe
smrolfe at u.washington.edu
Thu Feb 10 13:38:17 EST 2011
Hello,
I'm attempting to overlay an image with color. I've had trouble
finding documentation on this, either in ITK or VTK. The way I'm
going about it is to scale the values of the image down and then use
the add image filter to add the labels on top. I could then use VTK
to create a corresponding colormap.
However, I'm getting stuck on something that should be very simple.
My operations to combine the two images are failing. I think the
problem is the SubtractConstantFromImageFilter. I've checked the
output and it looks like the constant is not being subtracted. The
input to this filter is an image with a value of 0 for the background
and 255 for the object. I'd like to change these to 0 and 1. The
pixel type is unsigned char. I use the following:
SubFilterType::Pointer subFilter = SubFilterType::New();
InputPixelType subValue = 254;
subFilter->SetConstant(subValue);
subFilter->SetInput( imageInverter->GetOutput() );
subFilter->Update();
But the output image is still 0 - 255. Am I missing something simple?
Also, is there a better way to accomplish this task, or any examples
showing something similar?
Thanks,
Sara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110210/4ebde5ba/attachment.htm>
More information about the Insight-users
mailing list