HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
ImfImageChannel.h
Go to the documentation of this file.
1
//
2
// SPDX-License-Identifier: BSD-3-Clause
3
// Copyright (c) Contributors to the OpenEXR Project.
4
//
5
6
#ifndef INCLUDED_IMF_IMAGE_CHANNEL_H
7
#define INCLUDED_IMF_IMAGE_CHANNEL_H
8
9
//----------------------------------------------------------------------------
10
//
11
// class ImageChannel
12
//
13
// For an explanation of images, levels and channels,
14
// see the comments in header file Image.h.
15
//
16
//----------------------------------------------------------------------------
17
18
#include "
ImfUtilExport.h
"
19
20
#include "
IexBaseExc.h
"
21
#include "
ImfChannelList.h
"
22
#include "
ImfFrameBuffer.h
"
23
#include "
ImfPixelType.h
"
24
#include <
ImathBox.h
>
25
#include <half.h>
26
27
#include <cstring>
28
#include <typeinfo>
29
30
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
31
32
class
ImageLevel
;
33
34
//
35
// Image channels:
36
//
37
// An image channel holds the pixel data for a single channel of one level
38
// of an image. Separate classes for flat and deep channels are derived
39
// from the ImageChannel base class.
40
//
41
42
class
ImageLevel
;
43
44
class
IMFUTIL_EXPORT_TYPE
ImageChannel
45
{
46
public
:
47
//
48
// The OpenEXR pixel type of this channel (HALF, FLOAT or UINT).
49
//
50
51
virtual
PixelType
pixelType ()
const
= 0;
52
53
//
54
// Generate an OpenEXR channel for this image channel.
55
//
56
57
IMFUTIL_EXPORT
58
Channel
channel ()
const
;
59
60
//
61
// Access to x and y sampling rates, "perceptually linear" flag,
62
// and the number of pixels that are stored in this channel.
63
//
64
65
int
xSampling
()
const
{
return
_xSampling; }
66
int
ySampling
()
const
{
return
_ySampling; }
67
bool
pLinear
()
const
{
return
_pLinear; }
68
int
pixelsPerRow
()
const
{
return
_pixelsPerRow; }
69
int
pixelsPerColumn
()
const
{
return
_pixelsPerColumn; }
70
size_t
numPixels
()
const
{
return
_numPixels; }
71
72
//
73
// Access to the image level to which this channel belongs.
74
//
75
76
ImageLevel
&
level
() {
return
_level; }
77
const
ImageLevel
&
level
()
const
{
return
_level; }
78
79
protected
:
80
IMFUTIL_EXPORT
81
ImageChannel
(
82
ImageLevel
&
level
,
int
xSampling,
int
ySampling,
bool
pLinear);
83
84
IMFUTIL_EXPORT
85
virtual
~
ImageChannel
();
86
87
IMFUTIL_EXPORT
88
virtual
void
resize
();
89
90
IMFUTIL_EXPORT
91
void
boundsCheck (
int
x
,
int
y
)
const
;
92
93
private
:
94
ImageChannel
(
const
ImageChannel
&) =
delete
;
95
ImageChannel
&
operator=
(
const
ImageChannel
&) =
delete
;
96
ImageChannel
(
ImageChannel
&&) =
delete
;
97
ImageChannel
&
operator=
(
ImageChannel
&&) =
delete
;
98
99
ImageLevel
& _level;
100
int
_xSampling;
101
int
_ySampling;
102
bool
_pLinear;
103
int
_pixelsPerRow;
104
int
_pixelsPerColumn;
105
size_t
_numPixels;
106
};
107
108
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
109
110
#endif
ImageChannel::level
ImageLevel & level()
Definition:
ImfImageChannel.h:76
ImageChannel::pixelsPerColumn
int pixelsPerColumn() const
Definition:
ImfImageChannel.h:69
ImfPixelType.h
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
Definition:
ImfNamespace.h:83
ImageChannel::pixelsPerRow
int pixelsPerRow() const
Definition:
ImfImageChannel.h:68
ImageChannel::ySampling
int ySampling() const
Definition:
ImfImageChannel.h:66
level
GLint level
Definition:
glcorearb.h:108
y
GLint y
Definition:
glcorearb.h:103
ImageChannel::numPixels
size_t numPixels() const
Definition:
ImfImageChannel.h:70
ImfChannelList.h
PixelType
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER enum IMF_EXPORT_ENUM PixelType
Definition:
ImfPixelType.h:20
ImageChannel::pLinear
bool pLinear() const
Definition:
ImfImageChannel.h:67
IexBaseExc.h
IMFUTIL_EXPORT_TYPE
#define IMFUTIL_EXPORT_TYPE
Definition:
ImfUtilExport.h:54
ImageChannel::level
const ImageLevel & level() const
Definition:
ImfImageChannel.h:77
ImageChannel::xSampling
int xSampling() const
Definition:
ImfImageChannel.h:65
ImfFrameBuffer.h
IMFUTIL_EXPORT
#define IMFUTIL_EXPORT
Definition:
ImfUtilExport.h:51
x
GLint GLenum GLint x
Definition:
glcorearb.h:409
ImfUtilExport.h
ImageLevel
Definition:
ImfImageLevel.h:28
ImageBufAlgo::resize
ImageBuf OIIO_API resize(const ImageBuf &src, string_view filtername="", float filterwidth=0.0f, ROI roi={}, int nthreads=0)
nanovdb::operator=
LeafData & operator=(const LeafData &)=delete
ImageChannel
Definition:
ImfImageChannel.h:44
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
Definition:
ImfNamespace.h:80
ImathBox.h
Channel
Definition:
ImfChannelList.h:27
OpenEXR
ImfImageChannel.h
Generated on Thu Oct 3 2024 02:42:44 for HDK by
1.8.6