ddt  0.1
Functions
imageHelpers.hpp File Reference
#include <tuple>
#include <vector>
#include <cpl.h>

Go to the source code of this file.

Functions

std::vector< int > SubarrayLineInt (cpl_image *image, std::tuple< int, int > start, std::tuple< int, int > end)
 
std::vector< int > SubarrayLineInt (cpl_image *image, int x0, int y0, int x1, int y1)
 
std::vector< double > SubarrayLineDouble (cpl_image *image, int x0, int y0, const int x1, const int y1)
 
std::vector< std::vector< int > > SubarrayRectInt (cpl_image *image, std::tuple< int, int > start, std::tuple< int, int > end)
 
std::vector< std::vector< int > > SubarrayRectInt (cpl_image *image, int llx, int lly, int urx, int ury)
 
cpl_image * SubImageRect (cpl_image *image, std::tuple< int, int > start, std::tuple< int, int > end)
 
cpl_image * SubImageRect (cpl_image *image, int llx, int lly, int urx, int ury)
 
cpl_image * SubImageCircular (cpl_image *image, int xcenter, int ycenter, int radius)
 

Function Documentation

◆ SubarrayLineDouble()

std::vector<double> SubarrayLineDouble ( cpl_image *  image,
int  x0,
int  y0,
const int  x1,
const int  y1 
)

Returns a double subarray of pixel values from a cpl_image along a line defined by start and end point (x and y image coordinates)

◆ SubarrayLineInt() [1/2]

std::vector<int> SubarrayLineInt ( cpl_image *  image,
int  x0,
int  y0,
int  x1,
int  y1 
)

Returns an integer subarray of pixel values from a cpl_image along a line defined by start and end point (x and y image coordinates)

◆ SubarrayLineInt() [2/2]

std::vector<int> SubarrayLineInt ( cpl_image *  image,
std::tuple< int, int >  start,
std::tuple< int, int >  end 
)

This file is part of the DDT Image Handling Library and provides functions to process CPL images.

The usage is as follows:

#include "ddt/imageProc.hpp" ... using namespace ddt; Returns an integer subarray of pixel values from a cpl_image along a line defined by start and end point (tuples of image coordinates)

◆ SubarrayRectInt() [1/2]

std::vector<std::vector<int> > SubarrayRectInt ( cpl_image *  image,
int  llx,
int  lly,
int  urx,
int  ury 
)

Returns an integer subarray of pixel values from a cpl_image within a rectangle defined by two corners (coordinates of lower left and upper right corners)

◆ SubarrayRectInt() [2/2]

std::vector<std::vector<int> > SubarrayRectInt ( cpl_image *  image,
std::tuple< int, int >  start,
std::tuple< int, int >  end 
)

Returns an integer subarray of pixel values from a cpl_image within a rectangle defined by two corners (tuples of image coordinates)

◆ SubImageCircular()

cpl_image* SubImageCircular ( cpl_image *  image,
int  xcenter,
int  ycenter,
int  radius 
)

Returns a circular CPL subimage from a cpl_image. The circular area is defined by the center coordinates and the radius. The returned rectangle has all pixels lying outside the circular area added to the bad pixel map. The image has to be deleted using cpl_image_delete().

◆ SubImageRect() [1/2]

cpl_image* SubImageRect ( cpl_image *  image,
int  llx,
int  lly,
int  urx,
int  ury 
)

Returns a CPL subimage from a cpl_image within a rectangle defined by two corners (coordinates of lower left and upper right corners)

Returns a CPL subimage from a cpl_image within a rectangle defined by two corners (coordinates of lower left and upper right corners)

The image has to be deleted using cpl_image_delete().

◆ SubImageRect() [2/2]

cpl_image* SubImageRect ( cpl_image *  image,
std::tuple< int, int >  start,
std::tuple< int, int >  end 
)

Returns a CPL subimage from a cpl_image within a rectangle defined by two corners (tuples of image coordinates)

Returns a CPL subimage from a cpl_image within a rectangle defined by two corners (tuples of image coordinates)

The image has to be deleted using cpl_image_delete().