def xyImage ( self ): zdim,ydim,xdim = self.data.shape imagemap = np.zeros ( [ ydim, xdim ], dtype=np.uint32 ) # false color redrawing of the region imagemap = ocplib.recolor_ctype ( self.data.reshape( (imagemap.shape[0], imagemap.shape[1]) ), imagemap ) return Image.frombuffer ( 'RGBA', (xdim,ydim), imagemap, 'raw', 'RGBA', 0, 1 )
def yzImage ( self, scale ): zdim,ydim,xdim = self.data.shape imagemap = np.zeros ( [ zdim, ydim ], dtype=np.uint32 ) # false color redrawing of the region imagemap = ocplib.recolor_ctype ( self.data.reshape( (imagemap.shape[0], imagemap.shape[1]) ), imagemap ) outimage = Image.frombuffer ( 'RGBA', (ydim,zdim), imagemap, 'raw', 'RGBA', 0, 1 ) return outimage.resize ( [ydim, int(zdim*scale)] )
def xyImage(self): zdim, ydim, xdim = self.data.shape imagemap = np.zeros([ydim, xdim], dtype=np.uint32) # false color redrawing of the region imagemap = ocplib.recolor_ctype( self.data.reshape((imagemap.shape[0], imagemap.shape[1])), imagemap) return Image.frombuffer('RGBA', (xdim, ydim), imagemap, 'raw', 'RGBA', 0, 1)
def yzImage(self, scale): zdim, ydim, xdim = self.data.shape imagemap = np.zeros([zdim, ydim], dtype=np.uint32) # false color redrawing of the region imagemap = ocplib.recolor_ctype( self.data.reshape((imagemap.shape[0], imagemap.shape[1])), imagemap) outimage = Image.frombuffer('RGBA', (ydim, zdim), imagemap, 'raw', 'RGBA', 0, 1) return outimage.resize([ydim, int(zdim * scale)])