Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
Bial::Brain Namespace Reference

Classes

class  BrainIntensities
 Robust statistics for minimum and maximum tissue intensities. More...
 

Functions

template<class D >
size_t HeadTopSlice (const Image< D > &img, const std::string &orientation)
 It searches for the first superior axial slice with a pixel which intensity is higher than otsu threshold. More...
 
template<class D >
Vector< size_t > COGbyIntensityThreshold (const Image< D > &img)
 Returns a Vector with COG coordinates, based on a binary mask of the image main object. More...
 
template<class D >
Vector< size_t > COGbyWeightedIntensity (const Image< D > &img)
 Returns a Vector with COG coordinates, based on intensity weighted values of the image. More...
 
template<class D >
Vector< size_t > COGbyHeadTopDistance (const Image< D > &img, const std::string &orientation)
 Returns a Vector with COG coordinates, based on intensity weighted values of the image and distance from the top of the head. More...
 
template<class D >
Vector< size_t > COGbyIntegralImage (const Image< D > &img, const std::string &orientation, MRIModality modality)
 Returns a Vector with COG coordinates, based on intensity weighted values of the image and distance from the top of the head. More...
 
template<class D >
Image< D > RemoveIntensityOutliers (const Image< D > &img, const Image< D > &msk, float compression, MRIModality modality)
 Remove outliers from brain mask which have extreme intensity values. Used to correct inhomogeneity. More...
 
template<class D >
Image< D > BiasSurfaceEstimation (const Image< D > &img, const Image< D > &msk, const Image< D > &cln_msk, float radius, MRIModality modality)
 Computes bias surface based on white matter pixels in the image. More...
 
template<class D >
Image< D > BiasSurfaceRemoval (const Image< D > &img, const Image< D > &msk, const Image< D > &bias, MRIModality modality)
 Removes estimated bias field from the input image. More...
 
template<class D >
Image< D > InhomogeneityCorrection (const Image< D > &img, const Image< D > &msk, float radius=15.5, size_t compression=2, MRIModality modality=MRIModality::T1)
 Computes bias surface based on white matter pixels in the image. More...
 
template<class D >
Vector< size_t > Location (const Image< D > &img, const std::string &orientation, Vector< Box > &best_rectangles, Image< float > &similarity)
 Finds the best location of a box inside the brain and of surrounding boxes outside of the brain. More...
 
template<class D >
Image< D > SkullStripping (const Image< D > &img, const std::string &orientation)
 Segments the brain from the background. More...
 
template<class D >
void TissueLabeling (const Image< D > &image, const Image< D > &mask, Image< int > &label, D intensity)
 Set labeled clusters into low and high intensity tissues. Low intensity tissue pixels have their label set to 0 and high intensity tissue pixels have their label set to 1. More...
 
template<class D >
Image< int > TissueSegmentation (const Image< D > &img, const Image< D > &msk, D tissue_intensity, float scl_min, float scl_max, bool hierarchical)
 Set labeled clusters into low and high intensity tissues. Low intensity tissue pixels have their label set to 0 and high intensity tissue pixels have their label set to 1. More...
 
template<class D >
Image< int > TissueSegmentation (const Image< D > &img, const Image< D > &msk, MRIModality modality, float csf_scl_min=0.1, float csf_scl_max=0.2, float gm_scl_min=0.2, float gm_scl_max=0.3, bool hierarchical=false)
 Segment brain into CSF, GM, and WM tissues. More...
 

Function Documentation

template<class D >
Image< D > Bial::Brain::BiasSurfaceEstimation ( const Image< D > &  img,
const Image< D > &  msk,
const Image< D > &  cln_msk,
float  radius,
MRIModality  modality 
)

Computes bias surface based on white matter pixels in the image.

Date
2014/Jan/08
Parameters
imgA MRI image.
mskBrain mask.
cln_mskBrain mask without outliers.
radiusRadius for distance transform. (8.0 to 20.0)
modalityImage modality.
Returns
Image with bias field surface.
Warning
none.
template<class D >
Image< D > Bial::Brain::BiasSurfaceRemoval ( const Image< D > &  img,
const Image< D > &  msk,
const Image< D > &  bias,
MRIModality  modality 
)

Removes estimated bias field from the input image.

Date
2014/Jan/08
Parameters
imgA MRI image.
mskBrain mask.
biasBias field surface.
modalityImage modality.
Returns
Bias field removed from image.
Warning
none.
template<class D >
Vector< size_t > Bial::Brain::COGbyHeadTopDistance ( const Image< D > &  img,
const std::string &  orientation 
)

Returns a Vector with COG coordinates, based on intensity weighted values of the image and distance from the top of the head.

Date
2013/Aug/27
Parameters
imgA brain image.
orientationImage orientation. Must be a composition of three values containing: LR, RL, SI, IS, AP, or PA. Look for NiftiHeader::Orientation() function for examples.
Returns
Vector with COG coordinates.
Warning
none.
template<class D >
Vector< size_t > Bial::Brain::COGbyIntegralImage ( const Image< D > &  img,
const std::string &  orientation,
MRIModality  modality 
)

Returns a Vector with COG coordinates, based on intensity weighted values of the image and distance from the top of the head.

Date
2013/Aug/27
Parameters
imgA brain image.
orientationImage orientation. Must be a composition of three values containing: LR, RL, SI, IS, AP, or PA. Look for NiftiHeader::Orientation() function for examples.
modalityImage modality. Defined in Image.hpp.
Returns
Vector with COG coordinates.
Warning
none.
template<class D >
Vector< size_t > Bial::Brain::COGbyIntensityThreshold ( const Image< D > &  img)

