annotate OrthancStone/Sources/OpenGL/OpenGLFramebuffer.h @ 2061:6ea5f40ea0e9 deep-learning

added ImageProcessingProgram
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 03 May 2023 16:34:34 +0200
parents 86e0e92a2e0d
children b6b5e1ca1cc2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2060
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Stone of Orthanc
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 * Copyright (C) 2017-2022 Osimis S.A., Belgium
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 * Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 *
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * This program is free software: you can redistribute it and/or
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * modify it under the terms of the GNU Lesser General Public License
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * as published by the Free Software Foundation, either version 3 of
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 * the License, or (at your option) any later version.
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 *
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful, but
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * Lesser General Public License for more details.
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 *
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * You should have received a copy of the GNU Lesser General Public
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * License along with this program. If not, see
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 * <http://www.gnu.org/licenses/>.
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 **/
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #pragma once
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 #include "OpenGLIncludes.h"
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 #include "IOpenGLContext.h"
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 #include <Images/ImageAccessor.h>
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 namespace OrthancStone
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 {
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 namespace OpenGL
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 {
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 class OpenGLTexture;
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 class OpenGLTextureArray;
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 class OpenGLFramebuffer : public boost::noncopyable
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 {
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 private:
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 IOpenGLContext& context_;
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 GLuint framebuffer_;
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 void SetupTextureTarget();
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 void ReadContent(Orthanc::ImageAccessor& target);
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 public:
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 OpenGLFramebuffer(IOpenGLContext& context);
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 ~OpenGLFramebuffer();
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 void SetTarget(OpenGLTexture& target);
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 void SetTarget(OpenGLTextureArray& target,
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 unsigned int layer);
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 void ReadTexture(Orthanc::ImageAccessor& target,
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 const OpenGLTexture& source);
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 void ReadTexture(Orthanc::ImageAccessor& target,
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 const OpenGLTextureArray& source,
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 unsigned int layer);
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 };
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 }
86e0e92a2e0d added OpenGLTextureArray and OpenGLFramebuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 }