contrib/mul/vil3d/algo/vil3d_binary_closing.h
Go to the documentation of this file.
00001 #ifndef vil3d_binary_closing_h_
00002 #define vil3d_binary_closing_h_
00003 //:
00004 //  \file
00005 //  \brief Perform binary closing on 3D images
00006 //  \author Tim Cootes
00007 
00008 #include <vil3d/algo/vil3d_binary_dilate.h>
00009 #include <vil3d/algo/vil3d_binary_erode.h>
00010 
00011 //: Applies morphological closing operation with given structuring element
00012 //  Applies dilation followed by erosion
00013 // \relatesalso vil3d_image_view
00014 // \relatesalso vil3d_structuring_element
00015 inline void vil3d_binary_closing(const vil3d_image_view<bool>& src_image,
00016                                 vil3d_image_view<bool>& dest_image,
00017                                 const vil3d_structuring_element& element)
00018 {
00019   vil3d_image_view<bool> dilated_im;
00020   vil3d_binary_dilate(src_image,dilated_im,element);
00021   vil3d_binary_erode(dilated_im,dest_image,element);
00022 }
00023 
00024 #endif // vil3d_binary_closing_h_