Free Electron
ImageOIIO.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __oiio_ImageOIIO_h__
8 #define __oiio_ImageOIIO_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /**************************************************************************//**
16  @brief Image handling using OpenImageIO
17 
18  @ingroup oiio
19 
20  https://sites.google.com/site/openimageio/
21 *//***************************************************************************/
22 class FE_DL_EXPORT ImageOIIO: public ImageCommon
23 {
24  public:
25  ImageOIIO(void);
26 virtual ~ImageOIIO(void);
27 
28  //* As ImageI
29 virtual I32 createSelect(void);
30 virtual I32 loadSelect(String filename);
31 virtual I32 interpretSelect(void* data,U32 size);
32 virtual I32 interpretSelect(String a_source);
33 virtual BWORD save(String filename);
34 virtual void select(I32 id);
35 virtual I32 selected(void) const { return m_selected; }
36 virtual void unload(I32 id);
37 
38 virtual void setFormat(ImageI::Format a_format);
39 virtual ImageI::Format format(void) const;
40 
41 virtual void resize(U32 width,U32 height,U32 depth);
42 virtual void replaceRegion(U32 x,U32 y,U32 z,
43  U32 width,U32 height,U32 depth,void* data);
44 
45 virtual U32 width(void) const;
46 virtual U32 height(void) const;
47 virtual U32 depth(void) const;
48 virtual void* raw(void) const;
49 
50 virtual U32 regionCount(void) const { return 0; }
51 virtual String regionName(U32 a_regionIndex) const { return ""; }
52 virtual Box2i regionBox(String a_regionName) const
53  { return Box2i(Vector2i(0,0),Vector2i(0,0)); }
54 virtual String pickRegion(I32 a_x,I32 a_y) const { return ""; }
55 
56  private:
57  Array<OIIO::ImageBuf*> m_bufferList;
58  I32 m_selected;
59 };
60 
61 } /* namespace ext */
62 } /* namespace fe */
63 
64 #endif /* __oiio_ImageOIIO_h__ */
kernel
Definition: namespace.dox:3
Image handling using OpenImageIO.
Definition: ImageOIIO.h:22
virtual I32 selected(void) const
return the selected image ID
Definition: ImageOIIO.h:35
General functionality for image support.
Definition: ImageCommon.h:20
Automatically reference-counted string container.
Definition: String.h:128
Wrapper for std::vector.
Definition: Array.h:21