def shaveDense(self, annodata): """Remove the specified voxels from the annotation""" # get all the exceptions that are equal to the annid in both datasets shavedata = ((self.data - annodata) == 0) * annodata # find all shave requests that don't match the dense data exdata = (self.data != annodata) * annodata self.data = ocplib.shaveDense_ctype(self.data, shavedata) return exdata
def shaveDense ( self, annodata ): """Remove the specified voxels from the annotation""" # get all the exceptions that are equal to the annid in both datasets shavedata = ((self.data-annodata)==0) * annodata # find all shave requests that don't match the dense data exdata = (self.data != annodata) * annodata self.data = ocplib.shaveDense_ctype ( self.data, shavedata ) return exdata
def shaveDense ( self, annodata ): """Remove the specified voxels from the annotation""" # get all the exceptions that are equal to the annid in both datasets shavedata = ((self.data-annodata)==0) * annodata # find all shave requests that don't match the dense data exdata = (self.data != annodata) * annodata # then shave #vector_func = np.vectorize ( lambda a,b: 0 if b!=0 else a ) #self.data = vector_func ( self.data, shavedata ) self.data = ocplib.shaveDense_ctype ( self.data, shavedata ) # return the list of exceptions ids and the exceptions return exdata