コード例 #1
0
ファイル: anncube.py プロジェクト: j6k4m8/ndstore
  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 )
コード例 #2
0
ファイル: anncube.py プロジェクト: j6k4m8/ndstore
  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)] )
コード例 #3
0
    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)
コード例 #4
0
    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)])