<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi guys,<div><br></div><div>I am having a problem to shared the values of  window/level between a image actor of 2D viewer and 3D viewer, with the same values on both the colour image are different.</div><div><br></div><div>I create the vtkimageactor like this:</div><div><br></div><div><div>        // Create a greyscale lookup table</div><div>        vtkSmartPointer<vtkLookupTable> table =</div><div>        vtkSmartPointer<vtkLookupTable>::New();</div><div>        table->SetRange(0, 255); // image intensity range</div><div>        table->SetValueRange(0.0, 1.0); // from black to white</div><div>        table->SetSaturationRange(0.0, 0.0); // no color saturation</div><div>        table->SetRampToLinear();</div><div>        table->Build();</div><div>        </div><div>        m_imagemaper = VTKImageMapToWindowLevelColors::New();</div><div>        m_imagemaper->SetLookupTable(table);</div><div>        m_imagemaper->SetInputConnection(resliceimage->GetOutputPort());</div><div>        m_imagemaper->Update();</div></div><div><br></div><div><div>        VTKImageActor m_imageactor3D = VTKImageActor::New();</div><div>#if VTK_MAJOR_VERSION <= 5</div><div>        m_imageactor3D->SetInput(resliceimage->GetOutput());</div><div>#else</div><div>        m_imageactor3D->SetInputData(resliceimage->GetOutput());</div><div>#endif</div><div>        m_imageactor3D->GetMapper()->SetInputConnection(m_imagemaper->GetOutputPort());</div><div>        m_imageactor3D->Update();</div></div><div><br></div><div><div>        VTKImageActor m_imageactor2D = VTKImageActor::New();</div><div>#if VTK_MAJOR_VERSION <= 5</div><div>        m_imageactor2D->SetInput(resliceimage->GetOutput());</div><div>#else</div><div>        m_imageactor2D->SetInputData(resliceimage->GetOutput());</div><div>#endif</div><div>        m_imageactor2D->GetMapper()->SetInputConnection(m_imagemaper->GetOutputPort());</div><div>        m_imageactor2D->Update();</div></div><div><br></div><div>For 2D visualisation I set the interactor style to vtkInteractorStyleImage.</div><div>and 3D visualisation I set the interactor to vtkInteractorStyleTrackballCamera.</div><div><br></div><div>After, from the 2D viewer a get the window/level values like this:</div><div><br></div><div><div>            double window = this->CurrentImageProperty->GetColorWindow();</div><div>            double level = this->CurrentImageProperty->GetColorLevel();</div></div><div><br></div><div>and set this values to 3D visualisation:</div><div><br></div><div><div>        vtkImageMapToWindowLevelColors *mapper = vtkImageMapToWindowLevelColors::SafeDownCast(m_imageactor3D->GetMapper()->GetInputAlgorithm());</div><div>        if (mapper) {</div><div>            mapper->SetLevel(level);</div><div>            mapper->SetWindow(window);</div><div>            mapper->Update();</div><div>        }</div></div><div><br></div><div>But the problem is that colour (brightness and contrast) from 2D viewer is different from 3D viewer. I attached a screenshot of the problem.</div><div><br></div><div>I really appreciate any help on this problem.</div><div><br></div><div>Cheers,</div><div><br></div><div>Waldo.</div><div><br></div><div><img name="3Dview.png" apple-inline="yes" id="FB400A3A-A292-45DA-9CAE-9D2667F7D25B" height="374" width="574" apple-width="yes" apple-height="yes" src="cid:FBA7FA21-F52B-4C38-86CE-F7AD2D485B96"><img name="2Dview.png" apple-inline="yes" id="4A1E8162-C9CE-48D4-AC93-D5AC36DE2688" height="379" width="569" apple-width="yes" apple-height="yes" src="cid:E72FDEA2-E2C4-4349-9712-E99379AB5085"></div></body></html>