A.I.M.S


AimsThreshold< T, U > Class Template Reference

The template class to make thresholds. More...

#include <aims/utility/threshold.h>

Collaboration diagram for AimsThreshold< T, U >:

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...
 
_level
 Lower level or unique level. More...
 
_level2
 Upper level. More...
 
_backgd
 
_foregd
 

Detailed Description

template<class T, class U>
class AimsThreshold< T, U >

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 :

  • AIMS_LOWER_THAN
  • AIMS_LOWER_OR_EQUAL_TO
  • AIMS_GREATER_THAN
  • AIMS_GREATER_OR_EQUAL_TO
  • AIMS_EQUAL_TO
  • AIMS_DIFFER
  • AIMS_BETWEEN
  • AIMS_OUTSIDE
  • AIMS_BETWEEN_EXCLUDE_LOWER_BOUND
  • AIMS_BETWEEN_EXCLUDE_HIGHER_BOUND
  • AIMS_BETWEEN_EXCLUDE_BOUNDS
  • AIMS_OUTSIDE_INCLUDE_LOWER_BOUND
  • AIMS_OUTSIDE_INCLUDE_HIGHER_BOUND
  • AIMS_OUTSIDE_INCLUDE_BOUNDS

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.

Constructor & Destructor Documentation

template<class T , class U >
AimsThreshold< T, U >::AimsThreshold ( threshold_t  type,
level,
level2 = 0,
backgd = 0,
foregd = (U)(!std::numeric_limits<U>::is_specialized                                       || (std::numeric_limits<U>::max() >= 32767)                                      ? 32767 : std::numeric_limits<U>::max() ) 
)
inline

Volume thresholding.

Parameters
typethreshold type (AIMS_LOWER_THAN,...)
levelfirst threshold
level2second threshold [default=0]
backgdvalue for voxels cut out by the thresholding
foregdvalue for voxels cut in by the thresholding

Definition at line 158 of file threshold.h.

template<class T , class U >
virtual AimsThreshold< T, U >::~AimsThreshold ( )
inlinevirtual

Definition at line 108 of file threshold.h.

Member Function Documentation

Member Data Documentation

template<class T , class U >
T AimsThreshold< T, U >::_backgd
protected

Definition at line 125 of file threshold.h.

template<class T , class U >
U AimsThreshold< T, U >::_foregd
protected

Definition at line 126 of file threshold.h.

template<class T , class U >
T AimsThreshold< T, U >::_level
protected

Lower level or unique level.

Definition at line 122 of file threshold.h.

template<class T , class U >
T AimsThreshold< T, U >::_level2
protected

Upper level.

Definition at line 124 of file threshold.h.

template<class T , class U >
threshold_t AimsThreshold< T, U >::_type
protected

Threshold type.

Definition at line 120 of file threshold.h.


The documentation for this class was generated from the following file: