H3D API  2.4.1
OpenEXRImageLoader.h
Go to the documentation of this file.
1 // Copyright 2004-2019, SenseGraphics AB
3 //
4 // This file is part of H3D API.
5 //
6 // H3D API is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // H3D API is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with H3D API; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 //
20 // A commercial license is also available. Please contact us at
21 // www.sensegraphics.com for more information.
22 //
23 //
28 //
30 #ifndef __OPENEXRIMAGELOADER_H__
31 #define __OPENEXRIMAGELOADER_H__
32 
33 #include <H3D/H3DImageLoaderNode.h>
34 
35 #ifdef HAVE_OPENEXR
36 
38 
39 namespace H3D {
40 
41  // Note for developers.
42  // This class will cause a minor "memory leak" because it never deinitializes
43  // some statically initialized classes. See
44  // See http://lists.nongnu.org/archive/html/openexr-devel/2013-11/msg00003.html
45  // for more information.
46 
55  class H3DAPI_API OpenEXRImageLoader : public H3DImageLoaderNode {
56  public:
58  OpenEXRImageLoader() {
59  type_name = "OpenEXRImageLoader";
60  }
61 
65  virtual Image *loadImage( const string &url ) {
66  return H3DUtil::loadOpenEXRImage ( url );
67  }
68 
71  static bool supportsFileType( const string &url );
72 
73  static H3DNodeDatabase database;
74 
76  static FileReaderRegistration reader_registration;
77  };
78 }
79 
80 #endif // HAVE_OPENEXR
81 #endif
Header file for H3DImageLoaderNode, the abstract base class for all image loaders nodes for different...
H3DUTIL_API Image * loadOpenEXRImage(const std::string &url)
H3D API namespace.
Definition: Anchor.h:38