MCPcopy Create free account
hub / github.com/MITK/MITK / ApplyColorTransferFunction

Method ApplyColorTransferFunction

Modules/RT/src/mitkDoseImageVtkMapper2D.cpp:598–612  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

596}
597
598void mitk::DoseImageVtkMapper2D::ApplyColorTransferFunction(mitk::BaseRenderer *renderer)
599{
600 mitk::TransferFunctionProperty::Pointer transferFunctionProp = dynamic_cast<mitk::TransferFunctionProperty *>(
601 this->GetDataNode()->GetProperty("Image Rendering.Transfer Function", renderer));
602
603 if (transferFunctionProp.IsNull())
604 {
605 MITK_ERROR << "'Image Rendering.Mode'' was set to use a color transfer function but there is no property 'Image "
606 "Rendering.Transfer Function'. Nothing will be done.";
607 return;
608 }
609 LocalStorage *localStorage = m_LSH.GetLocalStorage(renderer);
610 // pass the transfer function to our level window filter
611 localStorage->m_LevelWindowFilter->SetLookupTable(transferFunctionProp->GetValue()->GetColorTransferFunction());
612}
613
614void mitk::DoseImageVtkMapper2D::Update(mitk::BaseRenderer *renderer)
615{

Callers 1

ApplyRenderingModeMethod · 0.95

Calls 6

GetPropertyMethod · 0.45
GetDataNodeMethod · 0.45
IsNullMethod · 0.45
GetLocalStorageMethod · 0.45
SetLookupTableMethod · 0.45
GetValueMethod · 0.45

Tested by

no test coverage detected