00001
00002 /*----------------------------------------------------------------------------
00003 * E.S.O.
00004 *----------------------------------------------------------------------------
00005 * File name : cube_filters.h
00006 * Author : Nicolas Devillard
00007 * Created on : Aug 29, 1995
00008 * Hardware : Sun Sparc 20
00009 * Software : ANSI C under Solaris Unix
00010 * Part of ECLIPSE library for Adonis
00011 * Description : various cube filters in image domain
00012 *--------------------------------------------------------------------------*/
00013
00014 /*
00015
00016 $Id: cube_filters.h,v 1.1 2003/09/03 12:50:47 amodigli Exp $
00017 $Author: amodigli $
00018 $Date: 2003/09/03 12:50:47 $
00019 $Revision: 1.1 $
00020
00021 */
00022
00023 #ifndef _CUBE_FILTERS_H_
00024 #define _CUBE_FILTERS_H_
00025
00026
00027
00028 /*----------------------------------------------------------------------------
00029 * Includes
00030 *--------------------------------------------------------------------------*/
00031
00032 #include "memory.h"
00033 #include "cube_handling.h"
00034 #include "image_filters.h"
00035
00036
00037 /*----------------------------------------------------------------------------
00038 * Function ANSI C prototypes
00039 *--------------------------------------------------------------------------*/
00040
00041 /*---------------------------------------------------------------------------
00042 Function : cube_apply_named_filter()
00043 In : 1 cube, name of the filter to apply, double list
00044 Out : 1 newly allocated filtered cube
00045 Job : apply a filter to a cube. double parameter list may be
00046 empty, it is only used for user-defined filters.
00047 Notice : supported filters are:
00048 "user-linear"
00049 "mean3"
00050 "dx"
00051 "dy"
00052 "d2x"
00053 "d2y"
00054 "contour1"
00055 "contour2"
00056 "contour3"
00057 "contrast1"
00058 "mean5"
00059 "min"
00060 "max"
00061 "median"
00062 "max-min"
00063 "user-morpho"
00064 ---------------------------------------------------------------------------*/
00065
00066 OneCube *
00067 cube_apply_named_filter(
00068 OneCube * cube_in,
00069 char * filter,
00070 double * filtval) ;
00071
00072
00073
00074 /*----------------------------------------------------------------------------
00075 * Function : cube_filter_3x3()
00076 * In : cube, 3x3 filter matrix
00077 * Out : newly allocated filtered cube
00078 * Job : filter a cube
00079 * Notice : the filter is defined by a 3x3 double matrix.
00080 * if the matrix is:
00081 * f0 f1 f2
00082 * f3 f4 f5
00083 * f6 f7 f8
00084 * then the filter is given as a pointer to 9 double
00085 * elements, being: {f0,...,f8}.
00086 * the same filter is applied to every plane in the cube
00087 *--------------------------------------------------------------------------*/
00088
00089
00090 OneCube *
00091 cube_filter_3x3(
00092 OneCube * cube1,
00093 double * filter_array
00094 ) ;
00095
00096
00097 /*----------------------------------------------------------------------------
00098 * Function : cube_filter_5x5()
00099 * In : cube, 5x5 filter matrix
00100 * Out : filtered cube
00101 * Job : filter a cube in spatial domain
00102 * Notice : the filter is defined by a 5x5 double matrix.
00103 * if the matrix is:
00104 * f0 f1 f2 f3 f4
00105 * f5 f6 f7 f8 f9
00106 * f10 f11 f12 f13 f14
00107 * f15 f16 f17 f18 f19
00108 * f20 f21 f22 f23 f24
00109 * then the filter is given as a pointer to 25 double
00110 * elements, begin: {f0,..,f24}
00111 * the same filter is applied to every plane in the cube
00112 *--------------------------------------------------------------------------*/
00113
00114 OneCube *
00115 cube_filter_5x5(
00116 OneCube * cube1,
00117 double * filter_array
00118 ) ;
00119
00120
00121 /*----------------------------------------------------------------------------
00122 * Function : cube_filter_morpho()
00123 * In : cube, 3x3 filter matrix
00124 * Out : newly allocated filtered cube
00125 * Job : filter a cube in spatial domain with morphological filter
00126 * Notice : the filter is defined by a 3x3 double matrix.
00127 * if the matrix is:
00128 * f0 f1 f2
00129 * f3 f4 f5
00130 * f6 f7 f8
00131 * then the filter is given as a pointer to 9 double
00132 * elements, being: {f0,...,f8}.
00133 * the same filter is applied to every plane in the cube
00134 * The first filter element applies to the min value in the
00135 * 3x3 neighborhood of the current pixel, the 9th element of
00136 * the filter matrix applies to the maximum, and other
00137 * elements are sorted accordingly to their position.
00138 * The same filter is applied over each plane
00139 *--------------------------------------------------------------------------*/
00140
00141 OneCube *
00142 cube_filter_morpho(
00143 OneCube * cube1,
00144 double * filter_array
00145 ) ;
00146
00147
00148 /*----------------------------------------------------------------------------
00149 * Function : median_filter_cube()
00150 * In : OneCube *
00151 * Out : Newly allocated OneCube*
00152 * Job : perform a highly optimized median filtering on all planes
00153 * of the cube
00154 * Notice :
00155 *--------------------------------------------------------------------------*/
00156
00157 OneCube *
00158 median_filter_cube(
00159 OneCube * cube1
00160 ) ;
00161
00162
00163
00164 #endif
00165 /*--------------------------------------------------------------------------*/
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001