H3D API  2.4.1
RawImageLoader.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 //
27 //
29 #ifndef __RAWIMAGELOADER_H__
30 #define __RAWIMAGELOADER_H__
31 
32 #include <H3D/H3DImageLoaderNode.h>
33 #include <H3D/SFInt32.h>
34 #include <H3D/SFString.h>
35 #include <H3D/SFVec3f.h>
36 
37 namespace H3D {
38 
74  class H3DAPI_API RawImageLoader : public H3DImageLoaderNode {
75  public:
77  RawImageLoader( Inst< SFInt32 > _width = 0,
78  Inst< SFInt32 > _height = 0,
79  Inst< SFInt32 > _depth = 0,
80  Inst< SFString > _pixelType = 0,
81  Inst< SFString > _pixelComponentType = 0,
82  Inst< SFInt32 > _bitsPerPixel = 0,
83  Inst< SFVec3f > _pixelSize = 0 );
84 
87  virtual Image *loadImage( const string &url );
88 
93  H3DUniquePtr< SFInt32 > width;
94 
99  H3DUniquePtr< SFInt32 > height;
100 
105  H3DUniquePtr< SFInt32 > depth;
106 
118  H3DUniquePtr< SFString > pixelType;
119 
127  H3DUniquePtr< SFString > pixelComponentType;
128 
133  H3DUniquePtr< SFInt32 > bitsPerPixel;
134 
139  H3DUniquePtr< SFVec3f > pixelSize;
140 
143  };
144 }
145 
146 #endif
Header file for H3DImageLoaderNode, the abstract base class for all image loaders nodes for different...
Contains the SFInt32 field class.
Contains the SFString field class.
Contains the SFVec3f field class.
H3DImageLoaderNode is a virtual base class for classes that read an image file format such as PNG or ...
Definition: H3DImageLoaderNode.h:48
The RawImageLoader loads a raw data file and lets the user specify the parameters for the values dire...
Definition: RawImageLoader.h:74
H3DUniquePtr< SFInt32 > depth
The height of the image in pixels.
Definition: RawImageLoader.h:105
H3DUniquePtr< SFInt32 > height
The height of the image in pixels.
Definition: RawImageLoader.h:99
H3DUniquePtr< SFString > pixelType
The type of each pixel element in the image.
Definition: RawImageLoader.h:118
H3DUniquePtr< SFInt32 > bitsPerPixel
The number of bits per pixel.
Definition: RawImageLoader.h:133
H3DUniquePtr< SFInt32 > width
The width of the image in pixels.
Definition: RawImageLoader.h:93
static H3DNodeDatabase database
The H3DNodeDatabase for this Node.
Definition: RawImageLoader.h:142
H3DUniquePtr< SFString > pixelComponentType
The type of each component of the pixel.
Definition: RawImageLoader.h:127
H3DUniquePtr< SFVec3f > pixelSize
The size of the pixel in metres.
Definition: RawImageLoader.h:139
H3D API namespace.
Definition: Anchor.h:38
The H3DNodeDatabase contains a mapping between a name of a Node and the constructor for the Node with...
Definition: H3DNodeDatabase.h:194