コード例 #1
0
ファイル: Hamamatsu.py プロジェクト: Ichinaru/slideSelector
 def GetMap(self, desired_frame_width, desired_frame_height):
     """Arguments:
     frame_width: long with the width in pixel.
     frame_height: long with the height in pixel.
     """
     if os.path.exists(self.filename):
         return HamaWrapper.getMap(self.filename, desired_frame_width, desired_frame_height)
     else:
         print "Error: File not found!"
コード例 #2
0
ファイル: Hamamatsu.py プロジェクト: Ichinaru/slideSelector
 def ShowMap(self, desired_frame_width, desired_frame_height):
     """Arguments:
     frame_width: long with the width in pixel.
     frame_height: long with the height in pixel.
     """
     if os.path.exists(self.filename):
         arr = HamaWrapper.getMap(self.filename, desired_frame_width, desired_frame_height)
         im = Image.frombuffer("RGB", (arr.shape[2], arr.shape[1]), arr.data)
         im.show()
     else:
         print "Error: File not found!"