Commit 0431099d authored by Emmanuel Promayon's avatar Emmanuel Promayon

FIXED first version that shows a mainwindow

First working OpenGL Renderer but text display (e.g., when displaying image)
crashes and vtkMath::random (during mesh clipping) also crash
parent fcd61701
......@@ -43,8 +43,7 @@
#elif VTK_MAJOR_VERSION == 7
#include <QVTKWidget.h>
// additional needed headers for QVTKWidget
#include <QWindow>
#elif VTK_MAJOR_VERSION == 8
#include <QVTKOpenGLNativeWidget.h>
......@@ -54,16 +53,9 @@
#endif
#include <vtkSmartPointer.h>
#include <vtkInteractorStyle.h>
#include <vtkRenderWindowInteractor.h>
#include <QVTKInteractor.h>
#include <utility>
// -- VTK stuff classes
class vtkRenderer;
class vtkInteractorStyle;
class vtkRenderer;
class vtkPicker;
class vtkProp;
class vtkActor;
......@@ -75,53 +67,12 @@ class vtkCamera;
class vtkAxesActor;
class vtkAnnotatedCubeActor;
class vtkScalarBarWidget;
class vtkUnsignedCharArray;
class vtkTextMapper;
namespace camitk {
// -- Core stuff classes
class GeometricObject;
/// Interactor used when we are in picking mode
class vtkInteractorStylePick : public vtkInteractorStyle {
public:
static vtkInteractorStylePick* New();
vtkTypeMacro(vtkInteractorStylePick, vtkInteractorStyle);
class vtkInteractorStylePick;
void PrintSelf(ostream& os, vtkIndent indent) override;
void SetAreaPicking(bool b);
void OnLeftButtonDown() override;
void OnLeftButtonUp() override;
void OnMouseMove() override;
protected:
vtkInteractorStylePick();
~vtkInteractorStylePick() override = default;
virtual void Pick();
void RedrawRubberBand();
int startPosition[2];
int endPosition[2];
int moving;
vtkSmartPointer<vtkUnsignedCharArray> pixelArray;
bool areaPicking;
};
}
namespace camitk {
/**
* @ingroup group_sdk_libraries_core_viewer
*
......@@ -524,7 +475,7 @@ protected :
bool pickingDiverter;
/// picking interactor
vtkSmartPointer<vtkInteractorStylePick> pickInteractorStyle;
vtkSmartPointer<camitk::vtkInteractorStylePick> pickInteractorStyle;
///@}
......
This diff is collapsed.
/*****************************************************************************
* $CAMITK_LICENCE_BEGIN$
*
* CamiTK - Computer Assisted Medical Intervention ToolKit
* (c) 2001-2018 Univ. Grenoble Alpes, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
*
* Visit http://camitk.imag.fr for more information
*
* This file is part of CamiTK.
*
* CamiTK is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* CamiTK is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
*
* $CAMITK_LICENCE_END$
****************************************************************************/
#ifndef VTKINTERACTORSTYLEPICK_H
#define VTKINTERACTORSTYLEPICK_H
#include <vtkInteractorStyle.h>
#include <vtkSmartPointer.h>
class vtkUnsignedCharArray;
namespace camitk {
/// Specific backward compatible interactor for CamiTK RendererWidget
/// Interactor used when we are in picking mode
///
class vtkInteractorStylePick : public vtkInteractorStyle {
public:
static vtkInteractorStylePick* New();
vtkTypeMacro(vtkInteractorStylePick, vtkInteractorStyle);
void PrintSelf(ostream& os, vtkIndent indent) override;
void SetAreaPicking(bool b);
void OnLeftButtonDown() override;
void OnLeftButtonUp() override;
void OnMouseMove() override;
protected:
vtkInteractorStylePick();
~vtkInteractorStylePick() override = default;
virtual void Pick();
void RedrawRubberBand();
int startPosition[2];
int endPosition[2];
int moving;
vtkSmartPointer<vtkUnsignedCharArray> pixelArray;
bool areaPicking;
};
}
#endif //VTKINTERACTORSTYLEPICK_H
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment