PageRenderTime 91ms CodeModel.GetById 3ms app.highlight 79ms RepoModel.GetById 1ms app.codeStats 1ms

/Bindings/Python/OSGSystem/module/generated/Image.pypp.cpp

https://github.com/vossg/OSGAddOnsGV
C++ | 676 lines | 505 code | 154 blank | 17 comment | 16 complexity | fe90b3550dcd05a30a268697b86cd8e8 MD5 | raw file
  1// This file has been generated by Py++.
  2
  3
  4// PyOpenSG is (C) Copyright 2005-2009 by Allen Bierbaum
  5//
  6// This file is part of PyOpenSG.
  7//
  8// PyOpenSG is free software; you can redistribute it and/or modify it under
  9// the terms of the GNU Lesser General Public License as published by the Free
 10// Software Foundation; either version 2 of the License, or (at your option)
 11// any later version.
 12//
 13// PyOpenSG is distributed in the hope that it will be useful, but WITHOUT ANY
 14// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 15// FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
 16// more details.
 17//
 18// You should have received a copy of the GNU Lesser General Public License
 19// along with this program.  If not, see <http://www.gnu.org/licenses/>.
 20
 21#if __GNUC__ >= 4 || __GNUC_MINOR__ >=3
 22#pragma GCC diagnostic warning "-Wold-style-cast"
 23#pragma GCC diagnostic warning "-Wunused-local-typedefs"
 24#pragma GCC diagnostic warning "-Wnon-virtual-dtor"
 25#endif
 26#if WIN32
 27#pragma warning(disable : 4267)
 28#pragma warning(disable : 4344)
 29#endif
 30
 31#include "boost/python.hpp"
 32#include "__call_policies.pypp.hpp"
 33#include "OSGSystem_mainheader.h"
 34#include "OsgPtrHelpers.h"
 35#include "boost/python/suite/indexing/map_indexing_suite.hpp"
 36#include "boost/python/suite/indexing/vector_indexing_suite.hpp"
 37#include "Image.pypp.hpp"
 38
 39using namespace std;
 40namespace bp = boost::python;
 41
 42static boost::python::object write_5b99e6d786e89389727b1b2d409008f3( ::OSG::Image & inst, ::OSG::Char8 const * fileName ){
 43    PyThreadState* _save = PyEval_SaveThread();
 44    bool result = inst.write(fileName);
 45    PyEval_RestoreThread(_save);
 46    return bp::object( result );
 47}
 48
 49namespace
 50{
 51
 52class ImageData : boost::noncopyable
 53{
 54public:
 55   ImageData(const OSG::UInt8* data, const size_t size)
 56      : mData(NULL)
 57      , mSize(size)
 58   {
 59      if ( NULL != data && size > 0 )
 60      {
 61         mData = reinterpret_cast<OSG::UInt8*>(std::malloc(size));
 62         std::memcpy(mData, data, size);
 63      }
 64   }
 65
 66   explicit ImageData(const size_t size)
 67      : mData(NULL)
 68      , mSize(size)
 69   {
 70      if ( size > 0 )
 71      {
 72         mData = reinterpret_cast<OSG::UInt8*>(std::malloc(size));
 73      }
 74   }
 75
 76   ~ImageData()
 77   {
 78      if ( NULL != mData )
 79      {
 80         std::free(mData);
 81         mData = NULL;
 82      }
 83   }
 84
 85   const OSG::UInt8* getData() const
 86   {
 87      return mData;
 88   }
 89
 90   OSG::UInt8* edit()
 91   {
 92      return mData;
 93   }
 94
 95   size_t size() const
 96   {
 97      return mSize;
 98   }
 99
100   const std::string toString() const
101   {
102      return std::string(reinterpret_cast<const char*>(mData), mSize);
103   }
104
105   operator std::string() const
106   {
107      return toString();
108   }
109
110   operator const OSG::UInt8*() const
111   {
112      return getData();
113   }
114
115   bool operator==(const ImageData& other) const
116   {
117      return mData == other.mData;
118   }
119
120private:
121   OSG::UInt8* mData;
122   const size_t mSize;
123
124   ImageData(const ImageData &other);
125   void operator =(const ImageData &other);
126};
127
128typedef boost::shared_ptr<ImageData> ImageDataPtr;
129
130ImageDataPtr wrapGetData(const OSG::Image* image, const OSG::UInt32 mipmapNum,
131                         const OSG::UInt32 frameNum, const OSG::UInt32 sideNum)
132{
133   const bool with_mipmap(mipmapNum == 0);
134   const bool with_frame_num(mipmapNum == 0);
135   const bool with_side_count(mipmapNum == 0);
136   const unsigned long size(image->getSize(with_mipmap, with_frame_num,
137                                           with_side_count));
138   return ImageDataPtr(
139      new ImageData(image->getData(mipmapNum, frameNum, sideNum), size)
140   );
141}
142
143bool wrapSet(OSG::Image& image, const OSG::UInt32 pixelFormat,
144             const OSG::Int32 width, const OSG::Int32 height,
145             const OSG::Int32 depth, const OSG::Int32 mipmapCount,
146             const OSG::Int32 frameCount, const OSG::Time frameDelay,
147             ImageDataPtr data, const OSG::Int32 type, const bool allocMem,
148             const OSG::Int32 sideCount)
149{
150   const OSG::UInt8* data_ptr(NULL);
151   if ( data.get() != NULL )
152   {
153      data_ptr = data->getData();
154   }
155
156   return image.set(pixelFormat, width, height, depth, mipmapCount,
157                    frameCount, frameDelay, data_ptr, type, allocMem,
158                    sideCount);
159}
160
161bool wrapSetData(OSG::Image& image, ImageDataPtr data)
162{
163   if ( data.get() == NULL )
164   {
165      return image.setData();
166   }
167   else
168   {
169      return image.setData(*data);
170   }
171}
172
173bool wrapSetSubData(OSG::Image& image, const OSG::Int32 offX,
174                    const OSG::Int32 offY, const OSG::Int32 offZ,
175                    const OSG::Int32 srcW, const OSG::Int32 srcH,
176                    const OSG::Int32 srcD, ImageDataPtr data)
177{
178   return image.setSubData(offX, offY, offZ, srcW, srcH, srcD, *data);
179}
180
181ImageDataPtr wrapStore(OSG::Image& image, const OSG::Char8* mimeType,
182                       const OSG::Int32 memSize)
183{
184   const unsigned long size(image.getSize());
185   ImageDataPtr data(new ImageData(size));
186   image.store(mimeType, data->edit(), memSize);
187   return data;
188}
189
190}
191
192BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS( Image_createMipmap_overloads, OSG::Image::createMipmap, 0, 2 )
193
194BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS( Image_mirror_overloads, OSG::Image::mirror, 2, 4 )
195
196BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS( Image_scale_overloads, OSG::Image::scale, 1, 4 )
197
198BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS( Image_reformat_overloads, OSG::Image::reformat, 1, 3 )
199
200BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS( Image_subImage_overloads, OSG::Image::subImage, 6, 7 )
201
202BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS( Image_slice_overloads, OSG::Image::slice, 0, 4 )
203
204BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS( Image_scaleNextPower2_overloads, OSG::Image::scaleNextPower2, 0, 1 )
205
206void register_Image_class(){
207
208    { //::OSG::Image
209        typedef bp::class_< OSG::Image, bp::bases< OSG::ImageBase >, OSG::Image::ObjRecPtr, boost::noncopyable > Image_exposer_t;
210        Image_exposer_t Image_exposer = Image_exposer_t( "Image", bp::no_init );
211        bp::scope Image_scope( Image_exposer );
212        { //::OSG::Image::createMipmap
213        
214            typedef bool ( ::OSG::Image::*createMipmap_function_type )( ::OSG::Int32,::OSG::Image * ) ;
215            
216            Image_exposer.def( 
217                "createMipmap"
218                , createMipmap_function_type( &::OSG::Image::createMipmap )
219                , Image_createMipmap_overloads( 
220                        bp::args( "level", "destination" ) ) );
221        
222        }
223        { //::OSG::Image::mirror
224        
225            typedef bool ( ::OSG::Image::*mirror_function_type )( bool,bool,bool,::OSG::Image * ) ;
226            
227            Image_exposer.def( 
228                "mirror"
229                , mirror_function_type( &::OSG::Image::mirror )
230                , Image_mirror_overloads( 
231                        bp::args( "horizontal", "vertical", "flipDepth", "destination" ) ) );
232        
233        }
234        { //::OSG::Image::scale
235        
236            typedef bool ( ::OSG::Image::*scale_function_type )( ::OSG::Int32,::OSG::Int32,::OSG::Int32,::OSG::Image * ) ;
237            
238            Image_exposer.def( 
239                "scale"
240                , scale_function_type( &::OSG::Image::scale )
241                , Image_scale_overloads( 
242                        bp::args( "width", "height", "depth", "destination" ) ) );
243        
244        }
245        { //::OSG::Image::reformat
246        
247            typedef bool ( ::OSG::Image::*reformat_function_type )( ::OSG::Image::PixelFormat const,::OSG::Image *,::OSG::Int32 ) ;
248            
249            Image_exposer.def( 
250                "reformat"
251                , reformat_function_type( &::OSG::Image::reformat )
252                , Image_reformat_overloads( 
253                        bp::args( "pixelFormat", "destination", "iCompressionFlags" ) ) );
254        
255        }
256        { //::OSG::Image::subImage
257        
258            typedef bool ( ::OSG::Image::*subImage_function_type )( ::OSG::Int32,::OSG::Int32,::OSG::Int32,::OSG::Int32,::OSG::Int32,::OSG::Int32,::OSG::Image * ) ;
259            
260            Image_exposer.def( 
261                "subImage"
262                , subImage_function_type( &::OSG::Image::subImage )
263                , Image_subImage_overloads( 
264                        bp::args( "offX", "offY", "offZ", "destW", "destH", "destD", "destination" ) ) );
265        
266        }
267        { //::OSG::Image::slice
268        
269            typedef bool ( ::OSG::Image::*slice_function_type )( ::OSG::Int32,::OSG::Int32,::OSG::Int32,::OSG::Image * ) ;
270            
271            Image_exposer.def( 
272                "slice"
273                , slice_function_type( &::OSG::Image::slice )
274                , Image_slice_overloads( 
275                        bp::args( "offX", "offY", "offZ", "destination" ) ) );
276        
277        }
278        { //::OSG::Image::scaleNextPower2
279        
280            typedef bool ( ::OSG::Image::*scaleNextPower2_function_type )( ::OSG::Image * ) ;
281            
282            Image_exposer.def( 
283                "scaleNextPower2"
284                , scaleNextPower2_function_type( &::OSG::Image::scaleNextPower2 )
285                , Image_scaleNextPower2_overloads( 
286                        bp::args( "destination" ) ) );
287        
288        }
289        bp::enum_< OSG::Image::PixelFormat>("PixelFormat")
290            .value("OSG_INVALID_PF", OSG::Image::OSG_INVALID_PF)
291            .value("OSG_A_PF", OSG::Image::OSG_A_PF)
292            .value("OSG_I_PF", OSG::Image::OSG_I_PF)
293            .value("OSG_L_PF", OSG::Image::OSG_L_PF)
294            .value("OSG_LA_PF", OSG::Image::OSG_LA_PF)
295            .value("OSG_RGB_PF", OSG::Image::OSG_RGB_PF)
296            .value("OSG_RGBA_PF", OSG::Image::OSG_RGBA_PF)
297            .value("OSG_BGR_PF", OSG::Image::OSG_BGR_PF)
298            .value("OSG_BGRA_PF", OSG::Image::OSG_BGRA_PF)
299            .value("OSG_RGB_DXT1", OSG::Image::OSG_RGB_DXT1)
300            .value("OSG_RGBA_DXT1", OSG::Image::OSG_RGBA_DXT1)
301            .value("OSG_RGBA_DXT3", OSG::Image::OSG_RGBA_DXT3)
302            .value("OSG_RGBA_DXT5", OSG::Image::OSG_RGBA_DXT5)
303            .value("OSG_DEPTH_PF", OSG::Image::OSG_DEPTH_PF)
304            .value("OSG_DEPTH_STENCIL_PF", OSG::Image::OSG_DEPTH_STENCIL_PF)
305            .value("OSG_ALPHA_INTEGER_PF", OSG::Image::OSG_ALPHA_INTEGER_PF)
306            .value("OSG_RGB_INTEGER_PF", OSG::Image::OSG_RGB_INTEGER_PF)
307            .value("OSG_RGBA_INTEGER_PF", OSG::Image::OSG_RGBA_INTEGER_PF)
308            .value("OSG_BGR_INTEGER_PF", OSG::Image::OSG_BGR_INTEGER_PF)
309            .value("OSG_BGRA_INTEGER_PF", OSG::Image::OSG_BGRA_INTEGER_PF)
310            .value("OSG_LUMINANCE_INTEGER_PF", OSG::Image::OSG_LUMINANCE_INTEGER_PF)
311            .value("OSG_LUMINANCE_ALPHA_INTEGER_PF", OSG::Image::OSG_LUMINANCE_ALPHA_INTEGER_PF)
312            .export_values()
313            ;
314        bp::enum_< OSG::Image::ResUnit>("ResUnit")
315            .value("OSG_RESUNIT_INVALID", OSG::Image::OSG_RESUNIT_INVALID)
316            .value("OSG_RESUNIT_NONE", OSG::Image::OSG_RESUNIT_NONE)
317            .value("OSG_RESUNIT_INCH", OSG::Image::OSG_RESUNIT_INCH)
318            .export_values()
319            ;
320        bp::enum_< OSG::Image::Type>("Type")
321            .value("OSG_INVALID_IMAGEDATATYPE", OSG::Image::OSG_INVALID_IMAGEDATATYPE)
322            .value("OSG_UINT8_IMAGEDATA", OSG::Image::OSG_UINT8_IMAGEDATA)
323            .value("OSG_UINT16_IMAGEDATA", OSG::Image::OSG_UINT16_IMAGEDATA)
324            .value("OSG_UINT32_IMAGEDATA", OSG::Image::OSG_UINT32_IMAGEDATA)
325            .value("OSG_FLOAT16_IMAGEDATA", OSG::Image::OSG_FLOAT16_IMAGEDATA)
326            .value("OSG_FLOAT32_IMAGEDATA", OSG::Image::OSG_FLOAT32_IMAGEDATA)
327            .value("OSG_INT16_IMAGEDATA", OSG::Image::OSG_INT16_IMAGEDATA)
328            .value("OSG_INT32_IMAGEDATA", OSG::Image::OSG_INT32_IMAGEDATA)
329            .value("OSG_UINT24_8_IMAGEDATA", OSG::Image::OSG_UINT24_8_IMAGEDATA)
330            .export_values()
331            ;
332        { //::OSG::Image::addValue
333        
334            typedef bool ( ::OSG::Image::*addValue_function_type )( ::OSG::Char8 const * ) ;
335            
336            Image_exposer.def( 
337                "addValue"
338                , addValue_function_type( &::OSG::Image::addValue )
339                , ( bp::arg("value") ) );
340        
341        }
342        { //::OSG::Image::attachmentCount
343        
344            typedef ::OSG::UInt32 ( ::OSG::Image::*attachmentCount_function_type )(  ) const;
345            
346            Image_exposer.def( 
347                "attachmentCount"
348                , attachmentCount_function_type( &::OSG::Image::attachmentCount ) );
349        
350        }
351        { //::OSG::Image::calcFrameNum
352        
353            typedef ::OSG::UInt32 ( ::OSG::Image::*calcFrameNum_function_type )( ::OSG::Time,bool ) const;
354            
355            Image_exposer.def( 
356                "calcFrameNum"
357                , calcFrameNum_function_type( &::OSG::Image::calcFrameNum )
358                , ( bp::arg("time"), bp::arg("loop")=(bool)(true) ) );
359        
360        }
361        { //::OSG::Image::calcIsAlphaBinary
362        
363            typedef bool ( ::OSG::Image::*calcIsAlphaBinary_function_type )(  ) ;
364            
365            Image_exposer.def( 
366                "calcIsAlphaBinary"
367                , calcIsAlphaBinary_function_type( &::OSG::Image::calcIsAlphaBinary ) );
368        
369        }
370        { //::OSG::Image::calcMipmapLevelCount
371        
372            typedef ::OSG::UInt32 ( ::OSG::Image::*calcMipmapLevelCount_function_type )(  ) const;
373            
374            Image_exposer.def( 
375                "calcMipmapLevelCount"
376                , calcMipmapLevelCount_function_type( &::OSG::Image::calcMipmapLevelCount ) );
377        
378        }
379        { //::OSG::Image::calcMipmapLevelSize
380        
381            typedef ::OSG::UInt32 ( ::OSG::Image::*calcMipmapLevelSize_function_type )( ::OSG::UInt32,::OSG::UInt32,::OSG::UInt32,::OSG::UInt32 ) const;
382            
383            Image_exposer.def( 
384                "calcMipmapLevelSize"
385                , calcMipmapLevelSize_function_type( &::OSG::Image::calcMipmapLevelSize )
386                , ( bp::arg("mipmapNum"), bp::arg("w"), bp::arg("h"), bp::arg("d") ) );
387        
388        }
389        { //::OSG::Image::calcMipmapLevelSize
390        
391            typedef ::OSG::UInt32 ( ::OSG::Image::*calcMipmapLevelSize_function_type )( ::OSG::UInt32 ) const;
392            
393            Image_exposer.def( 
394                "calcMipmapLevelSize"
395                , calcMipmapLevelSize_function_type( &::OSG::Image::calcMipmapLevelSize )
396                , ( bp::arg("mipmapNum") ) );
397        
398        }
399        { //::OSG::Image::calcMipmapSumSize
400        
401            typedef ::OSG::UInt32 ( ::OSG::Image::*calcMipmapSumSize_function_type )( ::OSG::UInt32,::OSG::UInt32,::OSG::UInt32,::OSG::UInt32 ) const;
402            
403            Image_exposer.def( 
404                "calcMipmapSumSize"
405                , calcMipmapSumSize_function_type( &::OSG::Image::calcMipmapSumSize )
406                , ( bp::arg("mipmapNum"), bp::arg("w"), bp::arg("h"), bp::arg("d") ) );
407        
408        }
409        { //::OSG::Image::calcMipmapSumSize
410        
411            typedef ::OSG::UInt32 ( ::OSG::Image::*calcMipmapSumSize_function_type )( ::OSG::UInt32 ) const;
412            
413            Image_exposer.def( 
414                "calcMipmapSumSize"
415                , calcMipmapSumSize_function_type( &::OSG::Image::calcMipmapSumSize )
416                , ( bp::arg("mipmapNum") ) );
417        
418        }
419        { //::OSG::Image::changed
420        
421            typedef void ( ::OSG::Image::*changed_function_type )( ::OSG::ConstFieldMaskArg,::OSG::UInt32,::OSG::BitVector ) ;
422            
423            Image_exposer.def( 
424                "changed"
425                , changed_function_type( &::OSG::Image::changed )
426                , ( bp::arg("whichField"), bp::arg("origin"), bp::arg("details") ) );
427        
428        }
429        { //::OSG::Image::clear
430        
431            typedef void ( ::OSG::Image::*clear_function_type )( ::OSG::UChar8 ) ;
432            
433            Image_exposer.def( 
434                "clear"
435                , clear_function_type( &::OSG::Image::clear )
436                , ( bp::arg("pixelValue")=(::OSG::UChar8)(0) ) );
437        
438        }
439        { //::OSG::Image::clearData
440        
441            typedef void ( ::OSG::Image::*clearData_function_type )(  ) ;
442            
443            Image_exposer.def( 
444                "clearData"
445                , clearData_function_type( &::OSG::Image::clearData ) );
446        
447        }
448        { //::OSG::Image::clearFloat
449        
450            typedef void ( ::OSG::Image::*clearFloat_function_type )( ::OSG::Real32 ) ;
451            
452            Image_exposer.def( 
453                "clearFloat"
454                , clearFloat_function_type( &::OSG::Image::clearFloat )
455                , ( bp::arg("pixelValue")=0.0 ) );
456        
457        }
458        { //::OSG::Image::convertDataTypeTo
459        
460            typedef bool ( ::OSG::Image::*convertDataTypeTo_function_type )( ::OSG::Int32 ) ;
461            
462            Image_exposer.def( 
463                "convertDataTypeTo"
464                , convertDataTypeTo_function_type( &::OSG::Image::convertDataTypeTo )
465                , ( bp::arg("destDataType")=(::OSG::Int32)(::OSG::Int32(::OSG::Image::OSG_UINT8_IMAGEDATA)) ) );
466        
467        }
468        { //::OSG::Image::dump
469        
470            typedef void ( ::OSG::Image::*dump_function_type )( ::OSG::UInt32,long unsigned int const ) const;
471            
472            Image_exposer.def( 
473                "dump"
474                , dump_function_type( &::OSG::Image::dump )
475                , ( bp::arg("uiIndent")=(::OSG::UInt32)(0), bp::arg("bvFlags")=(long unsigned int const)(0) ) );
476        
477        }
478        { //::OSG::Image::findAttachmentField
479        
480            typedef ::std::string const * ( ::OSG::Image::*findAttachmentField_function_type )( ::std::string const & ) const;
481            
482            Image_exposer.def( 
483                "findAttachmentField"
484                , findAttachmentField_function_type( &::OSG::Image::findAttachmentField )
485                , ( bp::arg("key") )
486                , bp::return_internal_reference< >() );
487        
488        }
489        { //::OSG::Image::flipDepthFrameData
490        
491            typedef bool ( ::OSG::Image::*flipDepthFrameData_function_type )(  ) ;
492            
493            Image_exposer.def( 
494                "flipDepthFrameData"
495                , flipDepthFrameData_function_type( &::OSG::Image::flipDepthFrameData ) );
496        
497        }
498        { //::OSG::Image::getComponents
499        
500            typedef ::OSG::UInt8 ( ::OSG::Image::*getComponents_function_type )(  ) const;
501            
502            Image_exposer.def( 
503                "getComponents"
504                , getComponents_function_type( &::OSG::Image::getComponents ) );
505        
506        }
507        { //::OSG::Image::getHash
508        
509            typedef ::OSG::SizeT ( ::OSG::Image::*getHash_function_type )( bool ) const;
510            
511            Image_exposer.def( 
512                "getHash"
513                , getHash_function_type( &::OSG::Image::getHash )
514                , ( bp::arg("force")=(bool)(false) ) );
515        
516        }
517        { //::OSG::Image::getSize
518        
519            typedef long unsigned int ( ::OSG::Image::*getSize_function_type )( bool,bool,bool ) const;
520            
521            Image_exposer.def( 
522                "getSize"
523                , getSize_function_type( &::OSG::Image::getSize )
524                , ( bp::arg("withMipmap")=(bool)(true), bp::arg("withFrames")=(bool)(true), bp::arg("withSides")=(bool)(true) ) );
525        
526        }
527        { //::OSG::Image::hasAlphaChannel
528        
529            typedef bool ( ::OSG::Image::*hasAlphaChannel_function_type )(  ) ;
530            
531            Image_exposer.def( 
532                "hasAlphaChannel"
533                , hasAlphaChannel_function_type( &::OSG::Image::hasAlphaChannel ) );
534        
535        }
536        { //::OSG::Image::hasAttachment
537        
538            typedef bool ( ::OSG::Image::*hasAttachment_function_type )(  ) const;
539            
540            Image_exposer.def( 
541                "hasAttachment"
542                , hasAttachment_function_type( &::OSG::Image::hasAttachment ) );
543        
544        }
545        { //::OSG::Image::hasColorChannel
546        
547            typedef bool ( ::OSG::Image::*hasColorChannel_function_type )(  ) ;
548            
549            Image_exposer.def( 
550                "hasColorChannel"
551                , hasColorChannel_function_type( &::OSG::Image::hasColorChannel ) );
552        
553        }
554        { //::OSG::Image::hasCompressedData
555        
556            typedef bool ( ::OSG::Image::*hasCompressedData_function_type )(  ) ;
557            
558            Image_exposer.def( 
559                "hasCompressedData"
560                , hasCompressedData_function_type( &::OSG::Image::hasCompressedData ) );
561        
562        }
563        { //::OSG::Image::isAlphaBinary
564        
565            typedef bool ( ::OSG::Image::*isAlphaBinary_function_type )(  ) ;
566            
567            Image_exposer.def( 
568                "isAlphaBinary"
569                , isAlphaBinary_function_type( &::OSG::Image::isAlphaBinary ) );
570        
571        }
572        { //::OSG::Image::isValid
573        
574            typedef bool ( ::OSG::Image::*isValid_function_type )(  ) const;
575            
576            Image_exposer.def( 
577                "isValid"
578                , isValid_function_type( &::OSG::Image::isValid ) );
579        
580        }
581        { //::OSG::Image::read
582        
583            typedef bool ( ::OSG::Image::*read_function_type )( ::OSG::Char8 const * ) ;
584            
585            Image_exposer.def( 
586                "read"
587                , read_function_type( &::OSG::Image::read )
588                , ( bp::arg("fileName") ) );
589        
590        }
591        { //::OSG::Image::removeMipmap
592        
593            typedef bool ( ::OSG::Image::*removeMipmap_function_type )(  ) ;
594            
595            Image_exposer.def( 
596                "removeMipmap"
597                , removeMipmap_function_type( &::OSG::Image::removeMipmap ) );
598        
599        }
600        { //::OSG::Image::set
601        
602            typedef bool ( ::OSG::Image::*set_function_type )( ::OSG::Image * ) ;
603            
604            Image_exposer.def( 
605                "set"
606                , set_function_type( &::OSG::Image::set )
607                , ( bp::arg("image") ) );
608        
609        }
610        { //::OSG::Image::setAttachmentField
611        
612            typedef void ( ::OSG::Image::*setAttachmentField_function_type )( ::std::string const &,::std::string const & ) ;
613            
614            Image_exposer.def( 
615                "setAttachmentField"
616                , setAttachmentField_function_type( &::OSG::Image::setAttachmentField )
617                , ( bp::arg("key"), bp::arg("data") ) );
618        
619        }
620        { //::OSG::Image::swapDataEndian
621        
622            typedef void ( ::OSG::Image::*swapDataEndian_function_type )(  ) ;
623            
624            Image_exposer.def( 
625                "swapDataEndian"
626                , swapDataEndian_function_type( &::OSG::Image::swapDataEndian ) );
627        
628        }
629        { //::OSG::Image::write
630        
631            typedef boost::python::object ( *write_function_type )( ::OSG::Image &,::OSG::Char8 const * );
632            
633            Image_exposer.def( 
634                "write"
635                , write_function_type( &write_5b99e6d786e89389727b1b2d409008f3 )
636                , ( bp::arg("inst"), bp::arg("fileName") ) );
637        
638        }
639        pyopensg::register_transit< OSG::Image >::execute();
640        bp::implicitly_convertible< OSG::Image::ObjRecPtr, OSG::Image* >();
641        bp::implicitly_convertible< OSG::Image::ObjRecPtr, OSG::Image::ObjCPtr >();
642        bp::implicitly_convertible< OSG::Image::ObjRecPtr, OSG::AttachmentContainer* >();
643        bp::implicitly_convertible< OSG::Image::ObjRecPtr, OSG::AttachmentContainer::ObjRecPtr >();
644        bp::implicitly_convertible<OSG::Image::ObjRecPtr, OSG::AttachmentContainer::ObjCPtr>();
645        Image_exposer.def("getData", wrapGetData,
646                  (bp::arg("inst"), bp::arg("mipmapNum") = 0,
647                   bp::arg("frameNum") = 0, bp::arg("sideNum") = 0));
648        Image_exposer.def("set", wrapSet,
649                  (bp::arg("inst"), bp::arg("pixelFormat"),
650                   bp::arg("width"), bp::arg("height") = (OSG::Int32) 1,
651                   bp::arg("depth") = (OSG::Int32) 1,
652                   bp::arg("mipmapCount") = (OSG::Int32) 1,
653                   bp::arg("frameCount") = (OSG::Int32) 1,
654                   bp::arg("frameDelay") = (OSG::Time) 0.0,
655                   bp::arg("data") = ImageDataPtr(),
656                   bp::arg("type") = (OSG::Int32) OSG::Image::OSG_UINT8_IMAGEDATA,
657                   bp::arg("allocMem") = (bool) true,
658                   bp::arg("sidecount") = (OSG::Int32) 1));
659        Image_exposer.def("setData", wrapSetData,
660                  (bp::arg("inst"), bp::arg("data") = ImageDataPtr()));
661        Image_exposer.def("setSubData", wrapSetSubData,
662                  (bp::arg("inst"), bp::arg("offX"), bp::arg("offY"),
663                   bp::arg("offZ"), bp::arg("srcW"), bp::arg("srcH"),
664                   bp::arg("srcD"), bp::arg("data")));
665        Image_exposer.def("store", wrapStore,
666                  (bp::arg("inst"), bp::arg("mimeType"), bp::arg("memSize") = -1));
667        bp::class_<ImageData, ImageDataPtr, boost::noncopyable>("ImageData", bp::no_init)
668                  .def("size", &ImageData::size)
669                  .def("toString", &ImageData::toString)
670                  .def(bp::self == bp::self)
671                  .def(bp::self_ns::str(bp::self))
672                  ;
673              bp::implicitly_convertible<ImageData, const OSG::UInt8*>();
674    }
675
676}