37 #include "Base/Image/ImageIO.hh"
38 #include "Base/ImageUtils/Bresenham.hh"
39 #include "Base/ImageUtils/BresenhamCircle.hh"
40 #include "Base/ImageUtils/BresenhamCircleEighth.hh"
41 #include "Base/ImageUtils/Scanline.hh"
42 #include "Base/Image/Image.hh"
47 int main (
int argc,
char *argv[])
50 unsigned char **ida=im.GetImageDataArray();
51 int next[]={0,0}, start[]={10,30}, end[]={120,90}, center[]={100, 150};
52 int epsilon=4, radius=30;
55 start[0]=atoi(argv[1]);
56 start[1]=atoi(argv[2]);
60 cerr << endl << argv[0] <<
" [ startx starty endx endy ]" << endl << endl;
63 im.FillImageWithConstValue((
unsigned char)0);
68 while (bcirc.GetNext(next)){
69 ida[next[1]][next[0]]=255;
77 while (bce.GetNext(next)){
78 ida[next[1]][next[0]]=255;
84 while (sl.GetNext(next)){
85 ida[next[1]][next[0]]=255;
91 while (bres.GetNext(next)){
92 ida[next[1]][next[0]]=0;
Scans a circle using Bresenham's integer arithmetic algorithm.
Class for scanning a region given by a line and a distance ca.
static int Save(const std::string &filename, const ImageBase &img, const enum TFileFormat FileFormat=FF_auto, const bool sync=BIAS_DEFAULT_SYNC, const int c_jpeg_quality=BIAS_DEFAULT_IMAGE_QUALITY, const bool forceNewID=BIAS_DEFAULT_FORCENEWID, const bool &writeMetaData=true)
Export image as file using extrnal libs.
Scans a line using Bresenhams integer arithmetic algorithm.
Just like BresenhamCircle but only computes 1/8 of the circle.