Returns a Vector with COG coordinates, based on a binary mask of the image main object.

Date
2013/Aug/27
Parameters
imgA brain image.
Returns
Vector with COG coordinates.
Warning
none.
template<class D >
Vector< size_t > Bial::Brain::COGbyWeightedIntensity ( const Image< D > &  img)

Returns a Vector with COG coordinates, based on intensity weighted values of the image.

Date
2013/Aug/27
Parameters
imgA brain image.
Returns
Vector with COG coordinates.
Warning
none.
template<class D >
size_t Bial::Brain::HeadTopSlice ( const Image< D > &  img,
const std::string &  orientation 
)

It searches for the first superior axial slice with a pixel which intensity is higher than otsu threshold.

Date
2013/Aug/27
Parameters
imgA brain image.
orientationImage orientation. Must be a composition of three values containing: LR, RL, SI, IS, AP, or PA. Look for NiftiHeader::Orientation() function for examples.
Returns
The slice of the first slice in axial orientation that contains pixels from the top of the head.
Warning
none.
template<class D >
Image< D > Bial::Brain::InhomogeneityCorrection ( const Image< D > &  img,
const Image< D > &  msk,
float  radius = 15.5,
size_t  compression = 2,
MRIModality  modality = MRIModality::T1 
)

Computes bias surface based on white matter pixels in the image.

Date
2014/Jan/08
Parameters
imgA MRI image.
mskBrain mask.
radiusRadius for distance transform. For searching local WM pixel (7.0 to 28.0)
compressioncompression rate to compute bias field faster (1, 2, or 4).
modalityImage modality.
Returns
Image with bias field surface.
Warning
none.
template<class D >
Vector< size_t > Bial::Brain::Location ( const Image< D > &  img,
const std::string &  orientation,
Vector< Box > &  best_rectangles,
Image< float > &  similarity 
)

Finds the best location of a box inside the brain and of surrounding boxes outside of the brain.

Date
2014/Oct/30
Parameters
imgA MRI image.
orientationImage orientation. Must be a composition of three values containing: LR, RL, SI, IS, AP, or PA. Look for NiftiHeader::Orientation() function for examples.
best_rectanglesRectangles containing the brain and external regions.
similaritySimilarity image showing the most probable location of the brain box center.
Returns
The center of gravity of the brain.
Warning
none.
template<class D >
Image< D > Bial::Brain::RemoveIntensityOutliers ( const Image< D > &  img,
const Image< D > &  msk,
float  compression,
MRIModality  modality 
)

Remove outliers from brain mask which have extreme intensity values. Used to correct inhomogeneity.

Date
2014/Jan/07
Parameters
imgAn MRI image of the head.
mskBrain mask.
compressioncompression rate to compute bias field faster (1, 2, or 4).
modalityImage modality. Defined in Image.hpp. Must be MRI_T1, MRI_T2, or MRI_PD.
Returns
Brain mask without outliers.
Warning
none.
template<class D >
Image< D > Bial::Brain::SkullStripping ( const Image< D > &  img,
const std::string &  orientation 
)

Segments the brain from the background.

Date
2014/Oct/30
Parameters
imgA MRI image.
orientationImage orientation. Must be a composition of three values containing: LR, RL, SI, IS, AP, or PA. Look for NiftiHeader::Orientation() function for examples.
Returns
Segmentation of the brain.
Warning
none.
template<class D >
void Bial::Brain::TissueLabeling ( const Image< D > &  image,
const Image< D > &  mask,
Image< int > &  label,
intensity 
)

Set labeled clusters into low and high intensity tissues. Low intensity tissue pixels have their label set to 0 and high intensity tissue pixels have their label set to 1.

Date
2013/Sep/04
Parameters
imageAn MRI image of the head.
maskBrain or tissue mask.
labelBrain or tissues segmented in labeled clusters.
intensityThreshold between low and high intensity tissues.
Returns
none.
Warning
none.
template<class D >
Image< int > Bial::Brain::TissueSegmentation ( const Image< D > &  img,
const Image< D > &  msk,
tissue_intensity,
float  scl_min,
float  scl_max,
bool  hierarchical 
)

Set labeled clusters into low and high intensity tissues. Low intensity tissue pixels have their label set to 0 and high intensity tissue pixels have their label set to 1.

Date
2013/Sep/04
Parameters
imgAn MRI image of the head.
mskBrain mask.
tissue_intensityValue between low and high intensity tissues.
scl_min,scl_maxMinimum and maximum number of neighbers for OPF clustering.
hierarchicalSelects between spectral (false) or hierarchicar clustering.
Returns
none.
Warning
none.
template<class D >
Image< int > Bial::Brain::TissueSegmentation ( const Image< D > &  img,
const Image< D > &  msk,
MRIModality  modality,
float  csf_scl_min = 0.1,
float  csf_scl_max = 0.2,
float  gm_scl_min = 0.2,
float  gm_scl_max = 0.3,
bool  hierarchical = false 
)

Segment brain into CSF, GM, and WM tissues.

Date
2013/Sep/04
Parameters
imgAn MRI image of the head.
mskBrain mask.
modalityImage modality. Defined in Image.hpp. Must be MRI_T1, MRI_T2, or MRI_PD.
xxx_scl_min,xxx_scl_maxMinimum and maximum number of neighbers for OPF clustering to segment xxx tissue.
hierarchicalSelects between spectral (false) or hierarchicar clustering.
Returns
none.
Warning
none.