TuttleOFX  1
Jpeg2000WriterProcess.hpp
Go to the documentation of this file.
00001 #ifndef _TUTTLE_PLUGIN_JPEG2000_WRITER_PROCESS_HPP_
00002 #define _TUTTLE_PLUGIN_JPEG2000_WRITER_PROCESS_HPP_
00003 
00004 #include <openjpeg/J2KWriter.hpp>
00005 
00006 #include "Jpeg2000WriterPlugin.hpp"
00007 #include "Jpeg2000WriterProcess.hpp"
00008 
00009 #include <tuttle/plugin/ImageGilFilterProcessor.hpp>
00010 #include <tuttle/plugin/exceptions.hpp>
00011 
00012 #include <terry/globals.hpp>
00013 
00014 #include <ofxsImageEffect.h>
00015 #include <ofxsMultiThread.h>
00016 
00017 #include <boost/filesystem.hpp>
00018 #include <boost/scoped_ptr.hpp>
00019 
00020 
00021 namespace tuttle {
00022 namespace plugin {
00023 namespace jpeg2000 {
00024 namespace writer {
00025 
00026 /**
00027  * @brief process
00028  *
00029  */
00030 template<class View>
00031 class Jpeg2000WriterProcess : public ImageGilFilterProcessor<View>
00032 {
00033 public:
00034         Jpeg2000WriterProcess( Jpeg2000WriterPlugin& instance );
00035         ~Jpeg2000WriterProcess();
00036 
00037         void setup( const OFX::RenderArguments& args );
00038 
00039         void multiThreadProcessImages( const OfxRectI& procWindowRoW );
00040 
00041 private:
00042         template< typename SImg >
00043         void writeImage( const View& srcView, const int& bitDepth );
00044         
00045 protected :
00046         Jpeg2000WriterPlugin&  _plugin;         ///< Rendering plugin
00047         Jpeg2000ProcessParams  _params;
00048         tuttle::io::J2KWriter  _writer;         ///< Writer engine
00049 
00050 };
00051 
00052 }
00053 }
00054 }
00055 }
00056 
00057 #include "Jpeg2000WriterProcess.tcc"
00058 
00059 #endif