[vtkusers] Problem with lookup table

Eugen Wintersberger eugen.wintersberger at jku.at
Sun Mar 22 03:06:56 EDT 2009


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