/Users/lyon/j4p/src/j2d/edge/gabor/GaborParams.java

1    /* 
2     * Created by IntelliJ IDEA. 
3     * User: lyon 
4     * Date: Aug 2, 2002 
5     * Time: 8:34:50 AM 
6     */ 
7    package j2d.edge.gabor; 
8     
9    import java.util.Observable; 
10    
11   public class GaborParams extends Observable { 
12       // sample defaults 
13       //lambda=16.0 theta=0.8726646259971648 
14       //phi=0.0 gamma=0.5 sigma=8.994750006205322 
15       private double sigma = 6; 
16       private double lambda = sigma / 2; 
17       private double theta = 1; 
18       private double phi = 0; 
19       private double gamma = 0.5; 
20    
21    
22       public String toString() { 
23           return 
24                   "lambda=" + lambda + 
25                   " theta=" + theta + 
26                   " phi=" + phi + 
27                   " gamma=" + gamma + 
28                   " sigma=" + sigma; 
29       } 
30    
31       public double getLambda() { 
32           return lambda; 
33       } 
34    
35       public void setLambda(double _lambda) { 
36           this.lambda = _lambda; 
37           super.setChanged(); 
38           super.notifyObservers(); 
39       } 
40    
41       public double getTheta() { 
42           return theta; 
43       } 
44    
45       public void setTheta(double _theta) { 
46           this.theta = _theta; 
47           super.setChanged(); 
48           super.notifyObservers(); 
49       } 
50    
51       public double getPhi() { 
52           return phi; 
53       } 
54    
55       public void setPhi(double _phi) { 
56           this.phi = _phi; 
57           super.setChanged(); 
58           super.notifyObservers(); 
59       } 
60    
61       public double getGamma_val() { 
62           return gamma; 
63       } 
64    
65       public void setGamma(double _gamma) { 
66           this.gamma = _gamma; 
67           super.setChanged(); 
68           super.notifyObservers(); 
69       } 
70    
71       public double getSigma() { 
72           return sigma; 
73       } 
74    
75       public void setSigma(double _sigma) { 
76           this.sigma = _sigma; 
77           lambda = sigma / 2; 
78           super.setChanged(); 
79           super.notifyObservers(); 
80       } 
81   } 
82