DD::Image::Sampler Class Reference

Public Types

enum  EdgeHandling { eEdgeZero, eEdgeClamp, eEdgeFromIop }
 What to do when sampling off the edges of the input.
 

Public Member Functions

 Sampler (Iop *iop, int x, int y, int r, int t, const ChannelSet &channels, class Filter *filter=nullptr, EdgeHandling edges=eEdgeFromIop, InterestRatchet *ir=nullptr, bool loadOndemand=true)
 
 Sampler (Iop *iop, const Box &box, const ChannelSet &channels, class Filter *filter=nullptr, EdgeHandling edges=eEdgeFromIop, InterestRatchet *ir=nullptr, bool loadOnDemand=true)
 
float at (int x, int y, Channel z) const
 
void at (int x, int y, Pixel &out)
 
void sample (float cx, float cy, float W, float H, class Pixel &out)
 
void sample (float cx, float cy, float W, float H, class Filter *filter, class Pixel &out)
 
void sample (const Vector2 &center, const Vector2 &dU, const Vector2 &dV, class Pixel &out)
 
void sample (const Vector2 &center, const Vector2 &dU, const Vector2 &dV, class Filter *filter, class Pixel &out)
 
void sample (SamplePosition &samplePosition, class Pixel &out)
 

Detailed Description

A class for sampling pixels from an image. It works like a Tile, but with sample methods. This is generally more efficient than making many calls to Iop::sample although it may render more than you need from the input if you don't sample all of the requested box.



©2021 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.thefoundry.co.uk