X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=itk%2FclitkBooleanOperatorLabelImageFilter.txx;h=20f811aa7a09aa4883a9839fb3f9ad827df99f80;hb=62c08c838c8d824b37b908bbed67b996aaaa31ac;hp=254085b0f17e79389f6a2a540f3b302bd39df698;hpb=ff4abcacee4dbd9d93dfd6ee1ebb15918ebf1f95;p=clitk.git 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);