Program: gdcm
Module: $RCSfile: gdcmDicomDirSerie.cxx,v $
Language: C++
- Date: $Date: 2004/07/21 14:02:10 $
- Version: $Revision: 1.11 $
+ Date: $Date: 2004/09/27 08:39:06 $
+ Version: $Revision: 1.16 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
- http://www.creatis.insa-lyon.fr/Public/Gdcm/License.htm for details.
+ http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
/**
* \brief Constructor
* @param s SQ Item holding the elements related to this "SERIE" part
- * @param ptagHT pointer to the HTable (gdcmObject needs it
+ * @param ptagHT pointer to the HTable (gdcmDicomDirObject needs it
* to build the gdcmDocEntries)
*/
-gdcmDicomDirSerie::gdcmDicomDirSerie(gdcmSQItem *s, TagDocEntryHT *ptagHT):
- gdcmObject(ptagHT)
+gdcmDicomDirSerie::gdcmDicomDirSerie(gdcmSQItem* s, TagDocEntryHT* ptagHT):
+ gdcmDicomDirObject(ptagHT)
{
docEntries = s->GetDocEntries();
}
/**
* \brief Constructor
- * @param ptagHT pointer to the HTable (gdcmObject needs it
+ * @param ptagHT pointer to the HTable (gdcmDicomDirObject needs it
* to build the gdcmDocEntries)
*/
-gdcmDicomDirSerie::gdcmDicomDirSerie(TagDocEntryHT *ptagHT):
- gdcmObject(ptagHT)
+gdcmDicomDirSerie::gdcmDicomDirSerie(TagDocEntryHT* ptagHT):
+ gdcmDicomDirObject(ptagHT)
{
}
/**
*/
gdcmDicomDirSerie::~gdcmDicomDirSerie()
{
- for(ListDicomDirImage::iterator cc = images.begin();cc != images.end();++cc)
+ for(ListDicomDirImage::iterator cc = images.begin();
+ cc != images.end();
+ ++cc)
{
delete *cc;
}
* \brief Prints the Object
* @return
*/
-void gdcmDicomDirSerie::Print(std::ostream &os)
+void gdcmDicomDirSerie::Print(std::ostream& os)
{
- os<<"SERIE"<<std::endl;
- gdcmObject::Print(os);
+ os << "SERIE" << std::endl;
+ gdcmDicomDirObject::Print(os);
- for(ListDicomDirImage::iterator cc = images.begin();cc != images.end();++cc)
+ for(ListDicomDirImage::iterator cc = images.begin();
+ cc != images.end();
+ ++cc)
{
- (*cc)->SetPrintLevel(printLevel);
+ (*cc)->SetPrintLevel(PrintLevel);
(*cc)->Print(os);
}
}
//-----------------------------------------------------------------------------
// Public
+
+/**
+ * \brief Writes the Object
+ * @return
+ */
+void gdcmDicomDirSerie::Write(FILE* fp, FileType t)
+{
+ gdcmDicomDirObject::Write(fp, t);
+
+ for(ListDicomDirImage::iterator cc = images.begin();cc!=images.end();++cc)
+ {
+ (*cc)->Write( fp, t );
+ }
+}
+
/**
* \brief adds a new Image (with the basic elements) to a partially created DICOMDIR
*/
-gdcmDicomDirImage * gdcmDicomDirSerie::NewImage(void) {
- std::list<gdcmElement> elemList;
- elemList=gdcmGlobal::GetDicomDirElements()->GetDicomDirImageElements();
-
- gdcmDicomDirImage *st = new gdcmDicomDirImage(ptagHT);
+gdcmDicomDirImage* gdcmDicomDirSerie::NewImage()
+{
+ std::list<gdcmElement> elemList =
+ gdcmGlobal::GetDicomDirElements()->GetDicomDirImageElements();
+
+ gdcmDicomDirImage* st = new gdcmDicomDirImage(PtagHT);
FillObject(elemList);
images.push_front(st);
+
return st;
}
//-----------------------------------------------------------------------------