X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmSerieHeader.h;h=b1e81854ecd18d731ba692ccbd7e4fc5b1a6c67c;hb=5544a1627fc9bb02b2d4c20b4ffa3ba8fa81c0ae;hp=fe95a31bb8876393f53caf8de9ddd91af0f235b1;hpb=ba78e6c6d47d6db1528e8e88e5ebde7296a26692;p=gdcm.git diff --git a/src/gdcmSerieHeader.h b/src/gdcmSerieHeader.h index fe95a31b..b1e81854 100644 --- a/src/gdcmSerieHeader.h +++ b/src/gdcmSerieHeader.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmSerieHeader.h,v $ Language: C++ - Date: $Date: 2004/12/03 20:16:58 $ - Version: $Revision: 1.2 $ + Date: $Date: 2005/01/28 16:56:49 $ + Version: $Revision: 1.8 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -24,43 +24,39 @@ namespace gdcm { -class Header; +class File; //----------------------------------------------------------------------------- -/* - * \defgroup SerieHeader +/** * \brief - * * - This class should be used for a stack of 2D dicom images. - * - For a multiframe dicom image better use directly SerieHeader -*/ + */ class GDCM_EXPORT SerieHeader { public: + typedef std::list GdcmFileList; + SerieHeader(); ~SerieHeader(); /// \todo should return bool or throw error ? - void AddFileName(std::string const & filename); - void AddGdcmFile(Header *file); - void SetDirectory(std::string const & dir); + void AddFileName(std::string const &filename); + void SetDirectory(std::string const &dir, bool recursive=false); void OrderGdcmFileList(); - /// \warning Assumes all elements in the list have the same global infos. - /// Assumes the list is not empty. - Header* GetGdcmHeader() { return CoherentGdcmFileList.front(); } - - typedef std::list GdcmHeaderList; - /// \brief Gets the *coherent* File List /// @return the *coherent* File List - const GdcmHeaderList& GetGdcmFileList() { return CoherentGdcmFileList; } + /// Caller must call OrderGdcmFileList first + const GdcmFileList &GetGdcmFileList() { return CoherentGdcmFileList; } private: bool ImagePositionPatientOrdering(); bool ImageNumberOrdering(); bool FileNameOrdering(); - GdcmHeaderList CoherentGdcmFileList; + GdcmFileList CoherentGdcmFileList; + /// Ref to the current Serie Instance UID to avoid mixing two series + /// within the same directory + std::string CurrentSerieUID; }; } // end namespace gdcm