| 644 | } |
| 645 | |
| 646 | void mitk::ImageVtkMapper2D::ApplyColorTransferFunction(mitk::BaseRenderer *renderer) |
| 647 | { |
| 648 | mitk::TransferFunctionProperty::Pointer transferFunctionProp = dynamic_cast<mitk::TransferFunctionProperty *>( |
| 649 | this->GetDataNode()->GetProperty("Image Rendering.Transfer Function", renderer)); |
| 650 | |
| 651 | if (transferFunctionProp.IsNull()) |
| 652 | { |
| 653 | MITK_ERROR << "'Image Rendering.Mode'' was set to use a color transfer function but there is no property 'Image " |
| 654 | "Rendering.Transfer Function'. Nothing will be done."; |
| 655 | return; |
| 656 | } |
| 657 | LocalStorage *localStorage = m_LSH.GetLocalStorage(renderer); |
| 658 | // pass the transfer function to our level window filter |
| 659 | localStorage->m_LevelWindowFilter->SetLookupTable(transferFunctionProp->GetValue()->GetColorTransferFunction()); |
| 660 | localStorage->m_LevelWindowFilter->SetOpacityPiecewiseFunction( |
| 661 | transferFunctionProp->GetValue()->GetScalarOpacityFunction()); |
| 662 | } |
| 663 | |
| 664 | void mitk::ImageVtkMapper2D::SetToInvalidState(mitk::ImageVtkMapper2D::LocalStorage* localStorage) |
| 665 | { |
no test coverage detected