• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • graphics API Reference
  • KDE Home
  • Contact Us
 

digikam

Public Member Functions | Protected Attributes | List of all members
dng_filter_task Class Referenceabstract

#include <dng_filter_task.h>

Inheritance diagram for dng_filter_task:
Inheritance graph
[legend]

Public Member Functions

 dng_filter_task (const dng_image &srcImage, dng_image &dstImage)
 
virtual ~dng_filter_task ()
 
virtual void Process (uint32 threadIndex, const dng_rect &area, dng_abort_sniffer *sniffer)
 
virtual void ProcessArea (uint32 threadIndex, dng_pixel_buffer &srcBuffer, dng_pixel_buffer &dstBuffer)=0
 
virtual dng_rect SrcArea (const dng_rect &dstArea)
 
virtual dng_point SrcTileSize (const dng_point &dstTileSize)
 
virtual void Start (uint32 threadCount, const dng_point &tileSize, dng_memory_allocator *allocator, dng_abort_sniffer *sniffer)
 
- Public Member Functions inherited from dng_area_task
 dng_area_task ()
 
virtual ~dng_area_task ()
 
dng_point FindTileSize (const dng_rect &area) const
 
virtual void Finish (uint32 threadCount)
 
virtual uint32 MaxThreads () const
 
virtual dng_point MaxTileSize () const
 
virtual uint32 MinTaskArea () const
 
void ProcessOnThread (uint32 threadIndex, const dng_rect &area, const dng_point &tileSize, dng_abort_sniffer *sniffer)
 
virtual dng_rect RepeatingTile1 () const
 
virtual dng_rect RepeatingTile2 () const
 
virtual dng_rect RepeatingTile3 () const
 
virtual dng_point UnitCell () const
 

Protected Attributes

AutoPtr< dng_memory_block > fDstBuffer [kMaxMPThreads]
 
dng_image & fDstImage
 
uint32 fDstPixelType
 
uint32 fDstPlane
 
uint32 fDstPlanes
 
AutoPtr< dng_memory_block > fSrcBuffer [kMaxMPThreads]
 
const dng_image & fSrcImage
 
uint32 fSrcPixelType
 
uint32 fSrcPlane
 
uint32 fSrcPlanes
 
dng_point fSrcRepeat
 
- Protected Attributes inherited from dng_area_task
uint32 fMaxThreads
 
dng_point fMaxTileSize
 
uint32 fMinTaskArea
 
dng_point fUnitCell
 

Additional Inherited Members

- Static Public Member Functions inherited from dng_area_task
static void Perform (dng_area_task &task, const dng_rect &area, dng_memory_allocator *allocator, dng_abort_sniffer *sniffer)
 

Detailed Description

Represents a task which filters an area of a source dng_image to an area of a destination dng_image.

Definition at line 35 of file dng_filter_task.h.

Constructor & Destructor Documentation

dng_filter_task::dng_filter_task ( const dng_image &  srcImage,
dng_image &  dstImage 
)

Construct a filter task given a source and destination images.

Parameters
srcImageImage from which source pixels are read.
dstImageImage to which result pixels are written.

Definition at line 27 of file dng_filter_task.cpp.

dng_filter_task::~dng_filter_task ( )
virtual

Definition at line 49 of file dng_filter_task.cpp.

Member Function Documentation

void dng_filter_task::Process ( uint32  threadIndex,
const dng_rect &  area,
dng_abort_sniffer *  sniffer 
)
virtual

Process one tile or partitioned area.

Should not be overridden. Instead, override ProcessArea, which is where to implement filter processing for a specific type of dng_filter_task. There is no allocator parameter as all allocation should be done in Start.

Parameters
threadIndex0 to threadCount - 1 index indicating which thread this is. (Can be used to get a thread-specific buffer allocated in the Start method.)
areaSize of tiles to be used for sizing buffers, etc. (Edges of processing can be smaller.)
snifferdng_abort_sniffer to use to check for user cancellation and progress updates.

Implements dng_area_task.

Definition at line 99 of file dng_filter_task.cpp.

virtual void dng_filter_task::ProcessArea ( uint32  threadIndex,
dng_pixel_buffer &  srcBuffer,
dng_pixel_buffer &  dstBuffer 
)
pure virtual

