00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef OLENA_ATTRIBUTE_CLOSING_OPENING_HH
00029 # define OLENA_ATTRIBUTE_CLOSING_OPENING_HH
00030
00031 #include <oln/morpho/attribute_union_find.hh>
00032
00033
00034 namespace oln {
00037 namespace morpho {
00040 namespace fast {
00043 namespace tarjan {
00046 namespace internal {
00047
00060 template<class I, class N, class A>
00061 oln_concrete_type(I)
00062 attr_closing_(const abstract::non_vectorial_image<I>& input,
00063 const abstract::neighborhood<N>& Ng,
00064 const attr_lambda_type(A) &lambda,
00065 const attr_env_type(A) &env = attr_env_type(A)())
00066 {
00067 typedef tarjan::tarjan_set<oln_concrete_type(I), A > tarjan_set_type;
00068 tarjan_set_type attr_closing(input.exact(), env);
00069 return attr_closing.template get_comptute<true>(lambda, Ng);
00070 }
00071
00084 template<class I, class N, class A>
00085 oln_concrete_type(I)
00086 attr_opening_(const abstract::non_vectorial_image<I>& input,
00087 const abstract::neighborhood<N>& Ng,
00088 const attr_lambda_type(A) &lambda,
00089 const attr_env_type(A) &env = attr_env_type(A)())
00090 {
00091 typedef tarjan::tarjan_set<oln_concrete_type(I), A > tarjan_set_type;
00092 tarjan_set_type attr_opening(input.exact(), env);
00093 return attr_opening.template get_comptute<false>(lambda, Ng);
00094 }
00095
00096 }
00097 }
00098
00099 # define xxx_opening_decl(T) \
00100 template<class I, class N> \
00101 oln_concrete_type(I) \
00102 T##_opening(const abstract::non_vectorial_image<I>& input, \
00103 const abstract::neighborhood<N>& Ng, \
00104 const attr_lambda_type(attr::T##_type<unsigned>) &lambda) \
00105 { \
00106 return tarjan::internal::attr_opening_<I, N, attr::T##_type<unsigned> >(input, Ng, lambda); \
00107 }
00108
00109 # define xxx_closing_decl(T) \
00110 template<class I, class N> \
00111 oln_concrete_type(I) \
00112 T##_closing(const abstract::non_vectorial_image<I>& input, \
00113 const abstract::neighborhood<N>& Ng, \
00114 const attr_lambda_type(attr::T##_type<unsigned>) &lambda) \
00115 { \
00116 return tarjan::internal::attr_closing_<I, N, attr::T##_type<unsigned> >(input, Ng, lambda); \
00117 }
00118
00119
00120
00121 # define xxx_opening_im_decl(T) \
00122 template<class I, class N> \
00123 oln_concrete_type(I) \
00124 T##_opening(const abstract::non_vectorial_image<I>& input, \
00125 const abstract::neighborhood<N>& Ng, \
00126 const attr_lambda_type(attr::T##_type<I>) &lambda) \
00127 { \
00128 return tarjan::internal::attr_opening_<I, N, attr::T##_type<I> >(input, Ng, lambda); \
00129 }
00130
00131 # define xxx_closing_im_decl(T) \
00132 template<class I, class N> \
00133 oln_concrete_type(I) \
00134 T##_closing(const abstract::non_vectorial_image<I>& input, \
00135 const abstract::neighborhood<N>& Ng, \
00136 const attr_lambda_type(attr::T##_type<I>) &lambda) \
00137 { \
00138 return tarjan::internal::attr_closing_<I, N, attr::T##_type<I> >(input, Ng, lambda); \
00139 }
00140
00166 xxx_closing_decl(card);
00167
00193 xxx_opening_decl(card);
00194
00220 xxx_closing_decl(integral);
00221
00247 xxx_opening_decl(integral);
00248
00274 xxx_opening_decl(height);
00275
00302 xxx_closing_decl(height);
00303
00304
00331 xxx_closing_decl(maxvalue);
00332
00359 xxx_opening_decl(maxvalue);
00360
00387 xxx_opening_decl(minvalue);
00388
00415 xxx_closing_decl(minvalue);
00416
00443 xxx_opening_im_decl(ball);
00444
00471 xxx_closing_im_decl(ball);
00472
00499 xxx_opening_im_decl(dist);
00500
00527 xxx_closing_im_decl(dist);
00528
00555 xxx_closing_im_decl(cube);
00556
00583 xxx_opening_im_decl(cube);
00584
00612 xxx_closing_im_decl(box);
00613
00641 xxx_opening_im_decl(box);
00642
00643 }
00644 }
00645 }
00646
00647 #endif