CTK 0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
ctkVTKSliceView.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Library: CTK
4
5 Copyright (c) Kitware Inc.
6
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0.txt
12
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18
19=========================================================================*/
20
21#ifndef __ctkVTKSliceView_h
22#define __ctkVTKSliceView_h
23
24// CTK includes
25#include "ctkVTKAbstractView.h"
26#include "vtkVersion.h"
28class ctkVTKSliceViewPrivate;
29
30class vtkCamera;
31class vtkImageData;
32class vtkRenderer;
33class vtkAlgorithmOutput;
34
38class CTK_VISUALIZATION_VTK_WIDGETS_EXPORT ctkVTKSliceView : public ctkVTKAbstractView
39{
40 Q_OBJECT
42 Q_PROPERTY(RenderWindowLayoutType renderWindowLayoutType
43 READ renderWindowLayoutType WRITE setRenderWindowLayoutType)
44 Q_PROPERTY(QColor highlightedBoxColor READ highlightedBoxColor WRITE setHighlightedBoxColor)
45 Q_PROPERTY(double colorLevel READ colorLevel WRITE setColorLevel)
46 Q_PROPERTY(double colorWindow READ colorWindow WRITE setColorWindow)
47
48public:
51 explicit ctkVTKSliceView(QWidget* parent = 0);
53
57 enum RenderWindowLayoutType{LeftRightTopBottom = 0, LeftRightBottomTop};
58
60 void setActiveCamera(vtkCamera * newActiveCamera);
61
64
66 vtkRenderer* overlayRenderer() const;
67
70 vtkCornerAnnotation* overlayCornerAnnotation()const;
71
74 virtual void setBackgroundColor(const QColor& newBackgroundColor);
75
78 virtual QColor backgroundColor()const;
79
82 QColor highlightedBoxColor()const;
83
87
90 double colorLevel()const;
91
94 double colorWindow()const;
95
96public Q_SLOTS:
97
101
104#if (VTK_MAJOR_VERSION <= 5)
105 void setImageData(vtkImageData* newImageData);
106#else
107 void setImageDataConnection(vtkAlgorithmOutput* newImageDataPort);
108#endif
109
112 void setHighlightedBoxColor(const QColor& newHighlightedBoxColor);
113
117
120 void setColorLevel(double newColorLevel);
121
124 void setColorWindow(double newColorWindow);
125
130
135
136Q_SIGNALS:
137 void resized(const QSize& size);
138
139protected:
140 virtual bool eventFilter(QObject *object, QEvent *event);
141
142private:
143 Q_DECLARE_PRIVATE(ctkVTKSliceView);
144 Q_DISABLE_COPY(ctkVTKSliceView);
145};
146
147#endif
ctkVTKAbstractView Superclass
Constructors.
void setImageData(vtkImageData *newImageData)
virtual ~ctkVTKSliceView()
void resized(const QSize &size)
virtual bool eventFilter(QObject *object, QEvent *event)
Q_INVOKABLE vtkLightBoxRendererManager * lightBoxRendererManager() const
Get lightBoxRendererManager.
void setHighlightedBoxColor(const QColor &newHighlightedBoxColor)
RenderWindowLayoutType renderWindowLayoutType() const
void setLightBoxRendererManagerColumnCount(int newColumnCount)
virtual QColor backgroundColor() const
void setLightBoxRendererManagerRowCount(int newRowCount)
double colorWindow() const
void setColorWindow(double newColorWindow)
void setActiveCamera(vtkCamera *newActiveCamera)
Set active camera.
double colorLevel() const
vtkRenderer * overlayRenderer() const
Get overlay renderer.
void setRenderWindowLayoutType(RenderWindowLayoutType layoutType)
ctkVTKSliceView(QWidget *parent=0)
virtual void setBackgroundColor(const QColor &newBackgroundColor)
void setColorLevel(double newColorLevel)
QColor highlightedBoxColor() const
vtkCornerAnnotation * overlayCornerAnnotation() const