gdcmFile.h
Go to the documentation of this file.
/*=========================================================================
Program: GDCM (Grassroots DICOM). A DICOM library
Copyright (c) 2006-2011 Mathieu Malaterre
All rights reserved.
See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef GDCMFILE_H
#define GDCMFILE_H
#include "gdcmObject.h"
#include "gdcmDataSet.h"
#include "gdcmFileMetaInformation.h"
namespace gdcm_ns
{
class GDCM_EXPORT File : public Object
{
public:
File();
~File() override;
friend std::ostream &operator<<(std::ostream &os, const File &val);
std::istream &Read(std::istream &is);
std::ostream const &Write(std::ostream &os) const;
const FileMetaInformation &GetHeader() const { return Header; }
FileMetaInformation &GetHeader() { return Header; }
void SetHeader( const FileMetaInformation &fmi ) { Header = fmi; }
const DataSet &GetDataSet() const { return DS; }
DataSet &GetDataSet() { return DS; }
void SetDataSet( const DataSet &ds) { DS = ds; }
private:
FileMetaInformation Header;
DataSet DS;
};
//-----------------------------------------------------------------------------
inline std::ostream& operator<<(std::ostream &os, const File &val)
{
os << val.GetHeader() << std::endl;
//os << val.GetDataSet() << std::endl; // FIXME
assert(0);
return os;
}
} // end namespace gdcm_ns
#endif //GDCMFILE_H
gdcm::DataSet
Class to represent a Data Set (which contains Data Elements).
Definition gdcmDataSet.h:56
gdcm::FileMetaInformation
Class to represent a File Meta Information.
Definition gdcmFileMetaInformation.h:41
gdcm::File::~File
~File() override
gdcm::File::SetHeader
void SetHeader(const FileMetaInformation &fmi)
Set File Meta Information.
Definition gdcmFile.h:54
gdcm::File::Write
std::ostream const & Write(std::ostream &os) const
Write.
gdcm::File::SetDataSet
void SetDataSet(const DataSet &ds)
Set Data Set.
Definition gdcmFile.h:63
gdcm::File::GetDataSet
const DataSet & GetDataSet() const
Get Data Set.
Definition gdcmFile.h:57
gdcm::File::GetHeader
FileMetaInformation & GetHeader()
Get File Meta Information.
Definition gdcmFile.h:51
gdcm::File::Read
std::istream & Read(std::istream &is)
Read.
gdcm::File::GetHeader
const FileMetaInformation & GetHeader() const
Get File Meta Information.
Definition gdcmFile.h:48
gdcm::File::GetDataSet
DataSet & GetDataSet()
Get Data Set.
Definition gdcmFile.h:60
gdcm::File::operator<<
friend std::ostream & operator<<(std::ostream &os, const File &val)
Definition gdcmFile.h:70
gdcm::File::File
File()
gdcm::Object::Object
Object()
Definition gdcmObject.h:42
gdcmDataSet.h
gdcmFileMetaInformation.h
gdcmObject.h
GDCM_EXPORT
#define GDCM_EXPORT
Definition gdcmWin32.h:34