Esempio n. 1
0
  def preserve ( self, annodata ):
    """Get's a dense voxel region and overwrites all non-zero values"""

    #vector_func = np.vectorize ( lambda a,b: b if b!=0 and a==0 else a ) 
    #test = vector_func ( self.data, annodata )

    # Is the same as above
    self.data = ocplib.exceptionDense_ctype ( self.data, annodata )
Esempio n. 2
0
  def exception ( self, annodata ):
    """Get's a dense voxel region and overwrites all non-zero values"""

    # get all the exceptions not equal and both annotated
    exdata = ((self.data-annodata)*self.data*annodata!=0) * annodata 
    self.data = ocplib.exceptionDense_ctype ( self.data, annodata )

    # return the list of exceptions ids and the exceptions
    return exdata
Esempio n. 3
0
    def exception(self, annodata):
        """Get's a dense voxel region and overwrites all non-zero values"""

        # get all the exceptions not equal and both annotated
        exdata = (
            (self.data - annodata) * self.data * annodata != 0) * annodata
        self.data = ocplib.exceptionDense_ctype(self.data, annodata)

        # return the list of exceptions ids and the exceptions
        return exdata
Esempio n. 4
0
  def exception ( self, annodata ):
    """Get's a dense voxel region and overwrites all non-zero values"""

    # get all the exceptions
    # not equal and both annotated
    exdata = ((self.data-annodata)*self.data*annodata!=0) * annodata 

    # then annotate to preserve 
    #vector_func = np.vectorize ( lambda a,b: b if b!=0 and a==0 else a ) 
    #test = vector_func ( self.data, annodata ) 
    self.data = ocplib.exceptionDense_ctype ( self.data, annodata )

    # return the list of exceptions ids and the exceptions
    return exdata
Esempio n. 5
0
 def preserve(self, annodata):
     """Get's a dense voxel region and overwrites all non-zero values"""
     self.data = ocplib.exceptionDense_ctype(self.data, annodata)
Esempio n. 6
0
 def preserve ( self, annodata ):
   """Get's a dense voxel region and overwrites all non-zero values"""
   self.data = ocplib.exceptionDense_ctype ( self.data, annodata )