Feature #463 » configure_reader.py
1 |
import configparser |
---|---|
2 |
|
3 |
|
4 |
class ConfigureReader(object): |
5 |
def __init__(self): |
6 |
self.config = configparser.ConfigParser() |
7 |
self.config.read('ConfigFile.ini') |
8 |
|
9 |
def getImageWidth(self): |
10 |
return float(self.config['DEFAULT']['ImageWidth']) |
11 |
|
12 |
def getimageHeight(self): |
13 |
return float(self.config['DEFAULT']['ImageHeight']) |
14 |
|
15 |
def getProjectorDistance(self): |
16 |
return float(self.config['DEFAULT']['ProjectorDistance']) |
17 |
|
18 |
def getProjectorImageWidth(self): |
19 |
return self.config['DEFAULT']['ProjectorImageWidth'] |
20 |
|
21 |
def getGamma(self): |
22 |
return float(self.config['DEFAULT']['ImageGamma']) |
23 |
|
24 |
|
25 |
def getImagePath(self): |
26 |
return self.config['DEFAULT']['ImagePath'] |
27 |
|
28 |
def isImageLeft(self. img): |
29 |
if (self.getImagePath == "Left.jpg"): |
30 |
return True |
31 |
else: |
32 |
return False |