Program: gdcm
Module: $RCSfile: gdcmSerieHelper.cxx,v $
Language: C++
- Date: $Date: 2005/02/05 01:25:03 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2005/05/11 17:15:18 $
+ Version: $Revision: 1.6 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
if ( CoherentGdcmFileListHT.count(uid) == 0 )
{
- gdcmVerboseMacro(" New Serie UID :[" << uid << "]");
+ gdcmWarningMacro(" New Serie UID :[" << uid << "]");
// create a std::list in 'uid' position
CoherentGdcmFileListHT[uid] = new GdcmFileList;
}
}
else
{
- gdcmVerboseMacro("Could not read file: " << filename );
+ gdcmWarningMacro("Could not read file: " << filename );
delete header;
}
}
dist += normal[i]*ipp[i];
}
- if( dist == 0 )
- {
- return false;
- }
-
distlist.push_back( dist );
max = min = dist;
dist += normal[i]*ipp[i];
}
- if( dist == 0 )
- {
- return false;
- }
-
distlist.push_back( dist );
min = (min < dist) ? min : dist;
CoherentGdcmFileVector.resize( n );
// gdcmAssertMacro( CoherentGdcmFileVector.capacity() >= n );
+ // Find out if min/max are coherent
+ if( min == max )
+ {
+ gdcmWarningMacro( "Looks like all images have the exact same image position...");
+ return false;
+ }
+
float step = (max - min)/(n - 1);
int pos;
n = 0;
CoherentGdcmFileVector[pos] = *it2;
else
{
- gdcmVerboseMacro( "2 files same position");
+ gdcmWarningMacro( "2 files same position");
return false;
}
}
CoherentFileListmap::iterator itl = CoherentGdcmFileListHT.begin();
if ( itl == CoherentGdcmFileListHT.end() )
{
- gdcmVerboseMacro( "No Coherent File list found" );
+ gdcmWarningMacro( "No Coherent File list found" );
return;
}
while (itl != CoherentGdcmFileListHT.end())