[vtkusers] Visualizing vtkImageData with negative scalar values
David.Pont at ForestResearch.co.nz
David.Pont at ForestResearch.co.nz
Sun Oct 5 17:05:09 EDT 2003
Hi Saha,
that is a big range. vtkWarpScalar will displace points by these values,
these displacements are presumably MUCH larger than the vtkImageData
dimensions. This will result in a data set that has a much greater
dimension in one direction only, which you can not visualise very well.
You could scale your data first (externally?), or using
vtkTransformPolyData (I think) on the output of vtkWarpScalar. Try a scale
factor that brings your data values into a range comparable with the
dimensions of the vtkImageData (1E-5 ?).
Once you can see something you can fine-tune the scale factor.
regards
Dave
|---------+---------------------------->
| | Sunayana Saha |
| | <sunayana_saha at ya|
| | hoo.com> |
| | Sent by: |
| | vtkusers-admin at vt|
| | k.org |
| | |
| | |
| | 04/10/2003 08:36 |
| | |
|---------+---------------------------->
>--------------------------------------------------------------------------------------------------------------------------------|
| |
| To: vtkusers at vtk.org |
| cc: |
| Subject: [vtkusers] Visualizing vtkImageData with negative scalar values |
>--------------------------------------------------------------------------------------------------------------------------------|
Hi,
I am trying to use VTK to visualize some image data that ranges from
-166114.703125 to 38924.0
Though the pipeline seems to be working fine when I do not have a huge
range and the values are all positive, I can see almost nothing on the
output window, when the range is large and contains negative values. Is
there any way to come around this problem? My pipeline takes the input in
vtkImageData (scalar set to vtkFloatArray) and then applies different vtk
compenents in this order:
vtkImageDataGeometryFilter -> vtkWarpScalar -> vtkSmoothPolyDataFilter
-> vtkPolyDataNormals -> vtkPolyDataMapper -> vtkActor -> vtkWindowRenderer
...
I tried adding a large positive value to the most negative value to make it
zero, and then adding the same value to all the numbers, but that did not
help. I think the range is too large. Is there a maximum range (for
example, 2048 values between the minimum and maximum values) that VTK
objects support?
Any suggestions on this problem will be most appreciated.
Thanks,
Saha
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
More information about the vtkusers
mailing list