Esempio n. 1
0
    def downScale(self, factor):
        """ Cube data zoomed out """

        newdata = np.zeros([
            self.data.shape[0], self.data.shape[1] /
            (2**factor), self.data.shape[2] / (2**factor)
        ],
                           dtype=np.uint32)
        ocplib.zoomOutData_ctype(self.data, newdata, int(factor))
        self.data = newdata
Esempio n. 2
0
  def downScale ( self, factor ):
    """ Cube data zoomed out """

    #KLTODO write an optimize version in cython

    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 time
    start = time.time()
    ocplib.zoomOutData_ctype ( self.data, newdata, int(factor) )
    print "Ctype", time.time()-start

    #start = time.time()
    #ocplib.zoomOutData_ctype_OMP ( self.data, test, int(factor) )
    #print "OMP", time.time()-start
    
    self.data = newdata
Esempio n. 3
0
  def downScale ( self, factor ):
    """ Cube data zoomed out """

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