grk::ResWindow< T > Struct Template Reference

ResWindow. More...

`#include <ResWindow.h>`

## Public Types

typedef grk_buf2d< T, AllocatorAligned > | Buf2dAligned

## Private Member Functions

| ResWindow (uint8_t numresolutions, uint8_t resno, Buf2dAligned *resWindowHighestResREL, ResSimple tileCompAtRes, ResSimple tileCompAtLowerRes, grk_rect32 resWindow, grk_rect32 tileCompWindowUnreduced, grk_rect32 tileCompUnreduced, uint32_t FILTER_WIDTH)
| ~ResWindow ()
void | genSplitWindowBuffers (Buf2dAligned **resWindowBufferSplit, Buf2dAligned *resWindowBuffer, Buf2dAligned *bandWindowsBuffersPaddedXL, Buf2dAligned *bandWindowsBuffersPaddedXH, bool absolute)
bool | alloc (bool clear)
grk_buf2d_simple< int32_t > | getResWindowBufferSimple (void) const
grk_buf2d_simple< float > | getResWindowBufferSimpleF (void) const
void | disableBandWindowAllocation (void)
Buf2dAligned * | getResWindowBufferSplitREL (eSplitOrientation orientation) const
const grk_rect32 * | getBandWindowPadded (eBandOrientation orientation) const
const Buf2dAligned * | getBandWindowBufferPaddedREL (eBandOrientation orientation) const
const grk_buf2d_simple< int32_t > | getBandWindowBufferPaddedSimple (eBandOrientation orientation) const
const grk_buf2d_simple< float > | getBandWindowBufferPaddedSimpleF (eBandOrientation orientation) const
Buf2dAligned * | getResWindowBufferREL (void) const

## Static Private Member Functions

static grk_rect32 | getPaddedBandWindow (uint8_t numDecomps, uint8_t orientation, grk_rect32 unreducedTileCompWindow, grk_rect32 unreducedTileComp, uint32_t padding, grk_rect32 &paddedResWindow)
| Get band window (in tile component coordinates) for specified number of decompositions (with padding)

## Private Attributes

bool | allocated_
uint32_t | filterWidth_
ResSimple | tileCompAtRes_
ResSimple | tileCompAtLowerRes_
Buf2dAligned * | resWindowBuffer_
Buf2dAligned * | resWindowBufferSplit_ [SPLIT_NUM_ORIENTATIONS]
std::vector< Buf2dAligned * > | bandWindowsBuffersPadded_
std::vector< grk_rect32 > | bandWindowsBoundsPadded_
Buf2dAligned * | resWindowBufferHighestResREL_
Buf2dAligned * | resWindowBufferREL_
Buf2dAligned * | resWindowBufferSplitREL_ [SPLIT_NUM_ORIENTATIONS]
std::vector< Buf2dAligned * > | bandWindowsBuffersPaddedREL_

## Friends

struct | TileComponentWindowBase< T >
struct | TileComponentWindow< T >

## Detailed Description

template<typename T>
struct grk::ResWindow< T >

ResWindow.

Manage all buffers for a single DWT resolution. This class stores a buffer for the resolution (in REL coordinates), and also buffers for the 4 sub-bands generated by the DWT transform (in Canvas coordinates).

Note: if highest resolution window is set, then only this window allocates memory, and all other ResWindow buffers attach themselves to the highest resolution buffer

## Member Typedef Documentation

## Buf2dAligned

template<typename T >

typedef grk_buf2d<T, AllocatorAligned> grk::ResWindow< T >::Buf2dAligned

## Constructor & Destructor Documentation

## ResWindow()

template<typename T >

grk::ResWindow< T >::ResWindow | ( | uint8_t | numresolutions,
|  | uint8_t | resno,
|  | Buf2dAligned * | resWindowHighestResREL,
|  | ResSimple | tileCompAtRes,
|  | ResSimple | tileCompAtLowerRes,
|  | grk_rect32 | resWindow,
|  | grk_rect32 | tileCompWindowUnreduced,
|  | grk_rect32 | tileCompUnreduced,
|  | uint32_t | FILTER_WIDTH
| ) |  |

