Program: gdcm
Module: $RCSfile: gdcmDicomDir.cxx,v $
Language: C++
- Date: $Date: 2004/10/22 03:05:40 $
- Version: $Revision: 1.74 $
+ Date: $Date: 2004/10/25 04:08:19 $
+ Version: $Revision: 1.75 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
}
else // after root directory parsing
{
- std::list<Element> elemList;
- elemList=Global::GetDicomDirElements()->GetDicomDirMetaElements();
- m->FillObject(elemList);
- }
+ ListDicomDirMetaElem const & elemList =
+ Global::GetDicomDirElements()->GetDicomDirMetaElements();
+ m->FillObject(elemList);
+ }
m->SetSQItemNumber(0); // To avoid further missprinting
return m;
}
*/
DicomDirPatient * DicomDir::NewPatient()
{
- std::list<Element>::iterator it;
+ ListDicomDirPatientElem::const_iterator it;
uint16_t tmpGr,tmpEl;
DictEntry *dictEntry;
ValEntry *entry;
- std::list<Element> elemList;
- elemList=Global::GetDicomDirElements()->GetDicomDirPatientElements();
+ ListDicomDirPatientElem const & elemList =
+ Global::GetDicomDirElements()->GetDicomDirPatientElements();
SQItem *s = new SQItem(0);
// for all the DicomDirPatient Elements
* GDCM_DICOMDIR_STUDY, GDCM_DICOMDIR_SERIE ...)
* @param header Header of the current file
*/
-void DicomDir::SetElement(std::string &path,DicomDirType type,
- Document *header)
+void DicomDir::SetElement(std::string &path, DicomDirType type,
+ Document *header)
{
- std::list<Element> elemList;
- std::list<Element>::iterator it;
+ ListDicomDirElem elemList; //FIXME this is going to be a by copy operation
+ ListDicomDirElem::const_iterator it;
uint16_t tmpGr, tmpEl;
DictEntry *dictEntry;
ValEntry *entry;
}
+//-----------------------------------------------------------------------------
/**
* \brief CallStartMethod
*/
}
}
+//-----------------------------------------------------------------------------
/**
* \ingroup DicomDir
* \brief CallProgressMethod
}
}
+//-----------------------------------------------------------------------------
/**
* \ingroup DicomDir
* \brief CallEndMethod
if( (*itp)->GetDicomDirStudies().size() > 0 )
{
- ListDicomDirStudy::iterator itst=(*itp)->GetDicomDirStudies().end();
+ ListDicomDirStudy::const_iterator itst =
+ (*itp)->GetDicomDirStudies().end();
itst--;
(*itst)->AddDicomDirSerie(new DicomDirSerie(s, &TagHT));
}
if( (*itp)->GetDicomDirStudies().size() > 0 )
{
- ListDicomDirStudy::iterator itst = (*itp)->GetDicomDirStudies().end();
+ ListDicomDirStudy::const_iterator itst =
+ (*itp)->GetDicomDirStudies().end();
itst--;
if( (*itst)->GetDicomDirSeries().size() > 0 )
{
- ListDicomDirSerie::iterator its = (*itst)->GetDicomDirSeries().end();
+ ListDicomDirSerie::const_iterator its = (*itst)->GetDicomDirSeries().end();
its--;
(*its)->AddDicomDirImage(new DicomDirImage(s, &TagHT));
}
Program: gdcm
Module: $RCSfile: gdcmDicomDirElement.h,v $
Language: C++
- Date: $Date: 2004/10/13 14:15:29 $
- Version: $Revision: 1.13 $
+ Date: $Date: 2004/10/25 04:08:20 $
+ Version: $Revision: 1.14 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
std::string Value;
} Element;
+typedef std::list<Element> ListDicomDirElem;
typedef std::list<Element> ListDicomDirMetaElem;
typedef std::list<Element> ListDicomDirPatientElem;
typedef std::list<Element> ListDicomDirStudyElem;
* \brief returns a reference to the chained List
* related to the META Elements of a DICOMDIR.
*/
- ListDicomDirMetaElem& GetDicomDirMetaElements()
+ ListDicomDirMetaElem const & GetDicomDirMetaElements() const
{ return DicomDirMetaList; };
/**
* \brief returns a reference to the chained List
* related to the PATIENT Elements of a DICOMDIR.
*/
- ListDicomDirPatientElem &GetDicomDirPatientElements()
+ ListDicomDirPatientElem const & GetDicomDirPatientElements() const
{ return DicomDirPatientList; };
/**
* \brief returns a reference to the chained List
* related to the STUDY Elements of a DICOMDIR.
*/
- ListDicomDirStudyElem &GetDicomDirStudyElements()
+ ListDicomDirStudyElem const & GetDicomDirStudyElements() const
{ return DicomDirStudyList; };
/**
* \brief returns a reference to the chained List
* related to the SERIE Elements of a DICOMDIR.
*/
- ListDicomDirSerieElem &GetDicomDirSerieElements()
+ ListDicomDirSerieElem const & GetDicomDirSerieElements() const
{ return DicomDirSerieList; };
/**
* \brief returns a reference to the chained List
* related to the IMAGE Elements of a DICOMDIR.
*/
- ListDicomDirImageElem &GetDicomDirImageElements()
+ ListDicomDirImageElem const & GetDicomDirImageElements() const
{ return DicomDirImageList; };
private:
Program: gdcm
Module: $RCSfile: gdcmDicomDirObject.cxx,v $
Language: C++
- Date: $Date: 2004/10/25 03:35:19 $
- Version: $Revision: 1.6 $
+ Date: $Date: 2004/10/25 04:08:20 $
+ Version: $Revision: 1.7 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
// FillObject rempli le SQItem qui sera accroche au bon endroit
- std::list<Element>::const_iterator it;
+ ListDicomDirMetaElem::const_iterator it;
uint16_t tmpGr,tmpEl;
DictEntry *dictEntry;
ValEntry *entry;
Program: gdcm
Module: $RCSfile: gdcmDicomDirPatient.cxx,v $
Language: C++
- Date: $Date: 2004/10/25 03:35:19 $
- Version: $Revision: 1.17 $
+ Date: $Date: 2004/10/25 04:08:20 $
+ Version: $Revision: 1.18 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
*/
DicomDirPatient::~DicomDirPatient()
{
- for(ListDicomDirStudy::iterator cc = studies.begin();
- cc != studies.end(); ++cc)
+ for(ListDicomDirStudy::const_iterator cc = Studies.begin();
+ cc != Studies.end();
+ ++cc )
{
delete *cc;
}
os << "PATIENT" << std::endl;
DicomDirObject::Print(os);
- for(ListDicomDirStudy::iterator cc = studies.begin();
- cc != studies.end(); ++cc)
+ for(ListDicomDirStudy::const_iterator cc = Studies.begin();
+ cc != Studies.end();
+ ++cc )
{
(*cc)->SetPrintLevel(PrintLevel);
(*cc)->Print(os);
{
DicomDirObject::Write(fp, t);
- for(ListDicomDirStudy::iterator cc = studies.begin();cc!=studies.end();++cc)
+ for(ListDicomDirStudy::iterator cc = Studies.begin();
+ cc!= Studies.end();
+ ++cc )
{
(*cc)->Write( fp, t );
}
*/
DicomDirStudy* DicomDirPatient::NewStudy()
{
- std::list<Element> elemList =
+ ListDicomDirStudyElem const & elemList =
Global::GetDicomDirElements()->GetDicomDirStudyElements();
DicomDirStudy* st = new DicomDirStudy( PtagHT );
st->FillObject(elemList);
- studies.push_front(st);
+ Studies.push_front(st);
return st;
}
Program: gdcm
Module: $RCSfile: gdcmDicomDirPatient.h,v $
Language: C++
- Date: $Date: 2004/10/22 03:05:41 $
- Version: $Revision: 1.11 $
+ Date: $Date: 2004/10/25 04:08:20 $
+ Version: $Revision: 1.12 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
~DicomDirPatient();
- virtual void Print(std::ostream &os = std::cout);
- virtual void Write(std::ofstream *fp, FileType t);
+ void Print(std::ostream &os = std::cout);
+ void Write(std::ofstream *fp, FileType t);
+
/// Returns the STUDY chained List for this PATIENT.
- ListDicomDirStudy &GetDicomDirStudies() { return studies; };
+ ListDicomDirStudy const & GetDicomDirStudies() const { return Studies; };
/// adds the passed STUDY to the STUDY chained List for this PATIENT.
- void AddDicomDirStudy(DicomDirStudy *obj) { studies.push_back(obj); };
+ void AddDicomDirStudy (DicomDirStudy *obj) { Studies.push_back(obj); };
/// TODO
DicomDirStudy* NewStudy();
private:
/// chained list of DicomDirStudy
- ListDicomDirStudy studies;
+ ListDicomDirStudy Studies;
};
} // end namespace gdcm
Program: gdcm
Module: $RCSfile: gdcmDicomDirSerie.cxx,v $
Language: C++
- Date: $Date: 2004/10/25 03:35:19 $
- Version: $Revision: 1.19 $
+ Date: $Date: 2004/10/25 04:08:20 $
+ Version: $Revision: 1.20 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
*/
DicomDirSerie::~DicomDirSerie()
{
- for(ListDicomDirImage::iterator cc = images.begin();
- cc != images.end();
+ for(ListDicomDirImage::iterator cc = Images.begin();
+ cc != Images.end();
++cc)
{
delete *cc;
os << "SERIE" << std::endl;
DicomDirObject::Print(os);
- for(ListDicomDirImage::iterator cc = images.begin();
- cc != images.end();
+ for(ListDicomDirImage::iterator cc = Images.begin();
+ cc != Images.end();
++cc)
{
(*cc)->SetPrintLevel(PrintLevel);
{
DicomDirObject::Write(fp, t);
- for(ListDicomDirImage::iterator cc = images.begin();cc!=images.end();++cc)
+ for(ListDicomDirImage::iterator cc = Images.begin();
+ cc!= Images.end();
+ ++cc )
{
(*cc)->Write( fp, t );
}
*/
DicomDirImage* DicomDirSerie::NewImage()
{
- std::list<Element> elemList =
+ ListDicomDirImageElem const & elemList =
Global::GetDicomDirElements()->GetDicomDirImageElements();
DicomDirImage* st = new DicomDirImage(PtagHT);
FillObject(elemList);
- images.push_front(st);
+ Images.push_front(st);
return st;
}
Program: gdcm
Module: $RCSfile: gdcmDicomDirSerie.h,v $
Language: C++
- Date: $Date: 2004/10/22 03:05:41 $
- Version: $Revision: 1.12 $
+ Date: $Date: 2004/10/25 04:08:20 $
+ Version: $Revision: 1.13 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include "gdcmDicomDirObject.h"
#include "gdcmDicomDirImage.h"
+
namespace gdcm
{
-
//-----------------------------------------------------------------------------
typedef std::list<DicomDirImage *> ListDicomDirImage;
~DicomDirSerie();
- virtual void Print( std::ostream& os = std::cout );
- virtual void Write( std::ofstream* fp, FileType t );
-/**
- * \ingroup DicomDirSerie
- * \brief returns the IMAGE chained List for this SERIE.
- */
- ListDicomDirImage& GetDicomDirImages() { return images; };
-/**
- * \ingroup DicomDirSerie
- * \brief adds the passed IMAGE to the IMAGE chained List for this SERIE.
- */
- void AddDicomDirImage(DicomDirImage *obj) { images.push_back(obj); };
+ void Print( std::ostream& os = std::cout );
+ void Write( std::ofstream* fp, FileType t );
+
+ /**
+ * \ingroup DicomDirSerie
+ * \brief returns the IMAGE chained List for this SERIE.
+ */
+ ListDicomDirImage const & GetDicomDirImages() const { return Images; };
+
+ /**
+ * \ingroup DicomDirSerie
+ * \brief adds the passed IMAGE to the IMAGE chained List for this SERIE.
+ */
+ void AddDicomDirImage(DicomDirImage *obj) { Images.push_back(obj); };
/**
* \ingroup DicomDirSerie
/**
* \brief chained list of DicomDirImages
*/
- ListDicomDirImage images;
+ ListDicomDirImage Images;
};
} // end namespace gdcm
//-----------------------------------------------------------------------------
Program: gdcm
Module: $RCSfile: gdcmDicomDirStudy.cxx,v $
Language: C++
- Date: $Date: 2004/10/25 03:35:19 $
- Version: $Revision: 1.16 $
+ Date: $Date: 2004/10/25 04:08:20 $
+ Version: $Revision: 1.17 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
*/
DicomDirStudy::~DicomDirStudy()
{
- for(ListDicomDirSerie::iterator cc = series.begin();cc != series.end();++cc)
+ for(ListDicomDirSerie::iterator cc = Series.begin();
+ cc != Series.end();
+ ++cc )
{
delete *cc;
}
os << "STUDY" << std::endl;
DicomDirObject::Print(os);
- for(ListDicomDirSerie::iterator cc = series.begin();
- cc != series.end();
+ for(ListDicomDirSerie::iterator cc = Series.begin();
+ cc != Series.end();
++cc)
{
(*cc)->SetPrintLevel(PrintLevel);
{
DicomDirObject::Write(fp, t);
- for(ListDicomDirSerie::iterator cc = series.begin();cc!=series.end();++cc)
+ for(ListDicomDirSerie::iterator cc = Series.begin();
+ cc!= Series.end();
+ ++cc )
{
(*cc)->Write( fp, t );
}
*/
DicomDirSerie* DicomDirStudy::NewSerie()
{
- std::list<Element> elemList =
+ ListDicomDirSerieElem const & elemList =
Global::GetDicomDirElements()->GetDicomDirSerieElements();
DicomDirSerie* st = new DicomDirSerie(PtagHT);
FillObject(elemList);
- series.push_front(st);
+ Series.push_front(st);
return st;
}
Program: gdcm
Module: $RCSfile: gdcmDicomDirStudy.h,v $
Language: C++
- Date: $Date: 2004/10/22 03:05:41 $
- Version: $Revision: 1.11 $
+ Date: $Date: 2004/10/25 04:08:20 $
+ Version: $Revision: 1.12 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
~DicomDirStudy();
- virtual void Print(std::ostream &os = std::cout);
- virtual void Write(std::ofstream *fp, FileType t);
-/**
- * \ingroup DicomDirStudy
- * \brief returns the SERIE chained List for this STUDY.
- */
- ListDicomDirSerie &GetDicomDirSeries() { return series; };
-/**
- * \ingroup DicomDirStudy
- * \brief adds the passed SERIE to the SERIE chained List for this STUDY.
- */
- void AddDicomDirSerie(DicomDirSerie *obj) { series.push_back(obj); };
+ void Print(std::ostream &os = std::cout);
+ void Write(std::ofstream *fp, FileType t);
-/**
- * \ingroup DicomDirStudy
- * \brief TODO
- */
+ /**
+ * \ingroup DicomDirStudy
+ * \brief returns the SERIE chained List for this STUDY.
+ */
+ ListDicomDirSerie const &GetDicomDirSeries() const { return Series; };
+
+ /**
+ * \ingroup DicomDirStudy
+ * \brief adds the passed SERIE to the SERIE chained List for this STUDY.
+ */
+ void AddDicomDirSerie(DicomDirSerie *obj) { Series.push_back(obj); };
+
+ /**
+ * \ingroup DicomDirStudy
+ * \brief TODO
+ */
DicomDirSerie* NewSerie();
private:
/**
* \brief chained list of DicomDirSeries (to be exploited recursively)
*/
- ListDicomDirSerie series;
+ ListDicomDirSerie Series;
};
} // end namespace gdcm
Program: gdcm
Module: $RCSfile: gdcmDocEntry.h,v $
Language: C++
- Date: $Date: 2004/10/22 03:05:41 $
- Version: $Revision: 1.27 $
+ Date: $Date: 2004/10/25 04:08:20 $
+ Version: $Revision: 1.28 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
namespace gdcm
{
-
-
//-----------------------------------------------------------------------------
/**
* \brief The dicom header of a Dicom file contains a set of such entries
uint16_t GetElement() { return DicomDict->GetElement();};
/// Returns the 'key' of the current Dicom Header Entry
- void SetKey( TagKey key ) { Key = key; }
+ void SetKey( TagKey const & key ) { Key = key; }
/// Returns the 'key' of the current Dicom Header Entry
- std::string GetKey() { return Key; }
+ std::string const & GetKey() const { return Key; }
/// \brief Returns the 'Name' '(e.g. "Patient's Name") found in the Dicom
/// Dictionnary of the current Dicom Header Entry
- std::string GetName() { return DicomDict->GetName(); };
+ std::string const & GetName() const { return DicomDict->GetName(); };
/// \brief Returns the 'Value Representation' (e.g. "PN" : Person Name,
/// "SL" : Signed Long), found in the Dicom Header or in the Dicom
/// Dictionnary, of the current Dicom Header Entry
- std::string GetVR() { return DicomDict->GetVR(); };
+ std::string const & GetVR() const { return DicomDict->GetVR(); };
/// \brief Returns offset (since the beginning of the file, including
/// the File Preamble, if any) of the value of the current Dicom HeaderEntry
/// \warning offset of the *value*, not of the Dicom Header Entry
- size_t GetOffset() { return Offset; };
+ size_t GetOffset() { return Offset; };
/// \brief Returns the actual value length of the current Dicom Header Entry
/// \warning this value is not *always* the one stored in the Dicom Header
uint32_t GetReadLength() { return ReadLength; };
/// Sets the 'Value Representation' of the current Dicom Header Entry
- void SetVR(std::string const & v) { DicomDict->SetVR(v); };
+ void SetVR( TagName const & v) { DicomDict->SetVR(v); };
/// \brief Sets both 'Read Length' and 'Usable Length' of the current
/// Dicom Header Entry
- void SetLength(uint32_t l) { ReadLength = UsableLength = l;};
+ void SetLength(uint32_t l) { ReadLength = UsableLength = l; };
// The following 3 members, for internal use only !
Program: gdcm
Module: $RCSfile: gdcmFile.h,v $
Language: C++
- Date: $Date: 2004/10/22 13:56:46 $
- Version: $Revision: 1.66 $
+ Date: $Date: 2004/10/25 04:08:20 $
+ Version: $Revision: 1.67 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
Header* GetHeader() { return HeaderInternal; }
/// Accessor to \ref ImageDataSize
- size_t GetImageDataSize(){ return ImageDataSize; };
+ size_t GetImageDataSize() { return ImageDataSize; };
/// Accessor to \ref ImageDataSizeRaw
- size_t GetImageDataSizeRaw(){ return ImageDataSizeRaw; };
+ size_t GetImageDataSizeRaw() { return ImageDataSizeRaw; };
/// Accessor to \ref PixelConverter
- PixelConvert* GetPixelConverter(){ return PixelConverter; };
+ PixelConvert* GetPixelConverter() { return PixelConverter; };
uint8_t* GetImageData();
size_t GetImageDataIntoVector(void* destination, size_t maxSize);
Program: gdcm
Module: $RCSfile: gdcmPixelConvert.h,v $
Language: C++
- Date: $Date: 2004/10/22 03:05:42 $
- Version: $Revision: 1.13 $
+ Date: $Date: 2004/10/25 04:08:20 $
+ Version: $Revision: 1.14 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#ifndef GDCMPIXELCONVERT_H
-#define GDCMPIXELCONVERTL_H
+#define GDCMPIXELCONVERT_H
#include "gdcmCommon.h"
#include "gdcmRLEFramesInfo.h"
namespace gdcm
{
-
/*
* \brief Utility container for gathering the various forms the pixel data
* migth take during the user demanded processes.
*/
-class GDCM_EXPORT PixelConvert {
+class GDCM_EXPORT PixelConvert
+{
public:
PixelConvert();
~PixelConvert();