BuildUpDicomDir
FindTags
FlatHashTablePrint
- makeDicomDir
+ MakeDicomDir
PrintDocument
PrintFile
PrintHeader
/*=========================================================================
Program: gdcm
- Module: $RCSfile: makeDicomDir.cxx,v $
+ Module: $RCSfile: MakeDicomDir.cxx,v $
Language: C++
- Date: $Date: 2005/02/02 10:06:32 $
- Version: $Revision: 1.12 $
+ Date: $Date: 2005/02/02 14:26:30 $
+ Version: $Revision: 1.1 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
Program: gdcm
Module: $RCSfile: TestChangeHeader.cxx,v $
Language: C++
- Date: $Date: 2005/02/02 10:06:31 $
- Version: $Revision: 1.13 $
+ Date: $Date: 2005/02/02 14:26:30 $
+ 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
if (argc < 3)
{
std::cerr << "usage :" << std::endl <<
- argv[0] << " nomFichierPourEntete nomFichierPourDonnées" <<
+ argv[0] << " fileNameForHeader fileNameForData" <<
std::endl;
return 1;
}
return 0;
}
-
-
Program: gdcm
Module: $RCSfile: TestCopyDicom.cxx,v $
Language: C++
- Date: $Date: 2005/02/02 10:06:31 $
- Version: $Revision: 1.23 $
+ Date: $Date: 2005/02/02 14:26:30 $
+ Version: $Revision: 1.24 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// Here we load a gdcmFile and then try to create from scratch a copy of it,
// copying field by field the dicom image
-int main(int argc, char* argv[])
+int main(int argc, char *argv[])
{
if (argc < 3)
{
else
{
// We skip pb of SQ recursive exploration
- //std::cout << "Skipped Sequence "
- // << "------------- " << d->GetVR() << " "<< std::hex
- // << d->GetGroup() << " " << d->GetElement()
- // << std::endl;
+ std::cout << "Skipped Sequence "
+ << "------------- " << d->GetVR() << " "<< std::hex
+ << d->GetGroup() << "," << d->GetElement()
+ << std::endl;
}
d=original->GetFile()->GetNextEntry();
# add tests that require data
IF (GDCM_DATA_ROOT)
SET(TEST_SOURCES ${TEST_SOURCES}
- TestSerieHeader # uses gdcmData as a default root directory
TestReadWriteReadCompare.cxx # includes generated gdcmDataImages.h
TestPrintAllDocument.cxx # includes generated gdcmDataImages.h
TestAllReadCompareDicom.cxx # includes generated gdcmDataImages.h
TestBuildUpDicomDir.cxx # writes a file named "NewDICOMDIR"
TestMakeDicomDir.cxx # writes a file named "NewDICOMDIR"
TestDirList.cxx
+ TestSerieHelper # uses gdcmData as a default root directory
)
# add test that require VTK:
IF(GDCM_VTK)
--- /dev/null
+/*=========================================================================
+
+ Program: gdcm
+ Module: $RCSfile: TestSerieHelper.cxx,v $
+ Language: C++
+ Date: $Date: 2005/02/02 14:26:34 $
+ Version: $Revision: 1.1 $
+
+ 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.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 notices for more information.
+
+=========================================================================*/
+#include "gdcmSerieHelper.h"
+#include "gdcmFile.h"
+#include "gdcmDebug.h"
+#include <iostream>
+
+typedef std::list<gdcm::File* > GdcmFileList;
+
+int TestSerieHelper(int argc, char* argv[])
+{
+ gdcm::SerieHelper *s;
+
+ std::string dirName;
+ if (argc > 1)
+ dirName = argv[1];
+ else
+ {
+ dirName = GDCM_DATA_ROOT;
+ }
+
+ //if (argc > 2)
+ // gdcm::Debug::SetDebugOn();
+
+ std::cout << "Dir Name :[" << dirName << "]" << std::endl;
+
+ s = new gdcm::SerieHelper();
+ s->SetDirectory(dirName, true); // true : recursive exploration
+ std::cout << " -------------------------------------------Finish parsing :["
+ << dirName << "]" << std::endl;
+
+ s->Print();
+ std::cout << " -----------------------------------------Finish printing (1)"
+ << std::endl;
+
+ int nbFiles;
+ // For all the Coherent Files lists of the gdcm::Serie
+ GdcmFileList *l = s->GetFirstCoherentFileList();
+ while (l)
+ {
+ nbFiles = l->size() ;
+ if ( l->size() > 3 ) // Why not ? Just an example, for testing
+ {
+ std::cout << "Sort list : " << nbFiles << " long" << std::endl;
+ s->OrderGdcmFileList(l); // sort the list
+ }
+ l = s->GetNextCoherentFileList();
+ }
+ std::cout << " ----------------------------------------------Finish sorting"
+ << std::endl;
+ s->Print(); // Prints all the Coherent Files lists (sorted or not)
+ std::cout << " ---------------------------------------------Finish printing"
+ << std::endl;
+
+ delete s;
+
+ return 0;
+}
gdcmRLEFrame.cxx
gdcmRLEFramesInfo.cxx
gdcmSeqEntry.cxx
- gdcmSerieHeader.cxx
+ gdcmSerieHelper.cxx
gdcmSQItem.cxx
gdcmTS.cxx
gdcmUtil.cxx
Program: gdcm
Module: $RCSfile: gdcmDocEntrySet.h,v $
Language: C++
- Date: $Date: 2005/01/26 11:42:02 $
- Version: $Revision: 1.45 $
+ Date: $Date: 2005/02/02 14:26:34 $
+ Version: $Revision: 1.46 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
/// \brief adds any type of entry to the entry set
virtual bool AddEntry(DocEntry *Entry) = 0;
/// \brief Removes any type of entry out of the entry set, and destroys it
- virtual bool RemoveEntry(DocEntry *EntryToRemove)=0;
+ virtual bool RemoveEntry(DocEntry *EntryToRemove) = 0;
/// \brief Removes any type of entry out of the entry set, DOESN'T destroy it
- virtual bool RemoveEntryNoDestroy(DocEntry *EntryToRemove)= 0;
+ virtual bool RemoveEntryNoDestroy(DocEntry *EntryToRemove) = 0;
virtual DocEntry *GetFirstEntry()=0;
virtual DocEntry *GetNextEntry()=0;
virtual std::string GetEntryVR(uint16_t group, uint16_t elem);
/// \brief Gets any type of DocEntry, identified by its (group,elem)
- virtual DocEntry *GetDocEntry(uint16_t group,uint16_t elem) = 0;
- /// \brief Gets a ValEntry, identified by its (group,elem)
- virtual ValEntry *GetValEntry(uint16_t group,uint16_t elem);
+ virtual DocEntry *GetDocEntry(uint16_t group, uint16_t elem) = 0;
+ /// \brief Gets a ValEntry, identified by its (group, elem)
+ virtual ValEntry *GetValEntry(uint16_t group, uint16_t elem);
/// \brief Gets a BinEntry, identified by its (group,elem)
- virtual BinEntry *GetBinEntry(uint16_t group,uint16_t elem);
+ virtual BinEntry *GetBinEntry(uint16_t group, uint16_t elem);
/// \brief Gets a SeqEntry, identified by its (group,elem)
- virtual SeqEntry *GetSeqEntry(uint16_t group,uint16_t elem);
+ virtual SeqEntry *GetSeqEntry(uint16_t group, uint16_t elem);
virtual bool SetValEntry(std::string const &content,
uint16_t group, uint16_t elem);
// DocEntry related utilities
ValEntry *NewValEntry(uint16_t group,uint16_t elem,
TagName const &vr = GDCM_UNKNOWN);
- BinEntry *NewBinEntry(uint16_t group,uint16_t elem,
+ BinEntry *NewBinEntry(uint16_t group, uint16_t elem,
TagName const &vr = GDCM_UNKNOWN);
- SeqEntry *NewSeqEntry(uint16_t group,uint16_t elem);
+ SeqEntry *NewSeqEntry(uint16_t group, uint16_t elem);
protected:
// DictEntry related utilities