#if defined(_MSC_VER)
# pragma warning(disable : 4786)
#endif
#include <stdlib.h>
#include <iostream>
int
main(int argc, char * argv[])
{
if (argc < 7)
{
std::cerr << "Missing Parameters " << std::endl;
std::cerr << "Usage: " << argv[0];
std::cerr << " inputImage outputImage lowerThreshold upperThreshold seedX seedY [seed2X seed2Y ... ]" << std::endl;
return 1;
}
segmentationFilter.
SetLower(atof(argv[3]));
segmentationFilter.
SetUpper(atof(argv[4]));
std::vector<unsigned int> radius = { 2, 2 };
for (int i = 5; i + 1 < argc; i += 2)
{
std::vector<unsigned int> seed = { (unsigned int)atoi(argv[i]), (unsigned int)atoi(argv[i + 1]) };
std::cout << "Adding a seed at ";
for (unsigned int j = 0; j < seed.size(); ++j)
{
std::cout << seed[j] << " ";
}
std::cout << std::endl;
}
return 0;
}
Denoise an image using curvature driven flow.
Self & SetNumberOfIterations(uint32_t NumberOfIterations)
Image Execute(Image &&image1)
Self & SetTimeStep(double TimeStep)
Read an image file and return a SimpleITK Image.
Image Execute() override
Set/Get The output PixelType of the image.
Self & SetFileName(const PathType &fn)
Write out a SimpleITK image to the specified file location.
Self & SetFileName(const PathType &fileName)
Self & Execute(const Image &)
The Image class for SimpleITK.
Label pixels that are connected to a seed and lie within a neighborhood.
Self & SetRadius(std::vector< unsigned int > Radius)
Self & SetUpper(double Upper)
Image Execute(const Image &image1)
Self & AddSeed(std::vector< unsigned int > point)
Add SeedList point.
Self & SetLower(double Lower)
Self & SetReplaceValue(double ReplaceValue)