inline private

References grk::BAND_NUM_ORIENTATIONS, grk::BAND_ORIENT_LH, grk::BAND_ORIENT_LL, grk::ResWindow< T >::bandWindowsBoundsPadded_, grk::ResWindow< T >::bandWindowsBuffersPadded_, grk::ResWindow< T >::bandWindowsBuffersPaddedREL_, grk::ResWindow< T >::genSplitWindowBuffers(), grk::ResWindow< T >::getPaddedBandWindow(), grk::grk_read(), grk::ResSimple::numTileBandWindows, grk::ResWindow< T >::resWindowBuffer_, grk::ResWindow< T >::resWindowBufferREL_, grk::ResWindow< T >::resWindowBufferSplit_, grk::ResWindow< T >::resWindowBufferSplitREL_, grk::grk_rect< T >::setOrigin(), grk::grk_rect< T >::setRect(), grk::SPLIT_NUM_ORIENTATIONS, grk::ResSimple::tileBand, grk::ResWindow< T >::tileCompAtLowerRes_, grk::ResWindow< T >::tileCompAtRes_, grk::grk_rect< T >::toAbsolute(), grk::grk_rect< T >::toRelative(), grk::grk_rect< T >::valid(), grk::grk_rect< T >::y0, and grk::grk_rect< T >::y1.

## ~ResWindow()

template<typename T >

grk::ResWindow< T >::~ResWindow | ( |  | ) |

inline private

References grk::ResWindow< T >::bandWindowsBuffersPadded_, grk::ResWindow< T >::bandWindowsBuffersPaddedREL_, grk::grk_read(), grk::ResWindow< T >::resWindowBuffer_, grk::ResWindow< T >::resWindowBufferREL_, grk::ResWindow< T >::resWindowBufferSplit_, grk::ResWindow< T >::resWindowBufferSplitREL_, and grk::SPLIT_NUM_ORIENTATIONS.

## Member Function Documentation

## alloc()

template<typename T >

bool grk::ResWindow< T >::alloc | ( | bool | clear | ) |

inline private

References grk::grk_buf2d< T, A >::alloc2d(), grk::ResWindow< T >::allocated_, grk::grk_buf2d< T, A >::attach(), grk::BAND_ORIENT_HH, grk::BAND_ORIENT_HL, grk::BAND_ORIENT_LH, grk::ResWindow< T >::bandWindowsBuffersPadded_, grk::ResWindow< T >::bandWindowsBuffersPaddedREL_, grk::ResWindow< T >::filterWidth_, grk::grk_read(), grk::grk_rect< T >::height(), grk::ResSimple::numTileBandWindows, grk::ResWindow< T >::resWindowBuffer_, grk::ResWindow< T >::resWindowBufferHighestResREL_, grk::ResWindow< T >::resWindowBufferREL_, grk::ResWindow< T >::resWindowBufferSplit_, grk::ResWindow< T >::resWindowBufferSplitREL_, grk::SPLIT_H, grk::SPLIT_L, grk::SPLIT_NUM_ORIENTATIONS, grk::ResWindow< T >::tileCompAtLowerRes_, and grk::grk_rect< T >::width().

## disableBandWindowAllocation()

template<typename T >

void grk::ResWindow< T >::disableBandWindowAllocation | ( | void |  | ) |

inline private

References grk::ResWindow< T >::resWindowBufferHighestResREL_, and grk::ResWindow< T >::resWindowBufferREL_.

## genSplitWindowBuffers()

template<typename T >

void grk::ResWindow< T >::genSplitWindowBuffers | ( | Buf2dAligned ** | resWindowBufferSplit,
|  | Buf2dAligned * | resWindowBuffer,
|  | Buf2dAligned * | bandWindowsBuffersPaddedXL,
|  | Buf2dAligned * | bandWindowsBuffersPaddedXH,
|  | bool | absolute
| ) |  |

