Integration of OCCT 6.5.0 from SVN
[occt.git] / src / Image / Image_AveragePixelInterpolation.cdl
1 -- File:        Image_AveragePixelInterpolation.cdl
2 -- Created:     Tue Jul 27 18:47:06 1993
3 -- Author:      Jean Louis FRENKEL
4 --              <jlf@sparc3>
5 ---Copyright:    Matra Datavision 1993
6
7
8 class AveragePixelInterpolation from Image inherits PixelInterpolation from Image
9
10         ---Purpose: The class AveragePixelInterpolation is used to compute a SubPixel 
11         --            value on non integer Image coordinate
12         --          AveragePixelInterpolation redefined a new method to compute a
13         --            SubPixel value .
14         --          SubPixel value is the average of the three nearest Pixel in 
15         --            the Image .
16         --          If V1, V2, V3, V4 is the value of the three nearest Image 
17         --            Pixel V = ( V1+V2+V3 ) / 3 is the Image SubPixel value
18         --            on non integer coordinate (FX,FY)
19
20
21 uses
22
23     Image               from Image,
24     Pixel               from Aspect,
25     ColorPixel          from Aspect,
26     IndexPixel          from Aspect,
27     DColorImage         from Image,
28     DIndexedImage       from Image
29
30 is
31
32         Create returns AveragePixelInterpolation from Image ;
33         ---Level: Public
34         ---Purpose: Create a AveragePixelInterpolation  object.
35
36         Interpolate( me ; aImage   : Image from Image ;
37                           FX,FY      : Real  from Standard ;
38                           LowerX,LowerY,UpperX,UpperY : Integer from Standard ;
39                           RetPixel : in out Pixel from Aspect ) 
40                 returns Boolean from Standard is redefined ;
41         ---Level: Public
42         ---Purpose: Redefined the method to compute SubPixel's value 
43         --            on non integer Image coordinate.
44         --          LowerX,LowerY,UpperX,UpperY is the Image Min Max, it's use
45         --          check if the SubPixel coordinate FX,FY is outside of image.
46         --          Return True  if Interpolation Succes.
47         --          Return False if the SubPixel is out from Image.
48
49         Interpolate( me ; aImage   : DColorImage from Image ;
50                           FX,FY      : Real  from Standard ;
51                           LowerX,LowerY,UpperX,UpperY : Integer from Standard ;
52                           RetPixel : in out ColorPixel from Aspect ) 
53                 returns Boolean from Standard  is redefined;
54         ---Level: Public
55         ---Purpose: Compute SubPixel's value on non integer Image coordinate for
56         --            DColorImage and ColorPixel.
57         --          LowerX,LowerY,UpperX,UpperY is the Image Min Max, it's use
58         --          check if the SubPixel coordinate FX,FY is outside of image.
59         --          Return True  if Interpolation Succes.
60         --          Return False if the SubPixel is out from Image.
61
62
63         Interpolate( me ; aImage   : DIndexedImage from Image ;
64                           FX,FY      : Real  from Standard ;
65                           LowerX,LowerY,UpperX,UpperY : Integer from Standard ;
66                           RetPixel : in out IndexPixel from Aspect ) 
67                 returns Boolean from Standard  is redefined;
68         ---Level: Public
69         ---Purpose: Compute SubPixel's value on non integer Image coordinate for
70         --            DIndexedImage and IndexPixel.
71         --          LowerX,LowerY,UpperX,UpperY is the Image Min Max, it's use
72         --          check if the SubPixel coordinate X,Y is outside of image.
73         --          Return True  if Interpolation Succes.
74         --          Return False if the SubPixel is out from Image.
75
76 end AveragePixelInterpolation from Image;