[vtkusers] HELP! Color scale and Slice display
Arsene ELLA
ella at pet.mpin-koeln.mpg.de
Fri Mar 15 05:08:22 EST 2002
Hi,
1) To build a 256 color lookup table from blue to red, the vtk following
part of code is use:
-----------------------------------------
:
:
vtkLookupTable *lut = vtkLookupTable::New();
lut->SetHueRange(0.66667, 0.0);
lut->SetSaturationRange(1, 1);
lut->SetValueRange(1, 1);
lut->SetAlphaRange(1, 1);
lut->SetNumberOfColors(256);
lut->Build();
:
:
-----------------------------------------
How can I change those values to build:
* gray color scale (variation of gray level)?
* gray color scale (from Black to White throughout variations of red and
yellow: Black->Red->Yellow->White)?
2) Displaying a 3D image slice (from "C:\\......\Data\\headsq\\quarter") in
a view
port as following :
----------------------
:
:
vtkImager *imager1;
imager1 = vtkImager::New();
imager1->AddActor2D(actor1);
imager1->SetViewport(0.5, 0.0, 1.0, 0.5);
:
:
----------------------
the slice image appears too small than the view port. How can I do to
enlarge the
image to fit the view port?
thanks in advance,
Arsene
More information about the vtkusers
mailing list