STIR  6.2.0
ProjDataInterfile.h
Go to the documentation of this file.
1 
9 /*
10  Copyright (C) 2002 - 2009-06-22, Hammersmith Imanet Ltd
11  Copyright (C) 2012-06-06, Kris Thielemans
12  Copyright (C) 2013, University College London
13  This file is part of STIR.
14 
15  SPDX-License-Identifier: Apache-2.0
16 
17  See STIR/LICENSE.txt for details
18 */
19 #ifndef __stir_ProjDataInterfile_H__
20 #define __stir_ProjDataInterfile_H__
21 
23 #include "stir/shared_ptr.h"
24 
25 #include <iostream>
26 #include <string>
27 
28 START_NAMESPACE_STIR
29 
39 {
40 public:
42 
60  ProjDataInterfile(shared_ptr<const ExamInfo> const& exam_info_sptr,
61  shared_ptr<const ProjDataInfo> const& proj_data_info_ptr,
62  const std::string& filename,
63  const std::ios::openmode,
64  const std::vector<int>& segment_sequence_in_stream,
65  StorageOrder o = Segment_View_AxialPos_TangPos,
66  NumericType data_type = NumericType::FLOAT,
67  ByteOrder byte_order = ByteOrder::native,
68  float scale_factor = 1);
69 
71 
74  ProjDataInterfile(shared_ptr<const ExamInfo> const& exam_info_sptr,
75  shared_ptr<const ProjDataInfo> const& proj_data_info_ptr,
76  const std::string& filename,
77  const std::ios::openmode open_mode = std::ios::out,
78  StorageOrder o = Segment_View_AxialPos_TangPos,
79  NumericType data_type = NumericType::FLOAT,
80  ByteOrder byte_order = ByteOrder::native,
81  float scale_factor = 1);
82 
83 private:
84  void create_stream(const std::string& filename, const std::ios::openmode open_mode);
85 };
86 
87 END_NAMESPACE_STIR
88 
89 #endif
Declaration of class stir::ProjDataFromStream.
This class provides member functions to find out what byte-order your machine is and to swap numbers...
Definition: ByteOrder.h:99
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast (or corresponding b...
A class which reads/writes projection data from/to a (binary) stream, but creates the corresponding I...
Definition: ProjDataInterfile.h:38
A class which reads/writes projection data from/to a (binary) stream.
Definition: ProjDataFromStream.h:56
provides names for some numeric types and methods for finding their properties.
Definition: NumericType.h:54