[vtkusers] trouble setting vtkLookupTable at run time...

Luca Pamparana deluded.soul at gmail.com
Mon Sep 4 13:17:04 EDT 2006


Hi everyone,

Today is the day to bang my head against a LUT...

I have a problem when I try to set a look up table at run time...

So, my application is initialized with the following pipeline:

// Slicer------------>ImageMapper

this->m_slicer->SetInput(in);
this->m_imageMapper->SetInput(this->m_slicer->GetOutput());

double * range = in->GetScalarRange();
if (range)
{
       m_colorWindowLowerBound = range[0];
       m_colorWindowUpperBound = range[1];
       this->SetColorWindow(range[1] - range[0]);
       this->SetColorLevel(0.5 * (range[1] + range[0]));
}

Now, I receive an event to change the color map, so I do the following:

// The table has been built correctly and everything... I set the range
double * range = in->GetScalarRange();
 if (range)
 {
        table->SetTableRange(range[0], range[1]);
        m_imapToColors->SetLookupTable(table);
        m_imapToColors->Update();
 }


Now, I rewire my pipeline


this->m_imapToColors->SetInput(0);
this->m_imageMapper->SetInput(0);

// Slicer----------> vtkImageMapToColors------------------>Image mapper

this->m_imapToColors->SetInput(this->m_slicer->GetOutput());
this->m_imapToColors->Update();
this->m_imageMapper->SetInput(this->m_imapToColors->GetOutput());
Render();


All I see here is a black screen........

Any help would get me out of work. Almost 7 pm here...

Thanks,
Luca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060904/45a6b7da/attachment.htm>


More information about the vtkusers mailing list