1 /* base class for all convolution operations 2 */ 3 4 /* 5 6 Copyright (C) 1991-2005 The National Gallery 7 8 This library is free software; you can redistribute it and/or 9 modify it under the terms of the GNU Lesser General Public 10 License as published by the Free Software Foundation; either 11 version 2.1 of the License, or (at your option) any later version. 12 13 This library is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 Lesser General Public License for more details. 17 18 You should have received a copy of the GNU Lesser General Public 19 License along with this library; if not, write to the Free Software 20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 21 02110-1301 USA 22 23 */ 24 25 /* 26 27 These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 28 29 */ 30 31 #ifndef VIPS_PCONVOLUTION_H 32 #define VIPS_PCONVOLUTION_H 33 34 #ifdef __cplusplus 35 extern "C" { 36 #endif /*__cplusplus*/ 37 38 #include <vips/vector.h> 39 40 #define VIPS_TYPE_CONVOLUTION (vips_convolution_get_type()) 41 #define VIPS_CONVOLUTION( obj ) \ 42 (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ 43 VIPS_TYPE_CONVOLUTION, VipsConvolution )) 44 #define VIPS_CONVOLUTION_CLASS( klass ) \ 45 (G_TYPE_CHECK_CLASS_CAST( (klass), \ 46 VIPS_TYPE_CONVOLUTION, VipsConvolutionClass)) 47 #define VIPS_IS_CONVOLUTION( obj ) \ 48 (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_CONVOLUTION )) 49 #define VIPS_IS_CONVOLUTION_CLASS( klass ) \ 50 (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_CONVOLUTION )) 51 #define VIPS_CONVOLUTION_GET_CLASS( obj ) \ 52 (G_TYPE_INSTANCE_GET_CLASS( (obj), \ 53 VIPS_TYPE_CONVOLUTION, VipsConvolutionClass )) 54 55 typedef struct _VipsConvolution VipsConvolution; 56 57 struct _VipsConvolution { 58 VipsOperation parent_instance; 59 60 VipsImage *in; 61 VipsImage *out; 62 VipsImage *mask; 63 64 /* @mask cast ready for processing. 65 */ 66 VipsImage *M; 67 }; 68 69 typedef struct _VipsConvolutionClass { 70 VipsOperationClass parent_class; 71 72 } VipsConvolutionClass; 73 74 GType vips_convolution_get_type( void ); 75 76 #ifdef __cplusplus 77 } 78 #endif /*__cplusplus*/ 79 80 #endif /*VIPS_PCONVOLUTION_H*/ 81 82 83