STIR  6.2.0
ITKImageInputFileFormat.h
Go to the documentation of this file.
1 #ifndef __stir_IO_ITKInputFileFormat_h__
2 #define __stir_IO_ITKInputFileFormat_h__
3 /*
4  Copyright (C) 2013, Institute for Bioengineering of Catalonia
5  Copyright (C) 2014, University College London
6  Copyright (C) 2018, Commonwealth Scientific and Industrial Research Organisation
7  Australian eHealth Research Centre
8  This file is part of STIR.
9  SPDX-License-Identifier: Apache-2.0
10 
11  See STIR/LICENSE.txt for details
12 */
24 
25 START_NAMESPACE_STIR
26 
28 
43 template <typename STIRImageType = DiscretisedDensity<3, float>>
44 class ITKImageInputFileFormat : public InputFileFormat<STIRImageType>
45 {
46 
47 public:
49  bool can_read(const FileSignature& signature, std::istream& input) const override;
51  bool can_read(const FileSignature& signature, const std::string& filename) const override;
52 
53  const std::string get_name() const override { return "ITK"; }
54 
55 protected:
56  bool actual_can_read(const FileSignature& signature, std::istream& input) const override;
57 
59  unique_ptr<STIRImageType> read_from_file(std::istream& input) const override;
60 
62  unique_ptr<STIRImageType> read_from_file(const std::string& filename) const override;
63 };
64 END_NAMESPACE_STIR
65 
66 #endif
A class to read/store the file signature.
Definition: FileSignature.h:34
Declaration of class stir::InputFileFormat.
defines the stir::DiscretisedDensity class
unique_ptr< DataT > read_from_file(const FileSignature &signature, FileT file)
Function that reads data from file using the default InputFileFormatRegistry, using the provided File...
Definition: read_from_file.h:46
Base-class for file-formats for reading.
Definition: InputFileFormat.h:39
Class for reading images using ITK.
Definition: ITKImageInputFileFormat.h:44