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

Method GenerateFillImage

Modules/Segmentation/src/Interactions/mitkCloseRegionTool.cpp:92–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92mitk::Image::Pointer mitk::CloseRegionTool::GenerateFillImage(const Image* workingSlice, Point3D seedPoint, mitk::Label::PixelType& seedLabelValue) const
93{
94 itk::Index<2> seedIndex;
95 workingSlice->GetGeometry()->WorldToIndex(seedPoint, seedIndex);
96
97 auto fillImage = Image::New();
98 fillImage->Initialize(workingSlice);
99
100 AccessFixedDimensionByItk_n(workingSlice, DoITKRegionClosing, 2, (fillImage, seedIndex, seedLabelValue));
101
102 if (seedLabelValue == MultiLabelSegmentation::UNLABELED_VALUE)
103 {
104 return nullptr;
105 }
106
107 return fillImage;
108}
109
110void mitk::CloseRegionTool::PrepareFilling(const Image* /*workingSlice*/, Point3D /*seedPoint*/)
111{

Callers

nothing calls this directly

Calls 4

GetGeometryMethod · 0.80
NewFunction · 0.50
WorldToIndexMethod · 0.45
InitializeMethod · 0.45

Tested by

no test coverage detected