STIR 6.4.0
ITKOutputFileFormat.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2013, Institute for Bioengineering of Catalonia
3 Copyright (C) 2018, Commonwealth Scientific and Industrial Research Organisation
4 Australian eHealth Research Centre
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_ITKOutputFileFormat_H__
22#define __stir_IO_ITKOutputFileFormat_H__
23
26
27START_NAMESPACE_STIR
28
29template <int num_dimensions, typename elemT>
30class DiscretisedDensity;
31
55class ITKOutputFileFormat : public RegisteredParsingObject<ITKOutputFileFormat,
56 OutputFileFormat<DiscretisedDensity<3, float>>,
57 OutputFileFormat<DiscretisedDensity<3, float>>>
58{
59private:
60 typedef RegisteredParsingObject<ITKOutputFileFormat,
63 base_type;
64
65public:
67 static const char* const registered_name;
68
70
71 std::string default_extension;
72
73 ITKOutputFileFormat(const NumericType& = NumericType::FLOAT, const ByteOrder& = ByteOrder::native);
74
75 ByteOrder set_byte_order(const ByteOrder&, const bool warn = false) override;
76
77protected:
78 Succeeded actual_write_to_file(std::string& output_filename, const DiscretisedDensity<3, float>& density) const override;
79
80 void set_defaults() override;
81 void initialise_keymap() override;
82 bool post_processing() override;
83};
84
85END_NAMESPACE_STIR
86
87#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
void set_defaults() override
Set defaults before parsing.
Definition ITKOutputFileFormat.cxx:43
std::string default_extension
default extension to use if none present
Definition ITKOutputFileFormat.h:71
static const char *const registered_name
Name which will be used when parsing an OutputFileFormat object.
Definition ITKOutputFileFormat.h:67
bool post_processing() override
This will be called at the end of the parsing.
Definition ITKOutputFileFormat.cxx:59
Succeeded actual_write_to_file(std::string &output_filename, const DiscretisedDensity< 3, float > &density) const override
virtual function called by write_to_file()
Definition ITKOutputFileFormat.cxx:75
void initialise_keymap() override
Initialise all keywords.
Definition ITKOutputFileFormat.cxx:50
ByteOrder set_byte_order(const ByteOrder &, const bool warn=false) override
set byte order used for output
Definition ITKOutputFileFormat.cxx:68
provides names for some numeric types and methods for finding their properties.
Definition NumericType.h:55
Base class for classes that create output files.
Definition OutputFileFormat.h:56
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