Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
|
Functions | |
bool | EqualImages (const std::string &file1, const std::string &file2) |
Loads and compares two images. classes. More... | |
template<class D , class D2 > | |
bool | EqualImages (const Image< D > &img1, const Image< D2 > &img2) |
template<class D > | |
Image< D > | RemoveFrame (const Image< D > &img, const Vector< size_t > &low_coord, const Vector< size_t > &hgh_coord) |
Computes and returns image without the frame given by lower and higher coordinates. More... | |
template<class D > | |
Image< D > | RemoveFrame (const Image< D > &img, size_t width) |
Computes and returns image without the frame. More... | |
template<class D > | |
Image< D > | AddFrame (const Image< D > &img, const Vector< size_t > &base_coord, const Vector< size_t > &full_size) |
Computes and returns image with zero intensity pixels frame. base_coord gives the lower coordinates the img is inserted. full_size is the size of the framed image. More... | |
template<class D > | |
Image< D > | AddFrame (const Image< D > &img, size_t width) |
Computes and returns image with zero value frame. Frame with given width is added to every extremity. More... | |
template<class D > | |
Image< D > | SwapDims (const Image< D > &img, size_t dim_0, size_t dim_1, bool invert_dir_0=false, bool invert_dir_1=false) |
Computes the image resultant from swapping dim_0 with dim_1. More... | |
template<class D > | |
Image< D > | Merge (Vector< Image< D > > &img_vector, float new_pixel_size=1.0) |
Static constructor of a 3D spatial image, from an vector of 2D images. Images may or may not have channels. More... | |
template<class D > | |
std::tuple< Vector< size_t >, Vector< size_t > > | ROI (const Image< D > &img) |
Computes lower and higher coordinates of the region of interest (ROI). The ROI is the smallest box that contains all non-zero pixels. More... | |
template<class D > | |
Image< D > | Resize (const Image< D > &mat, const Vector< size_t > &new_min, const Vector< size_t > &new_max) |
Returns a submatrix from this matrix. If this matrix has more dimensions than the input, than all elements of these Dimensions are included in the submatrix. More... | |
template<class D > | |
Image< D > | Resize (const Image< D > &mat, const std::string &coordinates) |
Returns a submatrix from this matrix. The coordinates string must be given in a similar way as used by MatLab, or in some other variations. More... | |
template<class D > | |
Image< size_t > | Coordinates (const Image< D > &mat, const std::string &coordinates) |
Returns vectors with minimum and maximum coordinates from this matrix. The coordinates string must be given in a similar fashion as used by MatLab, or in some other variations. Examples: img( "1, 1:2 )" = coordinates with column 1 and rows 1 and 2. img( "1:, :2 )" = coordinates with columns 1 to img.size( 0 ) and rows 0 to 2. img( "1:, : )" = coordinates with columns 1 to img.size( 0 ) and all rows. If this matrix has more dimensions than the input string, than all elements of these dimensions are included in the resulting vector. More... | |
template<class D > | |
Vector< Image< D > > | Split (const Image< D > &img, size_t dimension) |
Create a vector of ( dim < N )-D images from an N-D image. More... | |
Image< D > Bial::ImageOp::AddFrame | ( | const Image< D > & | img, |
const Vector< size_t > & | base_coord, | ||
const Vector< size_t > & | full_size | ||
) |
Computes and returns image with zero intensity pixels frame. base_coord gives the lower coordinates the img is inserted. full_size is the size of the framed image.
img | Input image. |
base_coord | Lower coordinates of the image with the frame. |
full_size | Full size of the computed image. |
Computes and returns image with zero value frame. Frame with given width is added to every extremity.
img | Input image. |
width | Frame width. |
Image< size_t > Bial::ImageOp::Coordinates | ( | const Image< D > & | mat, |
const std::string & | coordinates | ||
) |
Returns vectors with minimum and maximum coordinates from this matrix. The coordinates string must be given in a similar fashion as used by MatLab, or in some other variations. Examples: img( "1, 1:2 )" = coordinates with column 1 and rows 1 and 2. img( "1:, :2 )" = coordinates with columns 1 to img.size( 0 ) and rows 0 to 2. img( "1:, : )" = coordinates with columns 1 to img.size( 0 ) and all rows. If this matrix has more dimensions than the input string, than all elements of these dimensions are included in the resulting vector.
coordinates | Coordinates in this matrix to be used to generate the submatrix. |
Loads and compares two images. classes.
file1 | First image path. |
file2 | Second image path. |
bool Bial::ImageOp::EqualImages | ( | const Image< D > & | img1, |
const Image< D2 > & | img2 | ||
) |
Image< D > Bial::ImageOp::Merge | ( | Vector< Image< D > > & | img_vector, |
float | new_pixel_size = 1.0 |
||
) |
Static constructor of a 3D spatial image, from an vector of 2D images. Images may or may not have channels.
img_vector | vector of images. |
new_pixel_size | Pixel dimension of the new space. |
Image< D > Bial::ImageOp::RemoveFrame | ( | const Image< D > & | img, |
const Vector< size_t > & | low_coord, | ||
const Vector< size_t > & | hgh_coord | ||
) |
Computes and returns image without the frame given by lower and higher coordinates.
img | Input image. |
low_coord | Lower coordinates of the frame. |
hgh_coord | Higher coordinates of the frame. |
Computes and returns image without the frame.
img | Input image. |
width | Frame width. |
Image< D > Bial::ImageOp::Resize | ( | const Image< D > & | mat, |
const Vector< size_t > & | new_min, | ||
const Vector< size_t > & | new_max | ||
) |
Returns a submatrix from this matrix. If this matrix has more dimensions than the input, than all elements of these Dimensions are included in the submatrix.
new_min | Vector containing the coord. of the begin of the sub_matrix dimensions |
new_max | Vector containing the coord. of the end of the sub_matrix dimensions |
Image< D > Bial::ImageOp::Resize | ( | const Image< D > & | mat, |
const std::string & | coordinates | ||
) |
Returns a submatrix from this matrix. The coordinates string must be given in a similar way as used by MatLab, or in some other variations.
If this matrix has more dimensions than the input string, than all elements of these dimensions are included in the submatrix.
coordinates | Coordinates in this matrix to be used to generate the submatrix. |
std::tuple< Vector< size_t >, Vector< size_t > > Bial::ImageOp::ROI | ( | const Image< D > & | img | ) |
Computes lower and higher coordinates of the region of interest (ROI). The ROI is the smallest box that contains all non-zero pixels.
img | Input image. |
Vector< Image< D > > Bial::ImageOp::Split | ( | const Image< D > & | img, |
size_t | dimension | ||
) |
Create a vector of ( dim < N )-D images from an N-D image.
img | A 3D or 4D input image. |
dimension | Dimension of the image to be split in vectors. |
Image< D > Bial::ImageOp::SwapDims | ( | const Image< D > & | img, |
size_t | dim_0, | ||
size_t | dim_1, | ||
bool | invert_dir_0 = false , |
||
bool | invert_dir_1 = false |
||
) |
Computes the image resultant from swapping dim_0 with dim_1.
img | Input image. |
dim_0 | A valid dimension of the image. |
dim_1 | Another valid dimension of the image. |
invert_dir_0 | Wheather dim_0 should be inverted or not. |
invert_dir_1 | Wheather dim_1 should be inverted or not. |