Commit 8686293f authored by Guillaume Pasero's avatar Guillaume Pasero

TEST: limit degenerate case to all masked image

parent c5c18476
......@@ -143,25 +143,20 @@ int ReverseTest(typename MaskIteratorType::ImageType::Pointer mask, typename Ite
if (!it.IsAtEnd()) {return 1;}
bool beginReached = false;
do
{
while (!it.IsAtBegin())
{
--it;
if (it.IsAtEnd()) {return 2;}
if (it.IsAtBegin())
{
if (beginReached)
if (beginReached)
{
return 3;
return 3;
}
else {
beginReached = true;
if (it.IsAtBegin())
{
beginReached = true;
}
}
//it.Set(it.Value() * 0.42);
} while (!it.IsAtBegin());
if(!it.IsAtBegin()) {return 4;}
return 0;
}
......@@ -314,10 +309,10 @@ int otbMaskedIteratorDecoratorNominal(int itkNotUsed(argc), char * itkNotUsed(ar
// ------------------------ Degenerate cases -----------------------------------
int otbMaskedIteratorDecoratorDegenerate(int itkNotUsed(argc), char * itkNotUsed(argv) [])
{
// Fully masked (0 everywhere) and image is smaller than mask
// Fully masked (0 everywhere)
typedef otb::Image<double, 2> ImageType;
ImageType::Pointer image = GetTestImage<ImageType>(9, 10);
ImageType::Pointer mask = GetTestImage<ImageType>(100, 0);
ImageType::Pointer image = GetTestImage<ImageType>(10, 10);
ImageType::Pointer mask = GetTestImage<ImageType>(10, 0);
ImageType::RegionType region(image->GetLargestPossibleRegion());
return TripleTest<itk::ImageRegionIterator<ImageType>,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment