aimsdata
5.0.5
Neuroimaging data handling
|
The template class to make thresholds. More...
#include <aims/utility/threshold.h>
Public Member Functions | |
AimsThreshold (threshold_t type, T level, T level2=0, T backgd=0, U foregd=(U)(!std::numeric_limits< U >::is_specialized||(std::numeric_limits< U >::max() >=32767) ? 32767 :std::numeric_limits< U >::max())) | |
Volume thresholding. More... | |
virtual | ~AimsThreshold () |
AimsData< T > | operator() (const AimsData< T > &sqv) |
Return the multi-level thresholded image. More... | |
AimsData< T > | clip (const AimsData< T > &sqv) |
Return the multi-level thresholded image with clipped values (backgd ignored) More... | |
AimsData< U > | bin (const AimsData< T > &sqv) |
Return the binary thresholded image. More... | |
Protected Attributes | |
threshold_t | _type |
Threshold type. More... | |
T | _level |
Lower level or unique level. More... | |
T | _level2 |
Upper level. More... | |
T | _backgd |
U | _foregd |
The template class to make thresholds.
The first template argument provides the type of the item. The second template argument provides the type of the binary image. The programmer can implement single and double thresholds This class is useful to do binary or level thresholds. There are different types of thresholds :
If bin is set to true, the threshold returns a binary short image with levels 0 and foregd (32767 by default).
Definition at line 94 of file threshold.h.
|
inline |
Volume thresholding.
type | threshold type (AIMS_LOWER_THAN,...) |
level | first threshold |
level2 | second threshold [default=0] |
backgd | value for voxels cut out by the thresholding |
foregd | value for voxels cut in by the thresholding |
Definition at line 159 of file threshold.h.
|
inlinevirtual |
Definition at line 109 of file threshold.h.
References AimsThreshold< T, U >::bin(), AimsThreshold< T, U >::clip(), and AimsThreshold< T, U >::operator()().
|
inline |
Return the binary thresholded image.
Definition at line 740 of file threshold.h.
References AimsTexThreshold< T, U >::_level, AimsTexThreshold< T, U >::_level2, AimsTexThreshold< T, U >::_type, AIMS_BETWEEN, AIMS_BETWEEN_EXCLUDE_BOUNDS, AIMS_BETWEEN_EXCLUDE_HIGHER_BOUND, AIMS_BETWEEN_EXCLUDE_LOWER_BOUND, AIMS_DIFFER, AIMS_EQUAL_TO, AIMS_GREATER_OR_EQUAL_TO, AIMS_GREATER_THAN, AIMS_LOWER_OR_EQUAL_TO, AIMS_LOWER_THAN, AIMS_OUTSIDE, AIMS_OUTSIDE_INCLUDE_BOUNDS, AIMS_OUTSIDE_INCLUDE_HIGHER_BOUND, AIMS_OUTSIDE_INCLUDE_LOWER_BOUND, carto::volumeutil::applyTowards(), aims::Border::borderWidth(), aims::Header::cloneHeader(), AimsData< T >::dimT(), AimsData< T >::dimX(), AimsData< T >::dimY(), AimsData< T >::dimZ(), carto::TypedObject< T >::hasProperty(), AimsData< T >::header(), carto::TypedObject< T >::removeProperty(), AimsData< T >::setSizeX(), AimsData< T >::sizeT(), AimsData< T >::sizeX(), AimsData< T >::sizeY(), AimsData< T >::sizeZ(), and AimsData< T >::volume().
Referenced by AimsTexThreshold< T, U >::~AimsTexThreshold(), and AimsThreshold< T, U >::~AimsThreshold().
|
inline |
Return the multi-level thresholded image with clipped values (backgd ignored)
Definition at line 505 of file threshold.h.
References AimsTexThreshold< T, U >::_level, AimsTexThreshold< T, U >::_level2, AimsTexThreshold< T, U >::_type, AIMS_BETWEEN, AIMS_BETWEEN_EXCLUDE_BOUNDS, AIMS_BETWEEN_EXCLUDE_HIGHER_BOUND, AIMS_BETWEEN_EXCLUDE_LOWER_BOUND, AIMS_DIFFER, AIMS_EQUAL_TO, AIMS_GREATER_OR_EQUAL_TO, AIMS_GREATER_THAN, AIMS_LOWER_OR_EQUAL_TO, AIMS_LOWER_THAN, AIMS_OUTSIDE, AIMS_OUTSIDE_INCLUDE_BOUNDS, AIMS_OUTSIDE_INCLUDE_HIGHER_BOUND, AIMS_OUTSIDE_INCLUDE_LOWER_BOUND, carto::volumeutil::applyTowards(), aims::Border::borderWidth(), aims::Header::cloneHeader(), AimsData< T >::dimT(), AimsData< T >::dimX(), AimsData< T >::dimY(), AimsData< T >::dimZ(), carto::TypedObject< T >::hasProperty(), AimsData< T >::header(), carto::TypedObject< T >::removeProperty(), AimsData< T >::setSizeX(), AimsData< T >::sizeT(), AimsData< T >::sizeX(), AimsData< T >::sizeY(), AimsData< T >::sizeZ(), and AimsData< T >::volume().
Referenced by AimsThreshold< T, U >::~AimsThreshold().
|
inline |
Return the multi-level thresholded image.
Definition at line 296 of file threshold.h.
References AimsTexThreshold< T, U >::_backgd, AimsTexThreshold< T, U >::_level, AimsTexThreshold< T, U >::_level2, AimsTexThreshold< T, U >::_type, AIMS_BETWEEN, AIMS_BETWEEN_EXCLUDE_BOUNDS, AIMS_BETWEEN_EXCLUDE_HIGHER_BOUND, AIMS_BETWEEN_EXCLUDE_LOWER_BOUND, AIMS_DIFFER, AIMS_EQUAL_TO, AIMS_GREATER_OR_EQUAL_TO, AIMS_GREATER_THAN, AIMS_LOWER_OR_EQUAL_TO, AIMS_LOWER_THAN, AIMS_OUTSIDE, AIMS_OUTSIDE_INCLUDE_BOUNDS, AIMS_OUTSIDE_INCLUDE_HIGHER_BOUND, AIMS_OUTSIDE_INCLUDE_LOWER_BOUND, carto::volumeutil::applyTowards(), aims::Border::borderWidth(), aims::Header::cloneHeader(), AimsData< T >::dimT(), AimsData< T >::dimX(), AimsData< T >::dimY(), AimsData< T >::dimZ(), carto::TypedObject< T >::hasProperty(), AimsData< T >::header(), carto::TypedObject< T >::removeProperty(), AimsData< T >::setSizeX(), AimsData< T >::sizeT(), AimsData< T >::sizeX(), AimsData< T >::sizeY(), AimsData< T >::sizeZ(), and AimsData< T >::volume().
Referenced by AimsTexThreshold< T, U >::~AimsTexThreshold(), and AimsThreshold< T, U >::~AimsThreshold().
|
protected |
Definition at line 126 of file threshold.h.
|
protected |
Definition at line 127 of file threshold.h.
|
protected |
Lower level or unique level.
Definition at line 123 of file threshold.h.
|
protected |
Upper level.
Definition at line 125 of file threshold.h.
|
protected |
Threshold type.
Definition at line 121 of file threshold.h.