abstract class CrImage::Window(T)
- CrImage::Window(T)
- Reference
- Object
Overview
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.
Direct Known Subclasses
Defined in:
cr-image/window_view.crConstructors
Instance Method Summary
- #[](x : Int32, y : Int32) : T
- #half_height : Int32
- #half_width : Int32
- #height : Int32
- #map : Map(T)
- #map_x : Int32
- #map_y : Int32
-
#mean : Float64
Calculate the mean for all values in the window
-
#size : Int32
Return the size of this window
-
#sum : Float64
Sum all values in the window together
-
#sum(& : T, Int32, Int32, self -> T) : Float64
Iterate over all values within the window and sum the result of the passed in block
- #width : Int32
Constructor Detail
def self.new(width : Int32, height : Int32, map : CrImage::Map(T), map_x : Int32, map_y : Int32)
#
Instance Method Detail
def sum(& : T, Int32, Int32, self -> T) : Float64
#
Iterate over all values within the window and sum the result of the passed in block