00001 // This is tbl/vipl/filter/vipl_filter_abs.h 00002 #ifndef vipl_filter_abs_h_ 00003 #define vipl_filter_abs_h_ 00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE 00005 #pragma interface 00006 #endif 00007 //: 00008 // \file 00009 // This class provides a non-templated abstract class for all filters. It 00010 // has no data and little functionality, providing only axis naming and 00011 // composition methods. 00012 // \author 00013 // Terry Boult, Lehigh University 1997, 1998. 00014 // 00015 // \verbatim 00016 // Modifications 00017 // Peter Vanroose - Aug.2000 - converted to vxl 00018 // \endverbatim 00019 00020 #ifndef FILTER_IMPTR_DEC_REFCOUNT 00021 #define FILTER_IMPTR_DEC_REFCOUNT(v) ((v)->dec_refcount(),(v)=0) 00022 #endif 00023 #ifndef FILTER_IMPTR_INC_REFCOUNT 00024 #define FILTER_IMPTR_INC_REFCOUNT(v) ((v)->inc_refcount()) 00025 #endif 00026 #ifndef FILTER_KERNPTR_DEC_REFCOUNT 00027 #define FILTER_KERNPTR_DEC_REFCOUNT(v) ((v)->dec_refcount()) 00028 #endif 00029 00030 class vipl_filter_abs 00031 { 00032 public: 00033 00034 #ifdef USE_COMPOSE_WITH 00035 // Try to set the output of this filter to be the input of ``to''. So far 00036 // this function does nothing. Arg should be a nonconst ref. Return value is 00037 // true if the filter was composed. If its not ``composable'', the filter 00038 // state is not changed. 00039 virtual bool compose_with(vipl_filter_abs& to) = 0; 00040 #endif 00041 00042 //: Constant for accessing X_axis when appropriate for the filter. Currently==0, but please use the function... 00043 inline static int X_Axis() { return 0; } 00044 //: Constant for accessing Y_axis when appropriate for the filter. Currently==1, but please use the function... 00045 inline static int Y_Axis() { return 1; } 00046 //: Constant for accessing Z_axis when appropriate for the filter. Currently==2, but please use the function... 00047 inline static int Z_Axis() { return 2; } 00048 //: Constant for accessing T_axis when appropriate for the filter. Currently==3, but please use the function... 00049 inline static int T_Axis() { return 3; } 00050 }; 00051 00052 #endif // vipl_filter_abs_h_
1.5.1