template< class TImage >
void CreateImage(typename TImage::Pointer image)
{
typedef TImage ImageType;
typename ImageType::RegionType region;
region.SetSize(size);
region.SetIndex(start);
image->SetRegions(region);
image->Allocate();
{
++imageIterator;
}
}
int main(int, char *[])
{
typedef unsigned char PixelType;
ImageType::Pointer image = ImageType::New();
CreateImage< ImageType >(image);
ThresholdImageFilterType;
ThresholdImageFilterType::Pointer thresholdFilter
= ThresholdImageFilterType::New();
thresholdFilter->SetInput(image);
thresholdFilter->ThresholdBelow(100);
thresholdFilter->SetOutsideValue(0);
thresholdFilter->Update();
return EXIT_SUCCESS;
}