X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmSerieHelper.cxx;h=b0a1629b98a4fb83b161038ecfe4bdba595bd1b4;hb=944dcbe9398f982d89c3ab2a588b9f1f1c072b7c;hp=28e4218eb151f29cd40373ffb143b7aed42c4b86;hpb=490441bf842feac1c47fd544e3e2cf3e8d53d18f;p=gdcm.git diff --git a/src/gdcmSerieHelper.cxx b/src/gdcmSerieHelper.cxx index 28e4218e..b0a1629b 100644 --- a/src/gdcmSerieHelper.cxx +++ b/src/gdcmSerieHelper.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmSerieHelper.cxx,v $ Language: C++ - Date: $Date: 2007/10/30 11:11:04 $ - Version: $Revision: 1.63 $ + Date: $Date: 2008/02/13 18:53:33 $ + Version: $Revision: 1.65 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -43,7 +43,7 @@ SerieHelper::SerieHelper() ClearAll(); UserLessThanFunction = 0; DirectOrder = true; - + DropDuplicatePositions = false; } /** @@ -263,6 +263,9 @@ void SerieHelper::SetDirectory(std::string const &dir, bool recursive) for( DirListType::const_iterator it = filenames_list.begin(); it != filenames_list.end(); ++it) { + // std::cout << "--------------------------------filename [" << *it << "]" + // << std::endl; + gdcmDebugMacro("filename [" << *it << "]" ); AddFileName( *it ); } } @@ -648,6 +651,8 @@ bool SerieHelper::ImagePositionPatientOrdering( FileList *fileList ) bool first = true; ZSpacing = -1.0; // will be updated if process doesn't fail + gdcmDebugMacro("============================================DropDuplicatePositions : " << DropDuplicatePositions ); + std::multimap distmultimap; // Use a multimap to sort the distances from 0,0,0 for ( FileList::const_iterator @@ -720,6 +725,8 @@ bool SerieHelper::ImagePositionPatientOrdering( FileList *fileList ) } } + gdcmDebugMacro("After parsing vector, nb of elements : " << fileList->size() ); + // Find out if min/max are coherent if ( min == max ) { @@ -735,6 +742,9 @@ bool SerieHelper::ImagePositionPatientOrdering( FileList *fileList ) it2 != distmultimap.end(); ++it2) { + + gdcmDebugMacro("Check if image shares a common position : " << (*it2).second->GetFileName() ); + if (distmultimap.count((*it2).first) != 1) { gdcmWarningMacro("File: ["