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

Method SetPlanarFigure

Modules/ImageStatistics/src/mitkPlanarFigureMaskGenerator.cpp:41–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39{
40
41void PlanarFigureMaskGenerator::SetPlanarFigure(mitk::PlanarFigure* planarFigure)
42{
43 if (nullptr == planarFigure )
44 {
45 throw std::runtime_error( "Error: planar figure empty!" );
46 }
47
48 const PlaneGeometry *planarFigurePlaneGeometry = planarFigure->GetPlaneGeometry();
49 if ( planarFigurePlaneGeometry == nullptr )
50 {
51 throw std::runtime_error( "Planar-Figure not yet initialized!" );
52 }
53
54 const auto *planarFigureGeometry =
55 dynamic_cast< const PlaneGeometry * >( planarFigurePlaneGeometry );
56 if ( planarFigureGeometry == nullptr )
57 {
58 throw std::runtime_error( "Non-planar planar figures not supported!" );
59 }
60
61 if (planarFigure != m_PlanarFigure)
62 {
63 this->Modified();
64 m_PlanarFigure = planarFigure;
65 }
66
67}
68
69mitk::Image::ConstPointer PlanarFigureMaskGenerator::GetReferenceImage()
70{

Callers 15

RunComputationMethod · 0.80
TestCase1Method · 0.80
TestCase2Method · 0.80
TestCase3Method · 0.80
TestCase4Method · 0.80
TestCase5Method · 0.80
TestCase6Method · 0.80
TestCase7Method · 0.80
TestCase8Method · 0.80
TestCase9Method · 0.80
TestCase10Method · 0.80
TestCase11Method · 0.80

Calls 2

GetPlaneGeometryMethod · 0.45
ModifiedMethod · 0.45

Tested by 14

TestCase1Method · 0.64
TestCase2Method · 0.64
TestCase3Method · 0.64
TestCase4Method · 0.64
TestCase5Method · 0.64
TestCase6Method · 0.64
TestCase7Method · 0.64
TestCase8Method · 0.64
TestCase9Method · 0.64
TestCase10Method · 0.64
TestCase11Method · 0.64
TestCase12Method · 0.64