Skip to content

Commit

Permalink
Removing InverseIndexedArrayVectorizedImage.
Browse files Browse the repository at this point in the history
  • Loading branch information
etrain committed May 4, 2015
1 parent 99768d6 commit 54c818a
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/main/scala/utils/Image.scala
Original file line number Diff line number Diff line change
Expand Up @@ -162,24 +162,6 @@ case class ArrayVectorizedImage(
override def toArray = vectorizedImage
}

/**
* @vectorizedImage is indexed as follows: The pixel value for
* (x, y, channelIdx) is at x + y*xDim + channelIdx*xDim*yDim.
*/
case class InverseIndexedArrayVectorizedImage(
vectorizedImage: Array[Double],
override val metadata: ImageMetadata) extends VectorizedImage {
override def imageToVectorCoords(x: Int, y: Int, channelIdx: Int): Int = {
x + y*metadata.xDim + channelIdx*metadata.xDim*metadata.yDim
}

override def getInVector(vectorIdx: Int) = vectorizedImage(vectorIdx)

override def putInVector(vectorIdx: Int, newVal: Double) = {
vectorizedImage(vectorIdx) = newVal
}
}

/**
* Wraps a byte array, where a byte is a color channel value. This is the
* format generated by Java's JPEG parser.
Expand Down

0 comments on commit 54c818a

Please sign in to comment.