static void CreateImage(UnsignedCharImageType::Pointer image);
int main(int, char *[])
{
UnsignedCharImageType::Pointer image = UnsignedCharImageType::New();
CreateImage(image);
AntiAliasBinaryImageFilterType::Pointer antiAliasFilter
= AntiAliasBinaryImageFilterType::New ();
antiAliasFilter->SetInput(image);
viewer.
AddImage<UnsignedCharImageType>(image);
viewer.
AddImage<FloatImageType>(antiAliasFilter->GetOutput());
return EXIT_SUCCESS;
}
void CreateImage(UnsignedCharImageType::Pointer image)
{
region.SetIndex(start);
image->SetRegions(region);
image->Allocate();
while(!imageIterator.IsAtEnd())
{
if(imageIterator.GetIndex()[0] - imageIterator.GetIndex()[1] > 5)
{
imageIterator.Set(255);
}
else
{
imageIterator.Set(0);
}
++imageIterator;
}
}