X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmHeaderHelper.h;h=1540a1293675127992846115416e9ee3da5a4f4d;hb=cc81f031e49936f32dd516a0f78a24ec652fd26a;hp=18d950e5c2c30c6756111ef0f5b5c3001cc13165;hpb=d25c25666b3d84678bbb8c178000a583c71a2db4;p=gdcm.git diff --git a/src/gdcmHeaderHelper.h b/src/gdcmHeaderHelper.h index 18d950e5..1540a129 100644 --- a/src/gdcmHeaderHelper.h +++ b/src/gdcmHeaderHelper.h @@ -3,12 +3,12 @@ Program: gdcm Module: $RCSfile: gdcmHeaderHelper.h,v $ Language: C++ - Date: $Date: 2004/06/21 21:51:01 $ - Version: $Revision: 1.18 $ + Date: $Date: 2004/09/27 08:39:07 $ + Version: $Revision: 1.21 $ 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 @@ -29,30 +29,34 @@ * - This class should be used for a stack of 2D dicom images. * - For a multiframe dicom image better use directly gdcmHeaderHelper */ -class GDCM_EXPORT gdcmSerieHeader { +class GDCM_EXPORT gdcmSerieHeader +{ public: - gdcmSerieHeader() {}; + gdcmSerieHeader(); ~gdcmSerieHeader(); - void AddFileName(std::string filename); //should return bool or throw error ? + /// \todo should return bool or throw error ? + void AddFileName(std::string const & filename); void AddGdcmFile(gdcmHeader *file); - void SetDirectory(std::string dir); + void SetDirectory(std::string const & dir); void OrderGdcmFileList(); - inline gdcmHeader *GetGdcmHeader() - { - //Assume all element in the list have the same global infos - return CoherentGdcmFileList.front(); - } - - std::list& GetGdcmFileList(); + /// \warning Assumes all elements in the list have the same global infos. + /// Assumes the list is not empty. + gdcmHeader* GetGdcmHeader() { return CoherentGdcmFileList.front(); } + + typedef std::list GdcmHeaderList; + + /// \brief Gets the *coherent* File List + /// @return the *coherent* File List + const GdcmHeaderList& GetGdcmFileList() { return CoherentGdcmFileList; } private: bool ImagePositionPatientOrdering(); bool ImageNumberOrdering(); bool FileNameOrdering(); - std::list CoherentGdcmFileList; + GdcmHeaderList CoherentGdcmFileList; }; //-----------------------------------------------------------------------------