aimsdata
5.1.2
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 () |
carto::VolumeRef< T > | operator() (const carto::VolumeRef< T > &sqv) |
Return the multi-level thresholded image. More... | |
carto::VolumeRef< T > | clip (const carto::VolumeRef< T > &sqv) |
Return the multi-level thresholded image with clipped values (backgd ignored) More... | |
carto::VolumeRef< U > | bin (const carto::VolumeRef< 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 93 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 158 of file threshold.h.
|
inlinevirtual |
Definition at line 108 of file threshold.h.
|
inline |
Return the binary thresholded image.
Definition at line 704 of file threshold.h.
References 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(), carto::VolumeRef< class >::copyHeaderFrom(), carto::VolumeRef< class >::getBorders(), carto::VolumeRef< class >::getSize(), carto::VolumeRef< class >::getVoxelSize(), carto::VolumeRef< class >::header(), and carto::VolumeRef< class >::setVoxelSize().
|
inline |
Return the multi-level thresholded image with clipped values (backgd ignored)
Definition at line 490 of file threshold.h.
References 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(), carto::VolumeRef< class >::copyHeaderFrom(), carto::VolumeRef< class >::getBorders(), carto::VolumeRef< class >::getSize(), carto::VolumeRef< class >::getVoxelSize(), carto::VolumeRef< class >::header(), and carto::VolumeRef< class >::setVoxelSize().
|
inline |
Return the multi-level thresholded image.
Definition at line 295 of file threshold.h.
References 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(), carto::VolumeRef< class >::copyHeaderFrom(), carto::VolumeRef< class >::getBorders(), carto::VolumeRef< class >::getSize(), carto::VolumeRef< class >::getVoxelSize(), carto::VolumeRef< class >::header(), and carto::VolumeRef< class >::setVoxelSize().
|
protected |
Definition at line 125 of file threshold.h.
|
protected |
Definition at line 126 of file threshold.h.
|
protected |
Lower level or unique level.
Definition at line 122 of file threshold.h.
|
protected |
Upper level.
Definition at line 124 of file threshold.h.
|
protected |
Threshold type.
Definition at line 120 of file threshold.h.