inline private

References grk::grk_read(), grk::SPLIT_H, grk::SPLIT_L, grk::ResWindow< T >::tileCompAtLowerRes_, grk::grk_rect< T >::toAbsolute(), grk::grk_rect< T >::toRelative(), and grk::grk_rect< T >::y1.

Referenced by grk::ResWindow< T >::ResWindow().

## getBandWindowBufferPaddedREL()

template<typename T >

const Buf2dAligned * grk::ResWindow< T >::getBandWindowBufferPaddedREL | ( | eBandOrientation | orientation | ) | const

inline private

References grk::ResWindow< T >::bandWindowsBuffersPaddedREL_.

## getBandWindowBufferPaddedSimple()

template<typename T >

const grk_buf2d_simple< int32_t > grk::ResWindow< T >::getBandWindowBufferPaddedSimple | ( | eBandOrientation | orientation | ) | const

inline private

References grk::ResWindow< T >::bandWindowsBuffersPadded_.

## getBandWindowBufferPaddedSimpleF()

template<typename T >

const grk_buf2d_simple< float > grk::ResWindow< T >::getBandWindowBufferPaddedSimpleF | ( | eBandOrientation | orientation | ) | const

inline private

References grk::ResWindow< T >::bandWindowsBuffersPadded_.

## getBandWindowPadded()

template<typename T >

const grk_rect32 * grk::ResWindow< T >::getBandWindowPadded | ( | eBandOrientation | orientation | ) | const

inline private

References grk::ResWindow< T >::bandWindowsBoundsPadded_.

## getPaddedBandWindow()

template<typename T >

static grk_rect32 grk::ResWindow< T >::getPaddedBandWindow | ( | uint8_t | numDecomps,
|  | uint8_t | orientation,
|  | grk_rect32 | unreducedTileCompWindow,
|  | grk_rect32 | unreducedTileComp,
|  | uint32_t | padding,
|  | grk_rect32 & | paddedResWindow
| ) |  |

inline static private

Get band window (in tile component coordinates) for specified number of decompositions (with padding)

Note: if numDecomps is zero, then the band window (and there is only one) is equal to the unreduced tile component window (with padding)

References grk::BAND_NUM_ORIENTATIONS, grk::ResSimple::getBandWindow(), and grk::grk_read().

Referenced by grk::ResWindow< T >::ResWindow().

## getResWindowBufferREL()

template<typename T >

Buf2dAligned * grk::ResWindow< T >::getResWindowBufferREL | ( | void |  | ) | const

inline private

References grk::ResWindow< T >::resWindowBufferREL_.

## getResWindowBufferSimple()

template<typename T >

grk_buf2d_simple< int32_t > grk::ResWindow< T >::getResWindowBufferSimple | ( | void |  | ) | const

inline private

References grk::ResWindow< T >::resWindowBuffer_, and grk::grk_buf2d< T, A >::simple().

## getResWindowBufferSimpleF()

template<typename T >

grk_buf2d_simple< float > grk::ResWindow< T >::getResWindowBufferSimpleF | ( | void |  | ) | const

inline private

References grk::ResWindow< T >::resWindowBuffer_, and grk::grk_buf2d< T, A >::simpleF().

## getResWindowBufferSplitREL()

template<typename T >

Buf2dAligned * grk::ResWindow< T >::getResWindowBufferSplitREL | ( | eSplitOrientation | orientation | ) | const

inline private

References grk::ResWindow< T >::resWindowBufferSplitREL_.

## Friends And Related Symbol Documentation

## TileComponentWindow< T >

template<typename T >

friend struct TileComponentWindow< T >

friend

## TileComponentWindowBase< T >

template<typename T >

friend struct TileComponentWindowBase< T >

friend

