#include <iostream>
#include <vigra/multi_array.hxx>
#include <vigra/random.hxx>
#include <vigra/distancetransform.hxx>
#include <vigra/labelimage.hxx>
#include <vigra/seededregiongrowing.hxx>
int main(int argc, char ** argv)
{
try
{
int number_of_points = 25;
int size = 512;
for(int i=1; i<=number_of_points; ++i)
{
in(x,y) = i;
}
out = 255;
std::cout << "Wrote distance transform (distances.gif)" << std::endl;
std::cout << "Wrote voronoi diagram (voronoi.gif)" << std::endl;
}
catch (std::exception & e)
{
std::cout << e.what() << std::endl;
return 1;
}
return 0;
}
Calculate statistics for all regions of a labeled image.
Definition inspectimage.hxx:2079
Argument object for the function exportImage().
Definition imageinfo.hxx:134
Main MultiArray class containing the memory management.
Definition multi_array.hxx:2479
UInt32 uniformInt() const
Definition random.hxx:471
void exportImage(...)
Write an image to a file.
image import and export functions
void seededRegionGrowing(...)
Region Segmentation by means of Seeded Region Growing.
void initImageIf(...)
Write value to pixel in the image if mask is true.
void regionImageToEdgeImage(...)
Transform a labeled image into an edge image.
RandomNumberGenerator< detail::RandomState< detail::MT19937 > > MersenneTwister
Definition random.hxx:634
void distanceTransform(...)