Example #1
0
def cZoomIn(old_data, factor):
    scaling = 2**factor
    new_data = np.zeros([
        old_data.shape[0], old_data.shape[1] * (scaling), old_data.shape[2] *
        (scaling)
    ],
                        dtype=np.uint16)
    ocplib.zoomInData_ctype_OMP(old_data, new_data, int(factor))
    return new_data
Example #2
0
    def zoomData(self, factor):
        """ Cube data zoomed in """

        newdata = np.zeros([
            self.data.shape[0], self.data.shape[1] *
            (2**factor), self.data.shape[2] * (2**factor)
        ],
                           dtype=np.uint32)
        ocplib.zoomInData_ctype_OMP(self.data, newdata, int(factor))
        self.data = newdata
Example #3
0
  def zoomData ( self, factor ):
    """ Cube data zoomed in """

    newdata = np.zeros ( [self.data.shape[0], self.data.shape[1]*(2**factor), self.data.shape[2]*(2**factor)], dtype=np.uint32) 
    test = np.zeros ( [self.data.shape[0], self.data.shape[1]*(2**factor), self.data.shape[2]*(2**factor)], dtype=np.uint32) 
    
    #import pdb; pdb.set_trace()
    import time
    #start = time.time()
    #zoomData_cy ( self.data, test, int(factor) )
    #print "Cython", time.time()-start
    #start = time.time()
    #ocplib.zoomInData_ctype ( self.data, newdata, int(factor) )
    #print "Ctype",time.time()-start
    start = time.time()
    ocplib.zoomInData_ctype_OMP ( self.data, newdata, int(factor) )
    print "OMP",time.time()-start

    self.data = newdata
Example #4
0
def cZoomIn(old_data, factor):
  scaling = 2**factor
  new_data = np.zeros ( [old_data.shape[0], old_data.shape[1]*(scaling), old_data.shape[2]*(scaling)], dtype=np.uint16)
  ocplib.zoomInData_ctype_OMP ( old_data, new_data, int(factor) )
  return new_data 
Example #5
0
  def zoomData ( self, factor ):
    """ Cube data zoomed in """

    newdata = np.zeros ( [self.data.shape[0], self.data.shape[1]*(2**factor), self.data.shape[2]*(2**factor)], dtype=np.uint32) 
    ocplib.zoomInData_ctype_OMP ( self.data, newdata, int(factor) )
    self.data = newdata