[vtkusers] Problem with lookup table
Eugen Wintersberger
eugen.wintersberger at jku.at
Tue Mar 24 03:10:37 EDT 2009
After some tests I have some additional information about the problem:
The scaling problem appears only when using VTK (legacy format) files.
If I import ExodusII files into Paraview the scaling is ok.
Furthermore, compiled VTK 5.2.1 two weeks ago since on my Ubuntu
installation there is only 5.0.4 available. The Paraview installation is
originally compiled with the old libs. I thought this might be the
problem and recompiled Paraview using the 5.2.1 installation of VTK.
However, the problem remained. Even removing 5.2.1 and recompiling
Paraview did not yield the expected result.
Funny, but on the system of a friend of mine here in office everything
works fine (same Ubuntu installation, same Paraview version compiled
against VTK 5.0.4).
Thanks for your help Eric, I will try to get a download location for the
file for you.
regards
Eugen
On Mon, 2009-03-23 at 09:36 -0400, Eric E. Monson wrote:
> Hey Eugen,
>
> That does seem strange that ParaView would scale the colormap from
> 0-1. What version of PV are you using? I just tried a few versions and
> all of them seem to default to stretching the colormap to the true
> range of the scalars.
>
> If you go into the "Edit Color Map" dialog, check to see whether the
> checkbox is checked that says "Automatically Rescale to Fit Data Range".
>
> If that's not it, and it's important to you, you could place the data
> set someplace where we can download it and see if there is anything
> strange going on.
>
> Talk to you later,
> -Eric
>
>
> On Mar 22, 2009, at 3:06 AM, Eugen Wintersberger wrote:
>
> > Thanks to Eric and Jeff
> > Both advices are completely correct. Now it works.
> > A stupid question remains. I had suddenly the same problem with
> > Paraview. If I visualize the data with my script, after applying the
> > changes you suggested, everything works fine. However, when I try to
> > visualize the data in Paraview I get now the same error, that the
> > color
> > bar ranges only from 0 to 1.
> > Any idea?
> >
> > regards
> > Eugen
> >
> > On Fri, 2009-03-20 at 11:08 -0400, Eric E. Monson wrote:
> >> Hey Eugen,
> >>
> >> I don' t know if this is an issue or not, but you also seem to be
> >> setting the active scalars to "v", but are generating your lookup
> >> table according to the range of "u".
> >>
> >> -Eric
> >>
> >>
> >> On Mar 20, 2009, at 10:53 AM, Jeff Baumes wrote:
> >>
> >>> Try
> >>>
> >>> mesh_mapper.UseLookupTableScalarRangeOn()
> >>>
> >>> By default the mapper uses its own range setting. Alternately you
> >>> can
> >>> change the mapper's range directly with
> >>>
> >>> mesh_mapper.SetScalarRange(urange[0],urange[1])
> >>>
> >>> Jeff
> >>>
> >>> On Fri, Mar 20, 2009 at 4:19 AM, Eugen Wintersberger
> >>> <eugen.wintersberger at jku.at> wrote:
> >>>> Hi there
> >>>> I wrote a small Python script that should visualize a vtk data
> >>>> file.
> >>>> The script you find attached to this mail. The output of the script
> >>>> looks like this:
> >>>>
> >>>> vtkPointData (0x94d9e0)
> >>>> Debug: Off
> >>>> Modified Time: 178
> >>>> Reference Count: 2
> >>>> Registered Events: (none)
> >>>> Number Of Arrays: 4
> >>>> Array 0 name = u
> >>>> Array 1 name = v
> >>>> Array 2 name = w
> >>>> Array 3 name = xGe
> >>>> Number Of Components: 4
> >>>> Number Of Tuples: 571460
> >>>> Copy Tuple Flags: ( 1 1 1 1 1 0 1 )
> >>>> Interpolate Flags: ( 1 1 1 1 1 0 0 )
> >>>> Pass Through Flags: ( 1 1 1 1 1 1 1 )
> >>>> Scalars:
> >>>> Debug: Off
> >>>> Modified Time: 132
> >>>> Reference Count: 2
> >>>> Registered Events: (none)
> >>>> Name: v
> >>>> Data type: float
> >>>> Size: 571460
> >>>> MaxId: 571459
> >>>> NumberOfComponents: 1
> >>>> Information: 0
> >>>> Name: v
> >>>> Number Of Components: 1
> >>>> Number Of Tuples: 571460
> >>>> Size: 571460
> >>>> MaxId: 571459
> >>>> LookupTable: (none)
> >>>> Array: 0x17bfde0
> >>>> Vectors: (none)
> >>>> Normals: (none)
> >>>> TCoords: (none)
> >>>> Tensors: (none)
> >>>> GlobalIds: (none)
> >>>> PedigreeIds: (none)
> >>>>
> >>>>
> >>>> (-0.12224852293729782, 0.12240850925445557)
> >>>> vtkLookupTable (0xc05670)
> >>>> Debug: Off
> >>>> Modified Time: 188
> >>>> Reference Count: 1
> >>>> Registered Events: (none)
> >>>> Alpha: 1
> >>>> VectorMode: Component
> >>>> VectorComponent: 0
> >>>> TableRange: (-0.122249, 0.122409)
> >>>> Scale: Linear
> >>>> HueRange: (0, 0.66667)
> >>>> SaturationRange: (1, 1)
> >>>> ValueRange: (1, 1)
> >>>> AlphaRange: (1, 1)
> >>>> NumberOfTableValues: 256
> >>>> NumberOfColors: 256
> >>>> Ramp: Linear
> >>>> InsertTime: 0
> >>>> BuildTime: 189
> >>>> Table:
> >>>> Debug: Off
> >>>> Modified Time: 186
> >>>> Reference Count: 1
> >>>> Registered Events: (none)
> >>>> Name: (none)
> >>>> Data type: unsigned char
> >>>> Size: 1024
> >>>> MaxId: 1023
> >>>> NumberOfComponents: 4
> >>>> Information: 0
> >>>> Name: (none)
> >>>> Number Of Components: 4
> >>>> Number Of Tuples: 256
> >>>> Size: 1024
> >>>> MaxId: 1023
> >>>> LookupTable: (none)
> >>>> Array: 0xc06bb0
> >>>> So it seems that the color scale should run over the entire
> >>>> range. However, as can be seen from the output (see attached image
> >>>> file)
> >>>> the scale runs only from 0 to 1. I am running VTK 5.2.1 on a Ubuntu
> >>>> 8.10
> >>>> AMD 64 installation. The funny thing is that I observe this problem
> >>>> when
> >>>> I import the data into paraview too.
> >>>> Is there some miss-configuration of VTK? Has anyone an idea whats
> >>>> going
> >>>> wrong here?
> >>>>
> >>>> regards
> >>>> Eugen Wintersbeger
> >>>> --
> >>>> --------------------------------------------
> >>>> | |
> >>>> | Dipl. Ing. Eugen Wintersberger |
> >>>> | Department of semicondutor physics |
> >>>> | University of Linz |
> >>>> | Altenbergerstrasse 69 |
> >>>> | A-4040 Linz |
> >>>> | Austria |
> >>>> | |
> >>>> | Mobile.: +43 664 3112861 |
> >>>> | Tel.: +43 732 2468 9605 |
> >>>> | E-Mail.: eugen.wintersberger at jku.at |
> >>>> | Skype: eugen20056221 |
> >>>> | ICQ: 214418739, nickname: thot |
> >>>> | |
> >>>> --------------------------------------------
> >>>>
> >>>> _______________________________________________
> >>>> 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
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> Jeff Baumes, Ph.D.
> >>> R&D Engineer, Kitware Inc.
> >>> (518) 371-3971 x132
> >>> jeff.baumes at kitware.com
> >>> _______________________________________________
> >>> 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
> >>
>
More information about the vtkusers
mailing list