Permalink
Browse files

BUG: rm calls to 'exit' which were killing Slicer

  • Loading branch information...
Kent Williams authored and hjmjohnson committed Nov 1, 2011
1 parent ca3c6bc commit 80474833a463d9651371ca30acf3673d3d7a875a
Showing with 1,570 additions and 941 deletions.
  1. +2 −2 BRAINSABC/TestSuite/BlendImageFilterTest.cxx
  2. +9 −4 BRAINSABC/brainseg/AtlasRegistrationMethod.txx
  3. +563 −553 BRAINSABC/brainseg/BRAINSABC.cxx
  4. +0 −1 BRAINSABC/brainseg/BRAINSABCUtilities.h
  5. +8 −8 BRAINSABC/brainseg/BRAINSCleanMask.cxx
  6. +6 −9 BRAINSABC/brainseg/EMSegmentationFilter.txx
  7. +1 −1 BRAINSABC/brainseg/EMSplitPriorMST.h
  8. +1 −2 BRAINSABC/brainseg/GenerateLabelMapFromProbabilityMap.cxx
  9. +8 −9 BRAINSABC/brainseg/LLSBiasCorrector.txx
  10. +2 −4 BRAINSABC/brainseg/StandardizeMaskIntensity.h
  11. +3 −14 BRAINSCommonLib/BRAINSFitHelper.cxx
  12. +57 −99 BRAINSCommonLib/BRAINSFitHelperTemplate.hxx
  13. +1 −4 BRAINSCommonLib/DebugImageViewerClient.h
  14. +7 −25 BRAINSCommonLib/GenericTransformImage.cxx
  15. +6 −60 BRAINSCommonLib/Imgmath.h
  16. +1 −2 BRAINSCommonLib/ReadMask.h
  17. +2 −2 ...mmonLib/TestLargestForegroundFilledMaskImageFilter/TestLargestForegroundFilledMaskImageFilter.cxx
  18. +1 −1 BRAINSCommonLib/TestSuite/itkResampleInPlaceImageFilterTest.cxx
  19. +6 −6 BRAINSCommonLib/Test_FindCenterOfBrainFilter/FindCenterOfBrainCLP.cxx
  20. +1 −2 BRAINSCommonLib/genericRegistrationHelper.h
  21. +3 −6 BRAINSCommonLib/genericRegistrationHelper.hxx
  22. +2 −4 BRAINSCommonLib/itkBRAINSROIAutoImageFilter.h
  23. +1 −2 BRAINSCommonLib/itkDiffusionTensor3DReconstructionWithMaskImageFilter.hxx
  24. +1 −2 BRAINSCommonLib/itkFindCenterOfBrainFilter.hxx
  25. +1 −4 BRAINSCommonLib/itkIO.h
  26. +23 −88 BRAINSCommonLib/itkInverseConsistentLandmarks.hxx
  27. +1 −2 BRAINSCommonLib/itkOtsuHistogramMatchingImageFilter.hxx
  28. +40 −23 BRAINSFit/BRAINSFit.cxx
  29. +810 −0 BRAINSFit/BRAINSFit.cxx.orig
  30. +2 −2 BRAINSFit/TestSuite/makexfrmedImage.cxx
  31. +1 −0 CMakeFiles/cmake.check_cache
@@ -46,9 +46,9 @@ int main(int, char * *)
{
std::cerr << "Expected " << blend << " found " << itBlend.Get()
<< std::endl;
- exit(1);
+ return EXIT_FAILURE;
}
}
- exit(0);
+ return EXIT_SUCCESS;
}
@@ -150,7 +150,7 @@ AtlasRegistrationMethod<TOutputPixel, TProbabilityPixel>
muLogMacro(
<< "Failed to read transform file caused exception." << this->m_IntraSubjectTransformFileNames[i]
<< std::endl );
- exit(-1);
+ itkExceptionMacro(<< "Failed to read transform file " << this->m_IntraSubjectTransformFileNames[i]);
}
}
else if( m_ImageLinearTransformChoice == "Identity" )
@@ -371,7 +371,7 @@ AtlasRegistrationMethod<TOutputPixel, TProbabilityPixel>
{
muLogMacro(
<< "Failed to read transform file caused exception." << this->m_AtlasToSubjectTransformFileName << std::endl );
- exit(-1);
+ itkExceptionMacro(<< "Failed to read transform file " << this->m_AtlasToSubjectTransformFileName);
}
}
else if( m_AtlasLinearTransformChoice == "Identity" )
@@ -390,7 +390,11 @@ AtlasRegistrationMethod<TOutputPixel, TProbabilityPixel>
muLogMacro( << "m_IntraSubjectTransforms.size() = " << m_IntraSubjectTransforms.size() << std::endl );
muLogMacro(
<< "m_IntraSubjectOriginalImageList.size() = " << m_IntraSubjectOriginalImageList.size() << std::endl );
- exit(-1);
+ itkExceptionMacro(<< "ERROR: atlas and template image list sizes do not match. "
+ << "m_AtlasOriginalImageList.size() = " << m_AtlasOriginalImageList.size() << std::endl
+ << "m_IntraSubjectTransforms.size() = " << m_IntraSubjectTransforms.size() << std::endl
+ << "m_IntraSubjectOriginalImageList.size() = " << m_IntraSubjectOriginalImageList.size());
+
}
muLogMacro(<< "Registering all atlas images to first subject." << std::endl);
for( unsigned int atlasIter = 0; atlasIter < m_AtlasOriginalImageList.size(); atlasIter++ )
@@ -483,7 +487,8 @@ AtlasRegistrationMethod<TOutputPixel, TProbabilityPixel>
writer->SetFileName(fn.c_str() );
writer->Update();
muLogMacro( << __FILE__ << " " << __LINE__ << " " << std::endl );
- exit( -1 );
+ itkExceptionMacro(<< "Histogram match");
+
}
}
else
Oops, something went wrong.

0 comments on commit 8047483

Please sign in to comment.