vega
file.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include <memory>
5 
6 #include "vega/dicom/reader.h"
7 #include "vega/dicom/preamble.h"
8 #include "vega/dicom/file_meta.h"
9 #include "vega/dicom/data_set.h"
10 #include "vega/dicom/sop_class.h"
12 
13 namespace vega {
14  namespace dicom {
23  class File {
24  private:
25  std::shared_ptr<Preamble> m_preamble;
26  std::shared_ptr<FileMeta> m_file_meta;
27  std::shared_ptr<DataSet> m_data_set;
28 
29  static const std::vector<TransferSyntax>& trial_transfer_syntaxes_when_missing_file_meta();
30 
31  public:
39  File(const std::string& file_name, bool allow_any_explicit_vr = false);
40 
49  File(std::shared_ptr<std::istream> input, bool allow_any_explicit_vr = false);
50 
58  File(const SOPClass& sop_class);
59 
68  File(const SOPClass& sop_class, const UID& media_storage_instance_uid);
69 
71  const std::shared_ptr<FileMeta>& file_meta() const;
73  const std::shared_ptr<DataSet>& data_set() const;
74 
78  void write(const std::string& filename) const;
85  void write(std::shared_ptr<std::ostream> os) const;
86  };
87  }
88 }
const std::shared_ptr< FileMeta > & file_meta() const
Definition: uid.h:6
A class which wraps the media storage SOP class.
Definition: sop_class.h:20
A class which is used to read/build a DICOM file.
Definition: file.h:23
const std::shared_ptr< DataSet > & data_set() const
void write(const std::string &filename) const
Definition: age.h:6
File(const std::string &file_name, bool allow_any_explicit_vr=false)
Reads in existing file with the given file_name.