MCPcopy Create free account
hub / github.com/Kitware/VTK / SetColorLevel

Method SetColorLevel

Interaction/Image/vtkResliceImageViewer.cxx:478–490  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

476
477//------------------------------------------------------------------------------
478void vtkResliceImageViewer::SetColorLevel(double w)
479{
480 double rmin = w - 0.5 * fabs(this->GetColorWindow());
481 double rmax = rmin + fabs(this->GetColorWindow());
482 this->GetLookupTable()->SetRange(rmin, rmax);
483
484 this->WindowLevel->SetLevel(w);
485 if (vtkResliceCursorRepresentation* rep = vtkResliceCursorRepresentation::SafeDownCast(
486 this->ResliceCursorWidget->GetRepresentation()))
487 {
488 rep->SetWindowLevel(rep->GetWindow(), w, 1);
489 }
490}
491
492//------------------------------------------------------------------------------
493void vtkResliceImageViewer::Reset()

Callers 1

SetInputDataMethod · 0.95

Calls 7

GetLookupTableMethod · 0.95
GetColorWindowMethod · 0.80
SetLevelMethod · 0.80
GetRepresentationMethod · 0.80
GetWindowMethod · 0.80
SetRangeMethod · 0.45
SetWindowLevelMethod · 0.45

Tested by

no test coverage detected