STIR  6.2.0
ChainedDataProcessor.h
Go to the documentation of this file.
1 //
2 //
3 /*
4  Copyright (C) 2000- 2011, Hammersmith Imanet Ltd
5  This file is part of STIR.
6 
7  SPDX-License-Identifier: Apache-2.0
8 
9  See STIR/LICENSE.txt for details
10 */
20 #ifndef __stir_ChainedDataProcessor_H__
21 #define __stir_ChainedDataProcessor_H__
22 
24 #include "stir/DataProcessor.h"
25 #include "stir/shared_ptr.h"
26 
27 START_NAMESPACE_STIR
28 
61 template <typename DataT>
63  : public RegisteredParsingObject<ChainedDataProcessor<DataT>, DataProcessor<DataT>, DataProcessor<DataT>>
64 {
65 private:
67 
68 public:
69  static const char* const registered_name;
70 
72  explicit ChainedDataProcessor(shared_ptr<DataProcessor<DataT>> apply_first = shared_ptr<DataProcessor<DataT>>(),
73  shared_ptr<DataProcessor<DataT>> apply_second = shared_ptr<DataProcessor<DataT>>());
74 
75 private:
76  shared_ptr<DataProcessor<DataT>> apply_first;
77  shared_ptr<DataProcessor<DataT>> apply_second;
78 
79  void set_defaults() override;
80  void initialise_keymap() override;
81 
82  Succeeded virtual_set_up(const DataT& data) override;
83 
84  void virtual_apply(DataT& out_data, const DataT& in_data) const override;
85  void virtual_apply(DataT& data) const override;
86 };
87 
88 END_NAMESPACE_STIR
89 
90 #endif
A class in the DataProcessor hierarchy that calls 2 DataProcessors in sequence.
Definition: ChainedDataProcessor.h:62
Declaration of class stir::DataProcessor.
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast (or corresponding b...
Base class that defines an interface for classes that do data processing.
Definition: DataProcessor.h:46
Parent class for all leaves in a RegisteredObject hierarchy that do parsing of parameter files...
Definition: RegisteredParsingObject.h:77
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43
Declaration of class stir::RegisteredParsingObject.