|
STIR 6.4.0
|
Base class that defines an interface for classes that do data processing. More...
#include "stir/DataProcessor.h"

Public Member Functions | |
| Succeeded | set_up (const DataT &data) |
| Initialises any internal data (if necessary) using data as a template for sizes, sampling distances etc. | |
| virtual void | reset () |
| Makes sure we will ignore any previous call to set-up() | |
| Succeeded | apply (DataT &data) |
| Calls set_up() (if not already done before) and process data in-place. | |
| 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. | |
Public Member Functions inherited from stir::RegisteredObjectBase | |
| virtual std::string | get_registered_name () const =0 |
| Returns the name of the type of the object. | |
Public Member Functions inherited from stir::ParsingObject | |
| ParsingObject (const ParsingObject &) | |
| ParsingObject & | operator= (const ParsingObject &) |
| bool | parse (std::istream &f) |
| bool | parse (const char *const filename) |
| void | ask_parameters () |
| virtual std::string | parameter_info () |
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 | |
| void | start_timers (bool do_reset=false) const |
| start all timers kept by this object | |
| 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) | |
parsing functions | |
parse() returns false if there is some error, true otherwise. These call reset() first, and then ParsingObject::parse | |
| bool | parse (std::istream &f) |
| bool | parse (const char *const filename) |
| virtual Succeeded | virtual_set_up (const DataT &)=0 |
| Will be called to build any internal parameters. | |
| virtual void | virtual_apply (DataT &data, const DataT &in_data) const =0 |
| Performs actual operation (virtual_set_up is called before this function) | |
| virtual void | virtual_apply (DataT &data) const =0 |
| Performs actual operation (in-place) | |
Additional Inherited Members | |
Static Public Member Functions inherited from stir::RegisteredObject< DataProcessor< DataT > > | |
| static DataProcessor< DataT > * | read_registered_object (std::istream *in, const std::string ®istered_name) |
| Construct a new object (of a type derived from Root, its actual type determined by the registered_name parameter) by parsing the istream. | |
| static DataProcessor< DataT > * | ask_type_and_parameters () |
| ask the user for the type, and then calls read_registered_object(0, type) | |
| static void | list_registered_names (std::ostream &stream) |
| List all possible registered names to the stream. | |
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_less > | RegistryType |
| The type of the registry. | |
| virtual void | set_defaults () |
| Set defaults before parsing. | |
| virtual void | initialise_keymap () |
| Initialise all keywords. | |
| virtual bool | post_processing () |
| This will be called at the end of the parsing. | |
| virtual void | set_key_values () |
| This will be called before parsing or parameter_info is called. | |
Static Protected Member Functions inherited from stir::RegisteredObject< DataProcessor< DataT > > | |
| static RegistryType & | registry () |
| Static function returning the registry. | |
| KeyParser | parser |
Base class that defines an interface for classes that do data processing.
Classes at the end of the DataProcessor hierarchy have to be able to parse parameter files etc. Moreover, it has to be possible to construct an DataProcessor object while parsing, where the actual type of derived class is determined at run-time. Luckily, this is exactly the situation that RegisteredObject and RegisteredParsingObject are supposed to handle. So, all this functionality is achieved by deriving DataProcessor from the appropriate RegisteredObject class, and deriving the 'leaves' from RegisteredParsingObject.
|
inline |
Initialises any internal data (if necessary) using data as a template for sizes, sampling distances etc.
The reason that DataProcessor does not perform this check is that it does not know what the requirements are to call the 2 densities 'compatible'.
References set_up(), stir::TimedObject::start_timers(), stir::TimedObject::stop_timers(), and virtual_set_up().
Referenced by apply(), apply(), stir::ReconstructionTests< TargetT >::construct_input_data(), and set_up().
|
inlinevirtual |
Makes sure we will ignore any previous call to set-up()
If you change any internal variables of the data-processor, or are calling it on data if different size or so, you first have to call reset() such that the data-processor will call set_up() when necessary.
A derived class could overload reset() to re-initialise any internal variables, but this is not required.
References reset().
Referenced by reset().
|
inline |
Calls set_up() (if not already done before) and process data in-place.
If set_up() returns Succeeded::false, a warning message is written, and the data is not changed.
References apply(), and set_up().
Referenced by apply(), apply(), stir::ReconstructionTests< TargetT >::construct_input_data(), and stir::find_fwhm_in_imageTests::run_tests().
|
inline |
Calls set_up() (if not already done before) and process in_data, putting the result in out_data.
If set_up() returns Succeeded::false, a warning message is written, and the out_data is not changed.
References apply(), set_up(), and stir::warning().
|
protectedpure virtual |
Will be called to build any internal parameters.
Implemented in stir::HUToMuImageProcessor< TargetT >.
Referenced by set_up().
|
protectedpure virtual |
Performs actual operation (virtual_set_up is called before this function)
Implemented in stir::HUToMuImageProcessor< TargetT >.
|
protectedpure virtual |
Performs actual operation (in-place)
Implemented in stir::HUToMuImageProcessor< TargetT >.