STIR 6.4.0
ECAT7OutputFileFormat.h
Go to the documentation of this file.
1//
2//
3/*
4 Copyright (C) 2002-2007, 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
21#ifndef __stir_IO_ECAT7OutputFileFormat_H__
22#define __stir_IO_ECAT7OutputFileFormat_H__
23
26// include for namespace macros
28#include <string>
29
30START_NAMESPACE_STIR
31
32template <int num_dimensions, typename elemT>
33class DiscretisedDensity;
34
35START_NAMESPACE_ECAT
36START_NAMESPACE_ECAT7
37
46class ECAT7OutputFileFormat : public RegisteredParsingObject<ECAT7OutputFileFormat,
47 OutputFileFormat<DiscretisedDensity<3, float>>,
48 OutputFileFormat<DiscretisedDensity<3, float>>>
49{
50private:
51 typedef RegisteredParsingObject<ECAT7OutputFileFormat,
52 OutputFileFormat<DiscretisedDensity<3, float>>,
53 OutputFileFormat<DiscretisedDensity<3, float>>>
54 base_type;
55
56public:
58 static const char* const registered_name;
59
60 ECAT7OutputFileFormat(const NumericType& = NumericType::SHORT, const ByteOrder& = ByteOrder::native);
61
63
64 virtual NumericType set_type_of_numbers(const NumericType&, const bool warn = false);
66
67 virtual ByteOrder set_byte_order(const ByteOrder&, const bool warn = false);
68 // virtual ByteOrder set_byte_order_and_type_of_numbers(ByteOrder&, NumericType&, const bool warn = false);
69public:
70 std::string default_scanner_name;
71
72protected:
73 virtual Succeeded actual_write_to_file(std::string& output_filename, const DiscretisedDensity<3, float>& density) const;
74
75 virtual void set_defaults();
76 virtual void initialise_keymap();
77 virtual bool post_processing();
78};
79
80END_NAMESPACE_ECAT7
81END_NAMESPACE_ECAT
82END_NAMESPACE_STIR
83
84#endif
Declaration of class stir::OutputFileFormat.
Declaration of class stir::RegisteredParsingObject.
This class provides member functions to find out what byte-order your machine is and to swap numbers.
Definition ByteOrder.h:100
@ native
Definition ByteOrder.h:107
This abstract class is the basis for all image representations.
Definition DiscretisedDensity.h:99
provides names for some numeric types and methods for finding their properties.
Definition NumericType.h:55
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
virtual bool post_processing()
This will be called at the end of the parsing.
Definition ECAT7OutputFileFormat.cxx:60
virtual void set_defaults()
Set defaults before parsing.
Definition ECAT7OutputFileFormat.cxx:49
virtual void initialise_keymap()
Initialise all keywords.
Definition ECAT7OutputFileFormat.cxx:40
static const char *const registered_name
Name which will be used when parsing an OutputFileFormat object.
Definition ECAT7OutputFileFormat.h:58
virtual Succeeded actual_write_to_file(std::string &output_filename, const DiscretisedDensity< 3, float > &density) const
virtual function called by write_to_file()
Definition ECAT7OutputFileFormat.cxx:106
virtual NumericType set_type_of_numbers(const NumericType &, const bool warn=false)
Set type of numbers to be used for output.
Definition ECAT7OutputFileFormat.cxx:77
virtual ByteOrder set_byte_order(const ByteOrder &, const bool warn=false)
Set byte order to be used for output.
Definition ECAT7OutputFileFormat.cxx:92
Declaration of routines which convert ECAT things into our building blocks and vice versa.