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

Function ITKWindowing

Modules/Segmentation/src/Interactions/mitkMonaiLabelTool.cpp:345–361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343
344 template <typename TPixel, unsigned int VImageDimension>
345 void ITKWindowing(const itk::Image<TPixel, VImageDimension> *inputImage,
346 mitk::Image *mitkImage, mitk::ScalarType min, mitk::ScalarType max)
347 {
348 typedef itk::Image<TPixel, VImageDimension> ImageType;
349 typedef itk::IntensityWindowingImageFilter<ImageType, ImageType> IntensityFilterType;
350 typename IntensityFilterType::Pointer filter = IntensityFilterType::New();
351 filter->SetInput(inputImage);
352 filter->SetWindowMinimum(min);
353 filter->SetWindowMaximum(max);
354 filter->SetOutputMinimum(min);
355 filter->SetOutputMaximum(max);
356 filter->Update();
357
358 mitkImage->SetImportVolume(
359 (void *)(filter->GetOutput()->GetPixelContainer()->GetBufferPointer()), 0, 0, mitk::Image::ManageMemory);
360 filter->GetOutput()->GetPixelContainer()->ContainerManageMemoryOff();
361 }
362}
363
364mitk::Image::Pointer mitk::MonaiLabelTool::ApplyLevelWindowEffect(const Image *inputAtTimeStep) const

Callers

nothing calls this directly

Calls 5

SetImportVolumeMethod · 0.80
NewFunction · 0.50
SetInputMethod · 0.45
UpdateMethod · 0.45
GetOutputMethod · 0.45

Tested by

no test coverage detected