MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkNavigationDataPassThroughFilter.cpp
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12
14
18
22
24{
25 // get each input and transfer the data
26 DataObjectPointerArray inputs = this->GetInputs(); //get all inputs
27 for ( unsigned int index = 0; index < inputs.size(); ++index )
28 {
29 // get the needed variables (input and output)
30 const mitk::NavigationData* nd = this->GetInput(index);
31 mitk::NavigationData* output = this->GetOutput(index);
32
33 if ( ! nd || ! output )
34 {
35 MITK_ERROR("NavigationDataToNavigationDataFilter")("NavigationDataPassThroughFilter")
36 << "Input and output must not be null.";
37 mitkThrow() << "Input and output must not be null.";
38 }
39
40 output->Graft(nd); // copy all information from input to output
41 output->SetDataValid(nd->IsDataValid());
42 }
43}
void GenerateData() override
Passes navigation data from all inputs to all outputs. If a subclass wants to implement its own versi...
void Graft(const DataObject *data) override
Graft the data and information from one NavigationData to another.
virtual bool IsDataValid() const
returns true if the object contains valid data