Implements filtering operation from one buffer to another.

Source and destination pixels are set up in member fields of this class. Ideally, no allocation should be done in this routine.

Parameters
threadIndexThe thread on which this routine is being called, between 0 and threadCount - 1 for the threadCount passed to Start method.
srcBufferInput area and source pixels.
dstBufferOutput area and destination pixels.
virtual dng_rect dng_filter_task::SrcArea ( const dng_rect &  dstArea)
inlinevirtual

Compute the source area needed for a given destination area.

Default implementation assumes destination area is equal to source area for all cases.

Parameters
dstAreaArea to for which pixels will be computed.
Return values
Thesource area needed as input to calculate the requested destination area.

Definition at line 73 of file dng_filter_task.h.

virtual dng_point dng_filter_task::SrcTileSize ( const dng_point &  dstTileSize)
inlinevirtual

Given a destination tile size, calculate input tile size.

Simlar to SrcArea, and should seldom be overridden.

Parameters
dstTileSizeThe destination tile size that is targeted for output.
Return values
Thesource tile size needed to compute a tile of the destination size.

Definition at line 83 of file dng_filter_task.h.

void dng_filter_task::Start ( uint32  threadCount,
const dng_point &  tileSize,
dng_memory_allocator *  allocator,
dng_abort_sniffer *  sniffer 
)
virtual

Called prior to processing on specific threads.

Can be used to allocate per-thread memory buffers, etc.

Parameters
threadCountTotal number of threads that will be used for processing. Less than or equal to MaxThreads of dng_area_task.
tileSizeSize of source tiles which will be processed. (Not all tiles will be this size due to edge conditions.)
allocatordng_memory_allocator to use for allocating temporary buffers, etc.
snifferSniffer to test for user cancellation and to set up progress.

Reimplemented from dng_area_task.

Definition at line 56 of file dng_filter_task.cpp.

Member Data Documentation

AutoPtr<dng_memory_block> dng_filter_task::fDstBuffer[kMaxMPThreads]
protected

Definition at line 55 of file dng_filter_task.h.

dng_image& dng_filter_task::fDstImage
protected

Definition at line 42 of file dng_filter_task.h.

uint32 dng_filter_task::fDstPixelType
protected

Definition at line 50 of file dng_filter_task.h.

uint32 dng_filter_task::fDstPlane
protected

Definition at line 48 of file dng_filter_task.h.

uint32 dng_filter_task::fDstPlanes
protected

Definition at line 49 of file dng_filter_task.h.

AutoPtr<dng_memory_block> dng_filter_task::fSrcBuffer[kMaxMPThreads]
protected

Definition at line 54 of file dng_filter_task.h.

const dng_image& dng_filter_task::fSrcImage
protected

Definition at line 40 of file dng_filter_task.h.

uint32 dng_filter_task::fSrcPixelType
protected

Definition at line 46 of file dng_filter_task.h.

uint32 dng_filter_task::fSrcPlane
protected

Definition at line 44 of file dng_filter_task.h.

uint32 dng_filter_task::fSrcPlanes
protected

Definition at line 45 of file dng_filter_task.h.

dng_point dng_filter_task::fSrcRepeat
protected

Definition at line 52 of file dng_filter_task.h.


The documentation for this class was generated from the following files:
  • dng_filter_task.h
  • dng_filter_task.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Sun Dec 8 2019 04:09:29 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

digikam

Skip menu "digikam"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages
-->

graphics API Reference

Skip menu "graphics API Reference"
  • digikam
  • KDiagram
  •     KChart
  •     KGantt
  • KPhotoAlbum
  •   AndroidRemoteControl
  • Krita
  •   libs
  •     KritaBasicFlakes
  •     brush
  •     KritaUndo2
  •     KritaFlake
  •     image
  •     KritaPlugin
  •     Krita
  •     KritaOdf
  •     KritaPigment
  •     KritaStore
  •     ui
  •     KritaWidgets
  •     KritaWidgetUtils
  •   plugins
  •     Assitants
  •     Extensions
  •     Filters
  •         KritaText
  •         KritaTextLayout
  •     Generators
  •     Formats
  •             src
  •     PaintOps
  •       libpaintop
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal