TuttleOFX
1
|
00001 #ifndef _TUTTLE_PLUGIN_JPEG2000_READER_PROCESS_HPP_ 00002 #define _TUTTLE_PLUGIN_JPEG2000_READER_PROCESS_HPP_ 00003 00004 #include <openjpeg/J2KReader.hpp> 00005 00006 #include <tuttle/plugin/ImageGilProcessor.hpp> 00007 #include <tuttle/plugin/exceptions.hpp> 00008 00009 #include <terry/globals.hpp> 00010 00011 #include <ofxsImageEffect.h> 00012 #include <ofxsMultiThread.h> 00013 00014 #include <boost/scoped_ptr.hpp> 00015 00016 00017 namespace tuttle { 00018 namespace plugin { 00019 namespace jpeg2000 { 00020 namespace reader { 00021 00022 /** 00023 * @brief process 00024 * 00025 */ 00026 template<class View> 00027 class Jpeg2000ReaderProcess : public ImageGilProcessor<View> 00028 { 00029 protected : 00030 Jpeg2000ReaderPlugin& _plugin; ///< Rendering plugin 00031 Jpeg2000ReaderProcessParams _params; 00032 00033 public: 00034 Jpeg2000ReaderProcess( Jpeg2000ReaderPlugin& instance ); 00035 ~Jpeg2000ReaderProcess(); 00036 00037 void setup( const OFX::RenderArguments& args ); 00038 00039 // Do some processing 00040 void multiThreadProcessImages( const OfxRectI& procWindowRoW ); 00041 00042 template<class Layout> 00043 void switchLayoutCopy( const View& dstView ); 00044 00045 template<class WorkingPixel> 00046 void switchPrecisionCopy( const View& dstView ); 00047 }; 00048 00049 } 00050 } 00051 } 00052 } 00053 00054 #include "Jpeg2000ReaderProcess.tcc" 00055 00056 #endif