[vtkusers] Visualization problem with normalized images

Nens nicolas.narbonne at gmail.com
Wed May 7 07:20:51 EDT 2014


ok thanks you very much rdebroiz.

I think I resolve my problem even if it not perfect because I lose my
interpotation to see pixels.
I use lookupTable to set the range and the value range, maybe I don't need
to do that, I will try later.

This is the corretion that I made :

vtkSmartPointer<vtkLookupTable> table =
                    vtkSmartPointer<vtkLookupTable>::New();
            double *range = imageReader->GetOutput()->GetScalarRange();
            table->SetRange(range); // image intensity range
            table->SetValueRange(0.0, 1.0); // from black to white
            table->SetSaturationRange(0.0, 0.0); // no color saturation
            table->SetRampToLinear();
            table->Build();

            vtkSmartPointer<vtkImageProperty> ip =  
vtkSmartPointer<vtkImageProperty>::New();
            ip->SetLookupTable(table);
            ip->UseLookupTableScalarRangeOn();
            ip->SetInterpolationTypeToCubic();

After, i add "ip" to my image actor.

Thank again



--
View this message in context: http://vtk.1045678.n5.nabble.com/Visualization-problem-with-normalized-images-tp5726902p5727008.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list