TuttleOFX  1
DPXReaderProcess.hpp
Go to the documentation of this file.
00001 #ifndef _TUTTLE_PLUGIN_DPX_READER_PROCESS_HPP_
00002 #define _TUTTLE_PLUGIN_DPX_READER_PROCESS_HPP_
00003 
00004 #include <tuttle/plugin/ImageGilProcessor.hpp>
00005 
00006 #include <ofxsImageEffect.h>
00007 #include <ofxsMultiThread.h>
00008 #include <boost/gil/gil_all.hpp>
00009 #include <boost/scoped_ptr.hpp>
00010 #include <boost/filesystem/fstream.hpp>
00011 
00012 namespace tuttle {
00013 namespace plugin {
00014 namespace dpx {
00015 namespace reader {
00016 
00017 /**
00018  * @brief Base class to read dpx files
00019  */
00020 template<class View>
00021 class DPXReaderProcess : public ImageGilProcessor<View>
00022 {
00023 public:
00024         DPXReaderProcess( DPXReaderPlugin& instance );
00025         ~DPXReaderProcess();
00026 
00027         void setup( const OFX::RenderArguments& args );
00028 
00029         void multiThreadProcessImages( const OfxRectI& procWindowRoW );
00030 
00031         // Read dpx image
00032         View& readImage( View& dst );
00033 
00034 protected:
00035         template<class T, class DST_V>
00036         void bitStreamToView( DST_V& dst, const int nc, const int channelSize );
00037 
00038 protected:
00039         DPXReaderPlugin&    _plugin;        ///< Rendering plugin
00040         DPXReaderProcessParams _params;
00041         
00042         tuttle::io::DpxImage _dpxImage;
00043 
00044 };
00045 
00046 }
00047 }
00048 }
00049 }
00050 
00051 #include "DPXReaderProcess.tcc"
00052 
00053 #endif