keystoneml.utils

RowColumnMajorByteArrayVectorizedImage

case class RowColumnMajorByteArrayVectorizedImage(vectorizedImage: Array[Byte], metadata: ImageMetadata) extends VectorizedImage with Product with Serializable

Wraps a double array.

vectorizedImage

is indexed as follows: The pixel value for (x, y, channelIdx) is at y + x.metadata.yDim + channelIdx*metadata.yDim*metadata.xDim

metadata

Image metadata.

Linear Supertypes
Serializable, Serializable, Product, Equals, VectorizedImage, Image, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. RowColumnMajorByteArrayVectorizedImage
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. VectorizedImage
  7. Image
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RowColumnMajorByteArrayVectorizedImage(vectorizedImage: Array[Byte], metadata: ImageMetadata)

    vectorizedImage

    is indexed as follows: The pixel value for (x, y, channelIdx) is at y + x.metadata.yDim + channelIdx*metadata.yDim*metadata.xDim

    metadata

    Image metadata.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. lazy val coord: Coordinate

    Attributes
    protected
    Definition Classes
    VectorizedImage
  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(o: Any): Boolean

    An inefficient implementation of equals().

    An inefficient implementation of equals(). Subclasses should override this if they can implement it more cheaply and anyone cares about such things.

    Definition Classes
    Image → AnyRef → Any
  11. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def flatSize: Int

    Definition Classes
    Image
  13. def get(x: Int, y: Int, channelIdx: Int): Double

    Get the pixel value at (x, y, channelIdx).

    Get the pixel value at (x, y, channelIdx). Channels are indexed as follows:

    • If the image is RGB, 0 => blue, 1 => green, 2 => red.
    • If the image is RGB+alpha, 0 => blue, 1=> green, 2 => red, and 3 => alpha.
    • Other channel schemes are unsupported; the only reason this matters is that input converters (e.g. from BufferedImage to Image) need to handle channels consistently.
    Definition Classes
    VectorizedImageImage
  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def getInVector(vectorIdx: Int): Double

  16. def getSingleChannelAsFloatArray(): Array[Float]

    Definition Classes
    Image
  17. def getSingleChannelAsIntArray(): Array[Int]

    Definition Classes
    Image
  18. def imageToVectorCoords(x: Int, y: Int, channelIdx: Int): Int

  19. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  20. def iter(): Iterator[CoordinateValue]

    Returns an iterator of coordinate values based on the "natural" order of a Vectorized image.

    Returns an iterator of coordinate values based on the "natural" order of a Vectorized image. That is, this returns a value of the form (x,y,channel,value) in order.

    This method is optimized to avoid unnecessary memory allocation and designed to approach the performance of an equivalent while loop over the image pixels for speeding up things like Aggregation over an image regardless of underlying image ordering.

    An important restriction is that the reference to the returned CoordinateValue should not be modified or saved by the caller.

    returns

    Definition Classes
    VectorizedImage
  21. val metadata: ImageMetadata

    Image metadata.

    Image metadata.

    Definition Classes
    RowColumnMajorByteArrayVectorizedImageImage
  22. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  25. def put(x: Int, y: Int, channelIdx: Int, newVal: Double): Unit

    Put a pixel value at (x, y, channelIdx).

    Put a pixel value at (x, y, channelIdx).

    Definition Classes
    VectorizedImageImage
  26. def putInVector(vectorIdx: Int, newVal: Double): Nothing

  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  28. def toArray: Array[Double]

    Returns a flat version of the image, represented as a single array.

    Returns a flat version of the image, represented as a single array. It is indexed as follows: The pixel value for (x, y, channelIdx) is at channelIdx + x*numChannels + y*numChannels*xDim.

    This implementation works for arbitrary image formats but it is inefficient.

    Definition Classes
    Image
  29. def vectorToImageCoords(v: Int): Coordinate

  30. val vectorizedImage: Array[Byte]

    is indexed as follows: The pixel value for (x, y, channelIdx) is at y + x.

    is indexed as follows: The pixel value for (x, y, channelIdx) is at y + x.metadata.yDim + channelIdx*metadata.yDim*metadata.xDim

  31. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from VectorizedImage

Inherited from Image

Inherited from AnyRef

Inherited from Any

Ungrouped