GDCM  2.4.0
gdcmFile.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: GDCM (Grassroots DICOM). A DICOM library
4 
5  Copyright (c) 2006-2011 Mathieu Malaterre
6  All rights reserved.
7  See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notice for more information.
12 
13 =========================================================================*/
14 #ifndef GDCMFILE_H
15 #define GDCMFILE_H
16 
17 #include "gdcmObject.h"
18 #include "gdcmDataSet.h"
20 
21 namespace gdcm
22 {
23 
33 class GDCM_EXPORT File : public Object
34 {
35 public:
36  File() {};
37 
38  friend std::ostream &operator<<(std::ostream &os, const File &val);
39 
41  std::istream &Read(std::istream &is);
42 
44  std::ostream const &Write(std::ostream &os) const;
45 
47  const FileMetaInformation &GetHeader() const { return Header; }
48 
50  FileMetaInformation &GetHeader() { return Header; }
51 
53  void SetHeader( const FileMetaInformation &fmi ) { Header = fmi; }
54 
56  const DataSet &GetDataSet() const { return DS; }
57 
59  DataSet &GetDataSet() { return DS; }
60 
62  void SetDataSet( const DataSet &ds) { DS = ds; }
63 
64 private:
65  FileMetaInformation Header;
66  DataSet DS;
67 };
68 //-----------------------------------------------------------------------------
69 inline std::ostream& operator<<(std::ostream &os, const File &val)
70 {
71  os << val.GetHeader() << std::endl;
72  //os << val.GetDataSet() << std::endl; // FIXME
73  assert(0);
74  return os;
75 }
76 
77 } // end namespace gdcm
78 
79 #endif //GDCMFILE_H

Generated on Thu Oct 17 2013 10:05:56 for GDCM by doxygen 1.8.4
SourceForge.net Logo