#include <sstream>
#include <iostream>
#include <map>
#ifdef ENABLE_QUICKVIEW
# include "itksys/SystemTools.hxx"
#endif
int
main(int argc, char * argv[])
{
if (argc < 2)
{
std::cout << "Usage: " << argv[0];
std::cout << " inputImageFile";
std::cerr << std::endl;
return EXIT_FAILURE;
}
#ifdef ENABLE_QUICKVIEW
using InputPixelType = short;
const auto input = itk::ReadImage<InputImageType>(argv[1]);
using OutputPixelType = unsigned char;
viewer.
AddImage(input.GetPointer(),
true, itksys::SystemTools::GetFilenameName(argv[1]));
using FilterContainerType =
FilterContainerType filterContainer;
auto it = filterContainer.begin();
for (it = filterContainer.begin(); it != filterContainer.end(); ++it)
{
(*it).second->SetInsideValue(255);
(*it).second->SetOutsideValue(0);
(*it).second->SetInput(input);
(*it).second->SetNumberOfHistogramBins(100);
(*it).second->Update();
std::stringstream desc;
desc << (*it).first << " threshold = " << (*it).second->GetThreshold();
viewer.
AddImage((*it).second->GetOutput(),
true, desc.str());
}
#else
std::cout << " Example requires compilation with ENABLE_QUICKVIEW defined." << std::endl;
#endif
return EXIT_SUCCESS;
}