All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TIL_PixelFilterT< SUBCLASS > Class Template Reference

#include <TIL_PixelFilter.h>

+ Inheritance diagram for TIL_PixelFilterT< SUBCLASS >:

Public Types

typedef SUBCLASS SubclassType

Public Member Functions

virtual ~TIL_PixelFilterT ()
virtual void filterPlaneVirtual (const TIL_AdaptiveImage &src, TIL_Raster &dest, int planei, int plane_src_components) const override
- Public Member Functions inherited from TIL_PixelFilter
virtual ~TIL_PixelFilter ()
virtual void combineSample (int ncomponents, exint nexisting_samples, float *existing, exint nnew_samples, const float *new_sample) const
SYS_FORCE_INLINE bool needsSquares () const
SYS_FORCE_INLINE bool needsWeights () const
SYS_FORCE_INLINE bool vetsSamples () const
virtual bool ownedBySingleton () const

Protected Member Functions

 TIL_PixelFilterT (bool needs_squares=false, bool vets_samples=false, bool needs_weights=false)
- Protected Member Functions inherited from TIL_PixelFilter
 TIL_PixelFilter ()
 TIL_PixelFilter (bool needs_squares, bool vets_samples, bool needs_weights)

Detailed Description

template<typename SUBCLASS>
class TIL_PixelFilterT< SUBCLASS >

Pixel filters should inherit from this using the "curiously-recurring template pattern", so that this class can call the templated filterPlane function in the subclass, e.g.: class TIL_MyPixelFilter : public TIL_PixelFilterT<TIL_MyPixelFilter> { template<int NSRCCOMPONENTS,typename T,int NDSTCOMPONENTS,bool INTERLEAVED> void filterPlane( const TIL_AdaptiveImage &src, PXL_RasterWrapper<T,NDSTCOMPONENTS,INTERLEAVED> dest, int planei, int plane_start_src_component) const; }; The primary advantage of this middle class is to unpack how the raster is stored, so that it can be accessed more efficiently in the pixel filter. Of course, this means that filterPlane will get compiled 45 times, for the 5 data types and 9 packing formats, (including the two 2-to-3 formats).

Definition at line 128 of file TIL_PixelFilter.h.

Member Typedef Documentation

template<typename SUBCLASS>
typedef SUBCLASS TIL_PixelFilterT< SUBCLASS >::SubclassType

Definition at line 131 of file TIL_PixelFilter.h.

Constructor & Destructor Documentation

template<typename SUBCLASS>
virtual TIL_PixelFilterT< SUBCLASS >::~TIL_PixelFilterT ( )

Definition at line 133 of file TIL_PixelFilter.h.

template<typename SUBCLASS>
TIL_PixelFilterT< SUBCLASS >::TIL_PixelFilterT ( bool  needs_squares = false,
bool  vets_samples = false,
bool  needs_weights = false 

Definition at line 180 of file TIL_PixelFilter.h.

Member Function Documentation

template<typename SUBCLASS>
virtual void TIL_PixelFilterT< SUBCLASS >::filterPlaneVirtual ( const TIL_AdaptiveImage src,
TIL_Raster dest,
int  planei,
int  plane_src_components 
) const

Implements TIL_PixelFilter.

Definition at line 135 of file TIL_PixelFilter.h.

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