[vtkusers] visualizing polydata scalars from vtkCurvatures with vtklookuptable.

Liam Kurmos quantum.leaf at gmail.com
Thu Aug 18 06:04:13 EDT 2011


essentially i am pursuing this because i found the example at
http://graphics.ucsd.edu/~iman/Curvature/ which seems to suffer from
the same problem.

would it be more sensible to use a vtkColorTransferFunction for
mapping polydata scalars to color?

Liam


On Wed, Aug 17, 2011 at 11:10 AM, Liam Kurmos <quantum.leaf at gmail.com> wrote:
> i'm putting some volume data through a vtkContourFilter ->
> vtkCurvatures and want to visualize the resulting scalars.
>
> when i use vtklookup table to do this i find i get very coarse output
> in terms of the number of colour values. After i increase the number
> of colours above ~8 i dont notice any difference in the output image.
> see the attached image. Apart from the odd green/yellow triangle
> almost all are the same strong red/blue. generally red where there is
> negative curvature and blue on positive but no inbetween colours.
>
> I looked into the scalar data directly:
>
>        <DataArray type="Float64" Name="Gauss_Curvature"
> format="ascii" RangeMin="-1234133.1132" RangeMax="30386706633">
>
> eg. 54.825778917 51.318575186 26.893618816 -8.411519227 -14.567928412
> 5.0874189973
>          -16.836947761 -5.6020612956 33.866948784 22.691176615
> -9.880104764 -13.407796842
>          4.4107221019 -16.761352603 0.40591292822 -3.4205102951
> 26.114937141 43.899964017
>          -15.987917922 2.2293773588 -0.50755389311 -0.031377071296
> -0.82506254505 -0.26515309413
>          -0.21935404476 1.6687913041 -16.931996948 22.683419601
> -1.4113088354 4.2161090128
> 78881.237047 132722.71915 149811.8483 -236.58958393 1184.2147238
> -546.34147028 ....
>
>        </DataArray>
>
> I wonder if the large range in the curvatures is what is causing the
> problem RangeMin="-1234133.1132" RangeMax="30386706633" when very few
> values are close to the maximum.
> but i dont know what i can do to fix this, i have setRange to the full
> extent or a subset but it has no effect. Does this suggest something
> im doing is making my setRange() ignored? if I query the range after
> build it is still as set.
>
> my lookup table looks like:
>
>  vtkLookupTable* lut=vtkLookupTable::New();
>        lut->SetHueRange(0,0.6);                //Red to Blue
>        lut->SetAlphaRange(1,1);
>        lut->SetValueRange(1,1.0);
>        lut->SetSaturationRange(1.0,1.0);
>        lut->SetNumberOfTableValues(1024000); //
>        lut->SetRange(-1000,1000);//altering range appear not to effect output
>        lut->Build();
>
> can anyone suggest where i am going wrong?
>
> Liam
>



More information about the vtkusers mailing list