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

Method GenerateOutputInformation

Modules/AlgorithmsExt/src/mitkPlaneFit.cpp:30–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30void mitk::PlaneFit::GenerateOutputInformation()
31{
32 mitk::PointSet::ConstPointer input = this->GetInput();
33 mitk::GeometryData::Pointer output = this->GetOutput();
34
35 itkDebugMacro(<< "GenerateOutputInformation()");
36
37 if (input.IsNull())
38 return;
39
40 if (m_PointSet == nullptr)
41 {
42 return;
43 }
44
45 bool update = false;
46 if (output->GetGeometry() == nullptr || output->GetTimeGeometry() == nullptr)
47 update = true;
48 if ((!update) && (output->GetTimeGeometry()->CountTimeSteps() != input->GetTimeGeometry()->CountTimeSteps()))
49 update = true;
50 if (update)
51 {
52 mitk::PlaneGeometry::Pointer planeGeometry = mitk::PlaneGeometry::New();
53
54 ProportionalTimeGeometry::Pointer timeGeometry =
55 dynamic_cast<ProportionalTimeGeometry *>(m_TimeGeometry.GetPointer());
56 timeGeometry->Initialize(planeGeometry, m_PointSet->GetPointSetSeriesSize());
57 // m_TimeGeometry->InitializeEvenlyTimed(
58 // planeGeometry, m_PointSet->GetPointSetSeriesSize() );
59
60 TimeStepType timeStep;
61 for (timeStep = 0; (timeStep < m_PointSet->GetPointSetSeriesSize()) && (timeStep < m_Planes.size()); ++timeStep)
62 {
63 timeGeometry->SetTimeStepGeometry(m_Planes[timeStep], timeStep);
64 }
65
66 output->SetTimeGeometry(m_TimeGeometry);
67 }
68}
69
70void mitk::PlaneFit::GenerateData()
71{

Callers

nothing calls this directly

Calls 12

GetInputMethod · 0.95
GetGeometryMethod · 0.80
GetPointerMethod · 0.80
GetPointSetSeriesSizeMethod · 0.80
SetTimeGeometryMethod · 0.80
NewFunction · 0.50
GetOutputMethod · 0.45
IsNullMethod · 0.45
CountTimeStepsMethod · 0.45
InitializeMethod · 0.45
sizeMethod · 0.45
SetTimeStepGeometryMethod · 0.45

Tested by

no test coverage detected