GDCM 2.2.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Directories
- Examples

- File List
- File Members

gdcmFile.h
Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program: GDCM (Grassroots DICOM). A DICOM library
    00004
    00005   Copyright (c) 2006-2011 Mathieu Malaterre
    00006   All rights reserved.
    00007   See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
    00008
    00009      This software is distributed WITHOUT ANY WARRANTY; without even
    00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00011      PURPOSE.  See the above copyright notice for more information.
    00012
    00013 =========================================================================*/
    00014 #ifndef GDCMFILE_H
    00015 #define GDCMFILE_H
    00016
    00017 #include "gdcmObject.h"
    00018 #include "gdcmDataSet.h"
    00019 #include "gdcmFileMetaInformation.h"
    00020
    00021 namespace gdcm
    00022 {
    00023
    00033 class GDCM_EXPORT File : public Object
    00034 {
    00035 public:
    00036   File() {};
    00037   ~File() {};
    00038
    00039   friend std::ostream &operator<<(std::ostream &os, const File &val);
    00040
    00042   std::istream &Read(std::istream &is);
    00043
    00045   std::ostream const &Write(std::ostream &os) const;
    00046
    00048   const FileMetaInformation &GetHeader() const { return Header; }
    00049
    00051   FileMetaInformation &GetHeader() { return Header; }
    00052
    00054   void SetHeader( const FileMetaInformation &fmi ) { Header = fmi; }
    00055
    00057   const DataSet &GetDataSet() const { return DS; }
    00058
    00060   DataSet &GetDataSet() { return DS; }
    00061
    00063   void SetDataSet( const DataSet &ds) { DS = ds; }
    00064
    00065 private:
    00066   FileMetaInformation Header;
    00067   DataSet DS;
    00068 };
    00069 //-----------------------------------------------------------------------------
    00070 inline std::ostream& operator<<(std::ostream &os, const File &val)
    00071 {
    00072   os << val.GetHeader() << std::endl;
    00073   //os << val.GetDataSet() << std::endl; // FIXME
    00074   assert(0);
    00075   return os;
    00076 }
    00077
    00078 } // end namespace gdcm
    00079
    00080 #endif //GDCMFILE_H