From: dsarrut Date: Fri, 22 Oct 2010 07:35:31 +0000 (+0000) Subject: add clitkExceptionMacro X-Git-Tag: v1.2.0~326 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=cc7d70464c9ece01281a987973607eebba30d8dc;p=clitk.git add clitkExceptionMacro --- diff --git a/itk/clitkBooleanOperatorLabelImageFilter.txx b/itk/clitkBooleanOperatorLabelImageFilter.txx index 254085b..20f811a 100644 --- a/itk/clitkBooleanOperatorLabelImageFilter.txx +++ b/itk/clitkBooleanOperatorLabelImageFilter.txx @@ -116,9 +116,9 @@ namespace clitk { static const unsigned int Dim = Input1ImageType::ImageDimension; for(unsigned int i=0; iGetSpacing()[i] != input2->GetSpacing()[i]) { - itkExceptionMacro(<< "Input 1&2 must have the same spacing. " << std::endl - << "\t input1 = " << input1->GetSpacing() << std::endl - << "\t input2 = " << input2->GetSpacing() << std::endl); + clitkExceptionMacro("Input 1&2 must have the same spacing. " << std::endl + << "\t input1 = " << input1->GetSpacing() << std::endl + << "\t input2 = " << input2->GetSpacing() << std::endl); } // if (input1->GetLargestPossibleRegion().GetSize()[i] != input2->GetLargestPossibleRegion().GetSize()[i]) { // itkExceptionMacro(<< "Input 1&2 must have the same size. " << std::endl @@ -154,6 +154,9 @@ namespace clitk { } // Compute intersection bounding box (in physical coordinate) and regions (in pixel coordinate) + // DD(input1->GetLargestPossibleRegion()); + // DD(input2->GetLargestPossibleRegion()); + // DD(outputImage->GetLargestPossibleRegion()); typedef itk::BoundingBox BBType; typename BBType::Pointer bbInput1 = BBType::New(); ComputeBBFromImageRegion(input1, input1->GetLargestPossibleRegion(), bbInput1); @@ -162,9 +165,15 @@ namespace clitk { typename BBType::Pointer bbOutput = BBType::New(); ComputeBBFromImageRegion(outputImage, outputImage->GetLargestPossibleRegion(), bbOutput); + // DD(bbInput1); + // DD(bbInput2); + // DD(bbOutput); + typename BBType::Pointer bb = BBType::New(); ComputeBBIntersection(bb, bbInput1, bbInput2); + // DD(bb); ComputeBBIntersection(bb, bb, bbOutput); + // DD(bb); ComputeRegionFromBB(input1, bb, input1Region); ComputeRegionFromBB(input2, bb, input2Region); @@ -203,6 +212,9 @@ namespace clitk { OutputImagePointer output = this->GetOutput(0); // Get Region iterators + // DD(input1Region); + // DD(input2Region); + // DD(outputRegion); itk::ImageRegionConstIterator it1(input1, input1Region); itk::ImageRegionConstIterator it2(input2, input2Region); itk::ImageRegionIterator ot (output, outputRegion);