STIR  6.2.0
Public Member Functions | Static Public Attributes | List of all members
stir::ChainedDataProcessor< DataT > Class Template Reference

A class in the DataProcessor hierarchy that calls 2 DataProcessors in sequence. More...

#include "stir/ChainedDataProcessor.h"

Inheritance diagram for stir::ChainedDataProcessor< DataT >:
Inheritance graph
[legend]

Public Member Functions

 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.
 
- Public Member Functions inherited from stir::RegisteredParsingObject< ChainedDataProcessor< DataT >, DataProcessor< DataT >, DataProcessor< DataT > >
std::string get_registered_name () const override
 Returns Derived::registered_name.
 
std::string parameter_info () override
 Returns a string with all parameters and their values, in a form suitable for parsing again.
 
- Public Member Functions inherited from stir::DataProcessor< DataT >
Succeeded set_up (const DataT &data)
 Initialises any internal data (if necessary) using data as a template for sizes, sampling distances etc. More...
 
virtual void reset ()
 Makes sure we will ignore any previous call to set-up() More...
 
Succeeded apply (DataT &data)
 Calls set_up() (if not already done before) and process data in-place. More...
 
Succeeded apply (DataT &out_data, const DataT &in_data)
 Calls set_up() (if not already done before) and process in_data, putting the result in out_data. More...
 
bool parse (std::istream &f)
 
bool parse (const char *const filename)
 
- Public Member Functions inherited from stir::ParsingObject
 ParsingObject (const ParsingObject &)
 
ParsingObjectoperator= (const ParsingObject &)
 
void ask_parameters ()
 
bool parse (std::istream &f)
 
bool parse (const char *const filename)
 
- Public Member Functions inherited from stir::TimedObject
void reset_timers ()
 reset all timers kept by this object
 
void stop_timers () const
 stop all timers kept by this object More...
 
void start_timers (bool do_reset=false) const
 start all timers kept by this object More...
 
double get_CPU_timer_value () const
 get current value of the CPU timer (since first use or last reset)
 
double get_wall_clock_timer_value () const
 get current value of the wall-clock timer (since first use or last reset)
 

Static Public Attributes

static const char *const registered_name = "Chained Data Processor"
 

Additional Inherited Members

- Static Public Member Functions inherited from stir::RegisteredParsingObject< ChainedDataProcessor< DataT >, DataProcessor< DataT >, DataProcessor< DataT > >
static DataProcessor< DataT > * read_from_stream (std::istream *)
 Construct a new object (of type Derived) by parsing the istream. More...
 
- Static Public Member Functions inherited from stir::RegisteredObject< DataProcessor< DataT > >
static DataProcessor< DataT > * read_registered_object (std::istream *in, const std::string &registered_name)
 Construct a new object (of a type derived from Root, its actual type determined by the registered_name parameter) by parsing the istream. More...
 
static DataProcessor< DataT > * ask_type_and_parameters ()
 ask the user for the type, and then calls read_registered_object(0, type) More...
 
static void list_registered_names (std::ostream &stream)
 List all possible registered names to the stream. More...
 
- Protected Types inherited from stir::RegisteredObject< DataProcessor< DataT > >
typedef DataProcessor< DataT > *(* RootFactory) (std::istream *)
 The type of a root factory is a function, taking an istream* as argument, and returning a Root*.
 
typedef FactoryRegistry< std::string, RootFactory, interfile_lessRegistryType
 The type of the registry.
 
- Protected Member Functions inherited from stir::ParsingObject
virtual bool post_processing ()
 This will be called at the end of the parsing. More...
 
virtual void set_key_values ()
 This will be called before parsing or parameter_info is called. More...
 
- Static Protected Member Functions inherited from stir::RegisteredObject< DataProcessor< DataT > >
static RegistryTyperegistry ()
 Static function returning the registry. More...
 
- Protected Attributes inherited from stir::ParsingObject
KeyParser parser
 

Detailed Description

template<typename DataT>
class stir::ChainedDataProcessor< DataT >

A class in the DataProcessor hierarchy that calls 2 DataProcessors in sequence.

As it is derived from RegisteredParsingObject, it implements all the necessary things to parse parameter files etc.

Warning
The 2 argument version of ChainedDataProcessor::apply calls the first data processor with a temporary output data with the same characteristics as the input data.
ChainedDataProcessor::set_up builds only the data processor of the first in the data processor chain. This is because at this point, we do not really know what the first data processor will do to the data (it might change index ranges or so), so it is impossible to build the 2nd data processor without actually letting the first data processor process the data (which might be far too expensive). This is not a real problem however, as ChainedDataProcessor::apply is fine as it will call virtual_set_up for the 2nd data processor anyway.
Parameters used for parsing
Chained Data Processor Parameters:=
Data Processor to apply first:=
Data Processor to apply second:=
END Chained Data Processor Parameters:=

The documentation for this class was generated from the following files: