- if ( tiltInfo.IsSheared() ) // mitk::eps is too small; 1/1000 of a mm should be enough to detect tilt
- {
- /* optimistic approach, accepting gantry tilt: save file for later, check all further files */
+ if ( tiltInfo.IsSheared() ) // mitk::eps is too small; 1/1000 of a mm should be enough to detect tilt
+ {
+ /* optimistic approach, accepting gantry tilt: save file for later, check all further files */
- // at this point we have TWO slices analyzed! if they are the only two files, we still split, because there is no third to verify our tilting assumption.
- // later with a third being available, we must check if the initial tilting vector is still valid. if yes, continue.
- // if NO, we need to split the already sorted part (result.first) and the currently analyzed file (*fileIter)
+ // at this point we have TWO slices analyzed! if they are the only two files, we still split, because there is no third to verify our tilting assumption.
+ // later with a third being available, we must check if the initial tilting vector is still valid. if yes, continue.
+ // if NO, we need to split the already sorted part (result.first) and the currently analyzed file (*fileIter)
- // tell apart gantry tilt from overall skewedness
- // sort out irregularly sheared slices, that IS NOT tilting
+ // tell apart gantry tilt from overall skewedness
+ // sort out irregularly sheared slices, that IS NOT tilting
- if ( groupImagesWithGantryTilt && tiltInfo.IsRegularGantryTilt() )
+ if ( groupImagesWithGantryTilt && tiltInfo.IsRegularGantryTilt() )
+ {
+ // check if this is at least roughly the same angle as recorded in DICOM tags
+ if ( tagValueMappings[fileIter->c_str()].find(tagGantryTilt) != tagValueMappings[fileIter->c_str()].end() )
{
- // check if this is at least roughly the same angle as recorded in DICOM tags
- if ( tagValueMappings[fileIter->c_str()].find(tagGantryTilt) != tagValueMappings[fileIter->c_str()].end() )
- mitkThrow() << "CreateMoreUniqueSeriesIdentifier() could not access series instance UID. Something is seriously wrong with this image, so stopping here.";
+ mitkThrow() << "CreateMoreUniqueSeriesIdentifier() could not access series instance UID. Something is seriously wrong with this image, so stopping here.";