[vtkusers] mapping floating image to color image using vtkImageMapToColors

Bill Lorensen bill.lorensen at gmail.com
Fri Jul 19 21:32:40 EDT 2013


Can you post a small, compilable example that illustrates the problem?



On Fri, Jul 19, 2013 at 9:20 PM, Rick Frank <rickfrank at me.com> wrote:

>
> Hi,
>
> I'm getting some behavior I don't understand when trying to map gray
> floating point image to a color image
>
> What I'm seeing is that the output is completely white.
>
> my code is roughly as follows
>
> filter->SetOutputFormatToRGBA()
>
> colorTable->SetTableRange(0,1)
> colorTable->SetHueRange(0,1);
> colorTable->SetSaturationRange(0,1);
> colorTable->SetValueRange(0,1);
> colorTable->SetRampToLinear();
>
> colorTable->ForceBuild();
>
> Now, when I trace through the code, the values set in the RGBA image look
> correct. But the ultimate rendered image is completely white.
>
> If I modify the code so that all the RGBA values are 1,0,0,255 the image
> is solid red. If I change the alpha to 64 nothing changes.
>
> So, I suspect it's the mapper - I use the same mapper - vtkImageMapper to
> display the color image by resetting the input connection:
>
> mapper->SetInputConnection(filter->GetOutputPort());
> imageActor->SetMapper(mapper);
>
> Do I need to make a change to the mapper to get the proper RGBA display?
>
>
> Thanks
>
> Rick
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130719/7e73309b/attachment.htm>


More information about the vtkusers mailing list