class

CrImage::Window(T)

Inherits Reference < Object

Represents a read-only view on top of a Map.

Constructing one of these over a larger Map allows for a re-indexed view within that map. If needing to sum all values within a certain area, a Window can be constructed around that area and then summed from that.

See RepeatView, ErrorView, and BlackView for specific edge handling cases.

Constructors

new(width : Int32, height : Int32, map : CrImage::Map(T), map_x : Int32, map_y : Int32)
Source

Instance methods

[](x : Int32, y : Int32) : T
Source
half_height
Source
half_width
Source
height
Source
map_x
Source
map_y
Source
mean

Calculate the mean for all values in the window

Source
size

Return the size of this window

Source
sum

Sum all values in the window together

Source
sum

Iterate over all values within the window and sum the result of the passed in block

Source
width
Source