[vtkusers] RGBA and vtkImagePlaneWidget
Andre Gouws
andre at ynic.york.ac.uk
Tue Feb 27 08:21:10 EST 2007
vtk users / developers ...
I am trying to get a vtkImagePlaneWidget to display the RGBA values
passed to it in a vtkImageData object generated from a 176x256x256 MRI
dataset. The vtkImageData object has all the properties I expect:
/
vtkImageData (0x63f8dd0)
Debug: Off
Modified Time: 30087
Reference Count: 3
Registered Events: (none)
Source: (none)
Information: 0x63f8ee0
Data Released: False
Global Release Data: Off
UpdateTime: 30088
Release Data: Off
UpdateExtent: Not Initialized
UpdateExtent: 0, 175, 0, 255, 0, 255
Update Number Of Pieces: 1
Update Piece: 0
Update Ghost Level: 0
WholeExtent: 0, 175, 0, 255, 0, 255
ExtentTranslator: (0x63f6e60)
RequestExactExtent: Off
Field Data:
Debug: Off
Modified Time: 30074
Reference Count: 1
Registered Events: (none)
Number Of Arrays: 0
Number Of Components: 0
Number Of Tuples: 0
Number Of Points: 11534336
Number Of Cells: 11379375
Cell Data:
Debug: Off
Modified Time: 30076
Reference Count: 1
Registered Events: (none)
Number Of Arrays: 0
Number Of Components: 0
Number Of Tuples: 0
Copy Flags: ( 1 1 1 1 1 )
Scalars: (none)
Vectors: (none)
Normals: (none)
TCoords: (none)
Tensors: (none)
Point Data:
Debug: Off
Modified Time: 30087
Reference Count: 1
Registered Events: (none)
Number Of Arrays: 1
Array 0 name = NULL
Number Of Components: 4
Number Of Tuples: 11534336
Copy Flags: ( 0 1 1 1 1 )
Scalars:
Debug: Off
Modified Time: 30083
Reference Count: 1
Registered Events: (none)
Name: (none)
Number Of Components: 4
Number Of Tuples: 11534336
Size: 46137344
MaxId: 46137343
LookupTable: (none)
Array: 0x16a5b000
Vectors: (none)
Normals: (none)
TCoords: (none)
Tensors: (none)
Bounds:
Xmin,Xmax: (0.999946, 175.99)
Ymin,Ymax: (0, 288.864)
Zmin,Zmax: (0, 288.864)
Compute Time: 0
ScalarType: 3
NumberOfScalarComponents: 4
Spacing: (-0.999946, 1.1328, 1.1328)
Origin: (175.99, 0, 0)
Dimensions: (176, 256, 256)
Increments: (4, 704, 180224)
Extent: (0, 175, 0, 255, 0, 255)
/
.. this includes /NumberOfScalarComponents: 4 / ... these values
correspond to the RGBA values of my dataset ...
e.g. if I access:
my_data_object.GetOutput().GetScalarComponentAsFloat
(77,45,128,0) = 255.0
(77,45,128,1) = 174.0
(77,45,128,2) = 0.0
(77,45,128,3) = 255.0
..... corresponding to RGBA value of 255,174,0,255 for the voxel at
77,45,128 .... (right?)
Perhaps I don't understand the capabilities of the vtkImageplaneWidget
... The vtkImagePlaneWidget seems to display the R (or first scalar
component) as an intensity (0-255 greyscale) .. I have set up a routien
to remap all rgba values to a defined lookuptable and then recalculate
values in my data to map to this but it takes forever ...
Does the vtkImagePlaneWidget not have the ability to handle / map RGBA
values?
I see this problem has been covered to some extent before (but I am not
using ITK) ..
http://public.kitware.com/pipermail/insight-users/2004-July/009412.html
Thanks in advance
Andre'
//
More information about the vtkusers
mailing list