STIR 6.4.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
27START_NAMESPACE_STIR
28
60
61template <typename DataT>
63 : public RegisteredParsingObject<ChainedDataProcessor<DataT>, DataProcessor<DataT>, DataProcessor<DataT>>
64{
65private:
67
68public:
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
75private:
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
88END_NAMESPACE_STIR
89
90#endif
Declaration of class stir::DataProcessor.
Declaration of class stir::RegisteredParsingObject.
ChainedDataProcessor(shared_ptr< DataProcessor< DataT > > apply_first=shared_ptr< DataProcessor< DataT > >(), shared_ptr< DataProcessor< DataT > > apply_second=shared_ptr< DataProcessor< DataT > >())
Construct given DataProcessor parameters.
Definition ChainedDataProcessor.cxx:76
Base class that defines an interface for classes that do data processing.
Definition DataProcessor.h:47
Parent class for all leaves in a RegisteredObject hierarchy that do parsing of parameter files.
Definition RegisteredParsingObject.h:78
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition Succeeded.h:44
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast into the stir names...