Developer documentation
Version 3.0.3-105-gd3941f44
volume.h
Go to the documentation of this file.
1/* Copyright (c) 2008-2022 the MRtrix3 contributors.
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 *
7 * Covered Software is provided under this License on an "as is"
8 * basis, without warranty of any kind, either expressed, implied, or
9 * statutory, including, without limitation, warranties that the
10 * Covered Software is free of defects, merchantable, fit for a
11 * particular purpose or non-infringing.
12 * See the Mozilla Public License v. 2.0 for more details.
13 *
14 * For more details, see http://www.mrtrix.org/.
15 */
16
17#ifndef __gui_mrview_mode_volume_h__
18#define __gui_mrview_mode_volume_h__
19
20#include "app.h"
23
24namespace MR
25{
26 namespace GUI
27 {
28 namespace MRView
29 {
30 namespace Tool { class View; }
31
32
33
34 namespace Mode
35 {
36
37 class Volume : public Base
38 { MEMALIGN(Volume)
39 public:
40 Volume () :
42 volume_shader (*this) {
43 }
44
45 virtual void paint (Projection& projection);
46 virtual void tilt_event ();
47
48 protected:
53
54 class Shader : public Displayable::Shader { MEMALIGN(Shader)
55 public:
56 Shader (const Volume& mode) : mode (mode), active_clip_planes (0), cliphighlight (true), clipintersectionmode (false) { }
57 virtual std::string vertex_shader_source (const Displayable& object);
58 virtual std::string fragment_shader_source (const Displayable& object);
59 virtual bool need_update (const Displayable& object) const;
60 virtual void update (const Displayable& object);
61 const Volume& mode;
62 size_t active_clip_planes;
63 bool cliphighlight;
64 bool clipintersectionmode;
66
72 };
73
74 }
75 }
76 }
77}
78
79#endif
80
81
82
83
84
vector< std::pair< GL::vec4, bool > > get_active_clip_planes() const
vector< GL::vec4 * > get_clip_planes_to_be_edited() const
GL::VertexArrayObject volume_VAO
Definition: volume.h:50
vector< GL::vec4 > clip
Definition: volume.h:52
bool get_clipintersectionmodestate() const
GL::Texture depth_texture
Definition: volume.h:51
GL::VertexBuffer volume_VI
Definition: volume.h:49
MR::GUI::MRView::Mode::Volume::Shader volume_shader
GL::VertexBuffer volume_VB
Definition: volume.h:49
Tool::View * get_view_tool() const
const int ShaderClipping
Definition: base.h:50
const int TiltRotate
Definition: base.h:45
const int MoveTarget
Definition: base.h:44
const int ShaderThreshold
Definition: base.h:47
const int ShaderTransparency
Definition: base.h:48
const int FocusContrast
Definition: base.h:43
Definition: base.h:24