[vtkusers] Colormapper resets image position (?)

Oliver Kania ptw.freiburg at googlemail.com
Fri Jun 6 02:07:33 EDT 2008


Hello,
I have the following piece of code:

m_imagedata = vtkImageData::New()
m_actor = vtkImageActor::New();
m_colormapper = vtkImageMapToColors::New();

... setting up pipeline


vtkLookupTable* l_lut =  vtkLookupTable::New();
    double* l_range = m_imagedata->GetScalarRange();
    l_lut->SetHueRange(0.9, 0.0);
    l_lut->SetSaturationRange(0.0, 0.7);
    l_lut->SetValueRange(0.0,0.8);
    l_lut->SetTableRange(l_range[0], l_range[1]);
    l_lut->SetNumberOfColors(256);
    l_lut->Build();
    m_imagedata->Update();
    m_colormapper->SetInput(m_imagedata);
    m_colormapper->SetLookupTable(l_lut);
    m_colormapper->SetOutputFormatToRGBA();
    m_colormapper->Update();
    l_lut->Delete();


Here, the origin of the image data (set by SetOrigin())) is NOT 0,0,0
but the image is displayed (otherwise correctly) as if the origin is 0,0,0 .

What could be the cause for this or is this expected behavoir ?

Kind regards, Oliver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080606/5861ae59/attachment.htm>


More information about the vtkusers mailing list