static void
int
main()
{
CreateImage(image);
unsigned int numberOfLevels = 4;
using RecursiveMultiResolutionPyramidImageFilterType =
recursiveMultiResolutionPyramidImageFilter->SetInput(image);
recursiveMultiResolutionPyramidImageFilter->SetNumberOfLevels(numberOfLevels);
recursiveMultiResolutionPyramidImageFilter->Update();
for (unsigned int i = 0; i < numberOfLevels; ++i)
{
rescaleFilter->SetInput(recursiveMultiResolutionPyramidImageFilter->GetOutput(i));
rescaleFilter->SetOutputMinimum(0);
rescaleFilter->SetOutputMaximum(255);
rescaleFilter->Update();
std::stringstream ss;
ss << "output_" << i << ".png";
std::cout << "Writing " << ss.str() << std::endl;
}
return EXIT_SUCCESS;
}
void
{
auto size = UnsignedCharImageType::SizeType::Filled(200);
image->SetRegions(region);
image->Allocate();
image->FillBuffer(0);
for (unsigned int r = 20; r < 80; ++r)
{
for (unsigned int c = 30; c < 100; ++c)
{
pixelIndex[0] = r;
pixelIndex[1] = c;
image->SetPixel(pixelIndex, 255);
}
}
}