Class: NArray

Inherits:
Object
  • Object
show all
Defined in:
lib/rtkit/ruby_extensions.rb

Instance Method Summary collapse

Instance Method Details

#segmented?Boolean

Checks if an image array is segmented. Returns true if it is, and false if not. We define the image to be segmented if it contains at least positive 3 pixel values.

Returns:

  • (Boolean)


147
148
149
# File 'lib/rtkit/ruby_extensions.rb', line 147

def segmented?
  (self.gt 0).where.length > 2 ? true : false
end