Nuke binary plugins 15.0.5
 
Loading...
Searching...
No Matches
DD::Image::DeepPixel Class Reference

#include <DeepPixel.h>

Inheritance diagram for DD::Image::DeepPixel:
DD::Image::DeepOutputPixel

Public Types

enum  Ordering { eUnordered , eZAscending , eZDescending }
 

Public Member Functions

 DeepPixel (const DD::Image::ChannelMap &channels, const float *pixels, size_t dataCount, Ordering ordering)
 
const ChannelMapchannels () const
 
size_t getSampleCount () const
 
const float * data () const
 
size_t getDataCount () const
 
const float * getUnorderedSample (size_t sampNo) const
 
const float & getUnorderedSample (size_t sampNo, DD::Image::Channel channel) const
 
const float & getOrderedSample (size_t depthIdx, DD::Image::Channel channel) const
 

Static Public Member Functions

static Ordering SwapOrdering (Ordering ordering)
 

Protected Member Functions

void makeSampleOrder () const
 

Protected Attributes

const DD::Image::ChannelMap_channels
 
const float * _data
 
size_t _dataCount
 
size_t _chanCount
 
size_t _sampleCount
 
Ordering _ordering
 
std::vector< size_t > _sampleOrder
 
bool _doneSampleOrder
 

Friends

class DeepPlane
 

Detailed Description

DeepPixel is a helper class for accessing DeepPlanes. It represents all the data at a particular x/y position in a DeepPlane. It does not contain its own copy of the data, and remains valid for only as long as the DeepPlane it is associated with exists.

Member Enumeration Documentation

◆ Ordering

which ordering the pixel data is in.

Enumerator
eZAscending 

unordered - the samples are in no particular depth order

eZDescending 

z ascending - the samples with lowest Z are first

Constructor & Destructor Documentation

◆ DeepPixel()

DD::Image::DeepPixel::DeepPixel ( const DD::Image::ChannelMap channels,
const float *  pixels,
size_t  dataCount,
Ordering  ordering 
)
inline

Constructor. Usually not accessed directly, invoked by DeepPlane::getPixel

Member Function Documentation

◆ SwapOrdering()

static Ordering DD::Image::DeepPixel::SwapOrdering ( Ordering  ordering)
inlinestatic

Swap the pixel ordering to the other way around. Unordered remains unordered, but Z-ascending and Z-descending swap.

◆ makeSampleOrder()

void DD::Image::DeepPixel::makeSampleOrder ( ) const
protected

◆ channels()

const ChannelMap & DD::Image::DeepPixel::channels ( ) const
inline

◆ getSampleCount()

size_t DD::Image::DeepPixel::getSampleCount ( ) const
inline

◆ data()

const float * DD::Image::DeepPixel::data ( ) const
inline

Get the pointer to the data

Referenced by DD::Image::DeepOutputPlane::addPixel().

◆ getDataCount()

size_t DD::Image::DeepPixel::getDataCount ( ) const
inline

Get the total number of data elements

Referenced by DD::Image::DeepOutputPlane::addPixel().

◆ getUnorderedSample() [1/2]

const float * DD::Image::DeepPixel::getUnorderedSample ( size_t  sampNo) const
inline

Get a pointer to the pixel data for a particular sample number. Data will be the channels present in channels(), ordered by numeric channel id. Samples are in whatever order they happen to be in the pixel.

Referenced by DD::Image::DeepLightSample::DeepLightSample(), and DD::Image::DeepSample::DeepSample().

◆ getUnorderedSample() [2/2]

const float & DD::Image::DeepPixel::getUnorderedSample ( size_t  sampNo,
DD::Image::Channel  channel 
) const
inline

Get a particular sample and channel. Samples are in whatever order they happen to be in the pixel.

◆ getOrderedSample()

const float & DD::Image::DeepPixel::getOrderedSample ( size_t  depthIdx,
DD::Image::Channel  channel 
) const

Get a particle sample (by depth) and channel. Samples will be ordered in descending order.

Referenced by DD::Image::DeepLightSample::DeepLightSample(), DD::Image::DeepSample::DeepSample(), and DD::Image::DeepOutputPixel::getWritableOrderedSample().

Member Data Documentation

◆ _channels

const DD::Image::ChannelMap& DD::Image::DeepPixel::_channels
protected

The channels that this DeepPixel is for.

Referenced by makeSampleOrder().

◆ _data

const float* DD::Image::DeepPixel::_data
protected

The raw data for the DeepPixel

Referenced by makeSampleOrder().

◆ _dataCount

size_t DD::Image::DeepPixel::_dataCount
protected

the amount of floats pointed to by _data for this pixel

◆ _chanCount

size_t DD::Image::DeepPixel::_chanCount
protected

the number of channels present in _channels.

Referenced by makeSampleOrder().

◆ _sampleCount

size_t DD::Image::DeepPixel::_sampleCount
protected

The number of samples (equivalent to _dataCount / _chanCount)

◆ _ordering

Ordering DD::Image::DeepPixel::_ordering
protected

The order in which the samples are stored (unordered, z-ascending, z-descending)

◆ _sampleOrder

std::vector<size_t> DD::Image::DeepPixel::_sampleOrder
mutableprotected

An index for accessing the samples in z-order

Referenced by makeSampleOrder().

◆ _doneSampleOrder

bool DD::Image::DeepPixel::_doneSampleOrder
mutableprotected

Whether or not the _sampleOrder index has been built

Referenced by makeSampleOrder().



©2024 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.foundry.com