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

Method SetRegionOfInterest

Modules/AlgorithmsExt/src/mitkMaskAndCutRoiImageFilter.cpp:29–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29void mitk::MaskAndCutRoiImageFilter::SetRegionOfInterest(mitk::BaseData *roi)
30{
31 mitk::Image::Pointer image = dynamic_cast<mitk::Image *>(roi);
32
33 if (image.IsNotNull())
34 {
35 this->SetInput(1, image);
36 return;
37 }
38
39 mitk::BoundingObject::Pointer boundingObject = dynamic_cast<mitk::BoundingObject *>(roi);
40 if (boundingObject.IsNotNull() && this->GetInput(0) != nullptr)
41 {
42 mitk::BoundingObjectToSegmentationFilter::Pointer filter = mitk::BoundingObjectToSegmentationFilter::New();
43 filter->SetBoundingObject(boundingObject);
44 filter->SetInput(this->GetInput(0));
45 filter->Update();
46
47 this->SetInput(1, filter->GetOutput());
48 return;
49 }
50}
51
52mitk::Image::Pointer mitk::MaskAndCutRoiImageFilter::GetOutput()
53{

Callers 5

OnRoiDataChangedMethod · 0.80
mitkMultiGaussianTestFunction · 0.80
GenerateDataMethod · 0.80
ITKCrop3DImageMethod · 0.80

Calls 7

IsNotNullMethod · 0.80
NewFunction · 0.50
SetInputMethod · 0.45
GetInputMethod · 0.45
SetBoundingObjectMethod · 0.45
UpdateMethod · 0.45
GetOutputMethod · 0.45

Tested by 1

mitkMultiGaussianTestFunction · 0.64