## Member Data Documentation

## allocated_

template<typename T >

bool grk::ResWindow< T >::allocated_

private

Referenced by grk::ResWindow< T >::alloc().

## bandWindowsBoundsPadded_

template<typename T >

std::vector<grk_rect32> grk::ResWindow< T >::bandWindowsBoundsPadded_

private

Referenced by grk::ResWindow< T >::getBandWindowPadded(), and grk::ResWindow< T >::ResWindow().

## bandWindowsBuffersPadded_

template<typename T >

std::vector<Buf2dAligned*> grk::ResWindow< T >::bandWindowsBuffersPadded_

private

Referenced by grk::ResWindow< T >::alloc(), grk::ResWindow< T >::getBandWindowBufferPaddedSimple(), grk::ResWindow< T >::getBandWindowBufferPaddedSimpleF(), grk::ResWindow< T >::ResWindow(), and grk::ResWindow< T >::~ResWindow().

## bandWindowsBuffersPaddedREL_

template<typename T >

std::vector<Buf2dAligned*> grk::ResWindow< T >::bandWindowsBuffersPaddedREL_

private

Referenced by grk::ResWindow< T >::alloc(), grk::ResWindow< T >::getBandWindowBufferPaddedREL(), grk::ResWindow< T >::ResWindow(), and grk::ResWindow< T >::~ResWindow().

## filterWidth_

template<typename T >

uint32_t grk::ResWindow< T >::filterWidth_

private

Referenced by grk::ResWindow< T >::alloc().

## resWindowBuffer_

template<typename T >

Buf2dAligned* grk::ResWindow< T >::resWindowBuffer_

private

Referenced by grk::ResWindow< T >::alloc(), grk::ResWindow< T >::getResWindowBufferSimple(), grk::ResWindow< T >::getResWindowBufferSimpleF(), grk::ResWindow< T >::ResWindow(), and grk::ResWindow< T >::~ResWindow().

## resWindowBufferHighestResREL_

template<typename T >

Buf2dAligned* grk::ResWindow< T >::resWindowBufferHighestResREL_

private

Referenced by grk::ResWindow< T >::alloc(), and grk::ResWindow< T >::disableBandWindowAllocation().

## resWindowBufferREL_

template<typename T >

Buf2dAligned* grk::ResWindow< T >::resWindowBufferREL_

private

Referenced by grk::ResWindow< T >::alloc(), grk::ResWindow< T >::disableBandWindowAllocation(), grk::ResWindow< T >::getResWindowBufferREL(), grk::ResWindow< T >::ResWindow(), and grk::ResWindow< T >::~ResWindow().

## resWindowBufferSplit_

template<typename T >

Buf2dAligned* grk::ResWindow< T >::resWindowBufferSplit_[SPLIT_NUM_ORIENTATIONS]

private

Referenced by grk::ResWindow< T >::alloc(), grk::ResWindow< T >::ResWindow(), and grk::ResWindow< T >::~ResWindow().

## resWindowBufferSplitREL_

template<typename T >

Buf2dAligned* grk::ResWindow< T >::resWindowBufferSplitREL_[SPLIT_NUM_ORIENTATIONS]

private

Referenced by grk::ResWindow< T >::alloc(), grk::ResWindow< T >::getResWindowBufferSplitREL(), grk::ResWindow< T >::ResWindow(), and grk::ResWindow< T >::~ResWindow().

## tileCompAtLowerRes_

template<typename T >

ResSimple grk::ResWindow< T >::tileCompAtLowerRes_

private

Referenced by grk::ResWindow< T >::alloc(), grk::ResWindow< T >::genSplitWindowBuffers(), and grk::ResWindow< T >::ResWindow().

## tileCompAtRes_

template<typename T >

ResSimple grk::ResWindow< T >::tileCompAtRes_

private

Referenced by grk::ResWindow< T >::ResWindow().

The documentation for this struct was generated from the following file:

- ResWindow.h