Commit 8750137c authored by Utkarsh Ayachit's avatar Utkarsh Ayachit
Browse files

Merge remote-tracking branch 'origin/release' into HEAD

* origin/release:
  VTKWeb update to allow server side notification to client
  Fix mouse wheel zooming in PyQt interactor
  zlib 2016-01-20 (bfc811e0)
  Merge branch 'upstream-zlib' into update-zlib
  Fix errors related to missing PyInt_AsLong and PyString_AsString on Python 3
  Bug 15934: vtkMetaImageWriter incorrect voxel spacing and origin
  ios: fix newline-at-end-of-file
  update for newer versions of iOS
  fix a cmake warning for users of VTK
  Fix CMake error if in directory with ++ in name.
  Change deprecation warning to "VTK 7.0".
parents b9d588a1 46f9a75d
......@@ -6,7 +6,8 @@
# to load VTK's settings for an external project.
@VTK_CONFIG_CODE@
if (@VTK_USE_CXX11_FEATURES@)
set(VTK_USE_CXX11_FEATURES @VTK_USE_CXX11_FEATURES@)
if (VTK_USE_CXX11_FEATURES)
if (CMAKE_VERSION VERSION_LESS "3.1")
message(FATAL_ERROR "VTK was built with C++11 features using CMake's CXX_STANDARD_REQUIRED feature. Configuring projects this way requires a newer version of CMake. Please update to CMake 3.1 or newer")
endif()
......
......@@ -87,7 +87,7 @@ void vtkMatrix3x3::MultiplyPoint(const double elements[9],
#ifndef VTK_LEGACY_REMOVE
double *vtkMatrix3x3::operator[](const unsigned int i)
{
VTK_LEGACY_BODY(vtkMatrix3x3::operator[], "VTK 7.1");
VTK_LEGACY_BODY(vtkMatrix3x3::operator[], "VTK 7.0");
return &(this->Element[i][0]);
}
#endif
......@@ -96,7 +96,7 @@ double *vtkMatrix3x3::operator[](const unsigned int i)
#ifndef VTK_LEGACY_REMOVE
const double *vtkMatrix3x3::operator[](unsigned int i) const
{
VTK_LEGACY_BODY(vtkMatrix3x3::operator[], "VTK 7.1");
VTK_LEGACY_BODY(vtkMatrix3x3::operator[], "VTK 7.0");
return &(this->Element[i][0]);
}
#endif
......@@ -141,7 +141,7 @@ bool vtkMatrix3x3::operator!=(const vtkMatrix3x3 &other)
#ifndef VTK_LEGACY_REMOVE
void vtkMatrix3x3::Adjoint(vtkMatrix3x3 &in, vtkMatrix3x3 &out)
{
VTK_LEGACY_BODY(vtkMatrix3x3::Adjoint, "VTK 7.1");
VTK_LEGACY_BODY(vtkMatrix3x3::Adjoint, "VTK 7.0");
this->Adjoint(&in, &out);
}
#endif
......@@ -150,7 +150,7 @@ void vtkMatrix3x3::Adjoint(vtkMatrix3x3 &in, vtkMatrix3x3 &out)
#ifndef VTK_LEGACY_REMOVE
double vtkMatrix3x3::Determinant(vtkMatrix3x3 &in)
{
VTK_LEGACY_BODY(vtkMatrix3x3::Determinant, "VTK 7.1");
VTK_LEGACY_BODY(vtkMatrix3x3::Determinant, "VTK 7.0");
return vtkMatrix3x3::Determinant(*in.Element);
}
#endif
......@@ -159,7 +159,7 @@ double vtkMatrix3x3::Determinant(vtkMatrix3x3 &in)
#ifndef VTK_LEGACY_REMOVE
double vtkMatrix3x3::Determinant(vtkMatrix3x3 *in)
{
VTK_LEGACY_BODY(vtkMatrix3x3::Determinant, "VTK 7.1");
VTK_LEGACY_BODY(vtkMatrix3x3::Determinant, "VTK 7.0");
return vtkMatrix3x3::Determinant(*in->Element);
}
#endif
......@@ -168,7 +168,7 @@ double vtkMatrix3x3::Determinant(vtkMatrix3x3 *in)
#ifndef VTK_LEGACY_REMOVE
void vtkMatrix3x3::Invert(vtkMatrix3x3 &in, vtkMatrix3x3 &out)
{
VTK_LEGACY_BODY(vtkMatrix3x3::Invert, "VTK 7.1");
VTK_LEGACY_BODY(vtkMatrix3x3::Invert, "VTK 7.0");
this->Invert(&in, &out);
}
#endif
......@@ -177,7 +177,7 @@ void vtkMatrix3x3::Invert(vtkMatrix3x3 &in, vtkMatrix3x3 &out)
#ifndef VTK_LEGACY_REMOVE
void vtkMatrix3x3::Transpose(vtkMatrix3x3 &in, vtkMatrix3x3 &out)
{
VTK_LEGACY_BODY(vtkMatrix3x3::Transpose, "VTK 7.1");
VTK_LEGACY_BODY(vtkMatrix3x3::Transpose, "VTK 7.0");
this->Transpose(&in, &out);
}
#endif
......@@ -187,7 +187,7 @@ void vtkMatrix3x3::Transpose(vtkMatrix3x3 &in, vtkMatrix3x3 &out)
void vtkMatrix3x3::PointMultiply(const double elements[9],
const float in[3], float result[3])
{
VTK_LEGACY_BODY(vtkMatrix3x3::PointMultiply, "VTK 7.1");
VTK_LEGACY_BODY(vtkMatrix3x3::PointMultiply, "VTK 7.0");
double newElements[9];
vtkMatrix3x3::Transpose(elements, newElements);
vtkMatrix3x3::MultiplyPoint(newElements, in, result);
......@@ -199,7 +199,7 @@ void vtkMatrix3x3::PointMultiply(const double elements[9],
void vtkMatrix3x3::PointMultiply(const double elements[9],
const double in[3], double result[3])
{
VTK_LEGACY_BODY(vtkMatrix3x3::PointMultiply, "VTK 7.1");
VTK_LEGACY_BODY(vtkMatrix3x3::PointMultiply, "VTK 7.0");
double newElements[9];
vtkMatrix3x3::Transpose(elements, newElements);
vtkMatrix3x3::MultiplyPoint(newElements, in, result);
......
......@@ -79,7 +79,7 @@ void vtkMatrix4x4::MultiplyPoint(const double elements[16],
#ifndef VTK_LEGACY_REMOVE
double *vtkMatrix4x4::operator[](const unsigned int i)
{
VTK_LEGACY_BODY(vtkMatrix4x4::operator[], "VTK 7.1");
VTK_LEGACY_BODY(vtkMatrix4x4::operator[], "VTK 7.0");
return &(this->Element[i][0]);
}
#endif
......@@ -88,7 +88,7 @@ double *vtkMatrix4x4::operator[](const unsigned int i)
#ifndef VTK_LEGACY_REMOVE
const double *vtkMatrix4x4::operator[](unsigned int i) const
{
VTK_LEGACY_BODY(vtkMatrix4x4::operator[], "VTK 7.1");
VTK_LEGACY_BODY(vtkMatrix4x4::operator[], "VTK 7.0");
return &(this->Element[i][0]);
}
#endif
......@@ -97,7 +97,7 @@ const double *vtkMatrix4x4::operator[](unsigned int i) const
#ifndef VTK_LEGACY_REMOVE
void vtkMatrix4x4::Adjoint(vtkMatrix4x4 &in, vtkMatrix4x4 &out)
{
VTK_LEGACY_BODY(vtkMatrix4x4::Adjoint, "VTK 7.1");
VTK_LEGACY_BODY(vtkMatrix4x4::Adjoint, "VTK 7.0");
this->Adjoint(&in, &out);
}
#endif
......@@ -106,7 +106,7 @@ void vtkMatrix4x4::Adjoint(vtkMatrix4x4 &in, vtkMatrix4x4 &out)
#ifndef VTK_LEGACY_REMOVE
double vtkMatrix4x4::Determinant(vtkMatrix4x4 &in)
{
VTK_LEGACY_BODY(vtkMatrix4x4::Determinant, "VTK 7.1");
VTK_LEGACY_BODY(vtkMatrix4x4::Determinant, "VTK 7.0");
return vtkMatrix4x4::Determinant(*in.Element);
}
#endif
......@@ -115,7 +115,7 @@ double vtkMatrix4x4::Determinant(vtkMatrix4x4 &in)
#ifndef VTK_LEGACY_REMOVE
double vtkMatrix4x4::Determinant(vtkMatrix4x4 *in)
{
VTK_LEGACY_BODY(vtkMatrix4x4::Determinant, "VTK 7.1");
VTK_LEGACY_BODY(vtkMatrix4x4::Determinant, "VTK 7.0");
return vtkMatrix4x4::Determinant(*in->Element);
}
#endif
......@@ -124,7 +124,7 @@ double vtkMatrix4x4::Determinant(vtkMatrix4x4 *in)
#ifndef VTK_LEGACY_REMOVE
void vtkMatrix4x4::Invert(vtkMatrix4x4 &in, vtkMatrix4x4 &out)
{
VTK_LEGACY_BODY(vtkMatrix4x4::Invert, "VTK 7.1");
VTK_LEGACY_BODY(vtkMatrix4x4::Invert, "VTK 7.0");
this->Invert(&in, &out);
}
#endif
......@@ -133,7 +133,7 @@ void vtkMatrix4x4::Invert(vtkMatrix4x4 &in, vtkMatrix4x4 &out)
#ifndef VTK_LEGACY_REMOVE
void vtkMatrix4x4::Transpose(vtkMatrix4x4 &in, vtkMatrix4x4 &out)
{
VTK_LEGACY_BODY(vtkMatrix4x4::Transpose, "VTK 7.1");
VTK_LEGACY_BODY(vtkMatrix4x4::Transpose, "VTK 7.0");
this->Transpose(&in, &out);
}
#endif
......@@ -143,7 +143,7 @@ void vtkMatrix4x4::Transpose(vtkMatrix4x4 &in, vtkMatrix4x4 &out)
void vtkMatrix4x4::PointMultiply(const double elements[16],
const float in[4], float result[4])
{
VTK_LEGACY_BODY(vtkMatrix4x4::PointMultiply, "VTK 7.1");
VTK_LEGACY_BODY(vtkMatrix4x4::PointMultiply, "VTK 7.0");
double newElements[16];
vtkMatrix4x4::Transpose(elements, newElements);
vtkMatrix4x4::MultiplyPoint(newElements, in, result);
......@@ -155,7 +155,7 @@ void vtkMatrix4x4::PointMultiply(const double elements[16],
void vtkMatrix4x4::PointMultiply(const double elements[16],
const double in[4], double result[4])
{
VTK_LEGACY_BODY(vtkMatrix4x4::PointMultiply, "VTK 7.1");
VTK_LEGACY_BODY(vtkMatrix4x4::PointMultiply, "VTK 7.0");
double newElements[16];
vtkMatrix4x4::Transpose(elements, newElements);
vtkMatrix4x4::MultiplyPoint(newElements, in, result);
......
......@@ -111,6 +111,12 @@ void vtkMetaImageWriter::Write( )
}
}
vtkStreamingDemandDrivenPipeline::SetUpdateExtent(
this->GetInputInformation(0, 0), ext);
vtkDemandDrivenPipeline::SafeDownCast(
this->GetInputExecutive(0, 0))->UpdateData(
this->GetInputConnection(0, 0)->GetIndex());
double origin[3];
double spacingDouble[3];
this->GetInput()->GetOrigin(origin);
......@@ -153,11 +159,6 @@ void vtkMetaImageWriter::Write( )
int numberOfElements = this->GetInput()->GetNumberOfScalarComponents();
vtkStreamingDemandDrivenPipeline::SetUpdateExtent(
this->GetInputInformation(0, 0), ext);
vtkDemandDrivenPipeline::SafeDownCast(
this->GetInputExecutive(0, 0))->UpdateData(
this->GetInputConnection(0, 0)->GetIndex());
this->MetaImagePtr->InitializeEssential( nDims,
dimSize,
spacing,
......
......@@ -13,6 +13,7 @@
=========================================================================*/
#include "vtkPython.h" // must be the first thing that's included.
#include "vtkPythonCompatibility.h"
#include "vtkMatplotlibMathTextUtilities.h"
#include "vtkCommand.h"
......
......@@ -152,6 +152,9 @@
# define gz_header_s vtk_zlib_gz_header_s
# define internal_state vtk_zlib_internal_state
/* XXX(kitware) this symbol wasn't Z_PREFIX mangled */
# define z_errmsg vtk_zlib_errmsg
#endif
#if defined(__MSDOS__) && !defined(MSDOS)
......
......@@ -102,6 +102,7 @@ class ServerProtocol(ApplicationSession):
imageCapture.setApplication(self.Application)
def registerVtkWebProtocol(self, protocol):
protocol.coreServer = self
protocol.setApplication(self.Application)
self.vtkWebProtocols.append(protocol)
......
......@@ -253,7 +253,7 @@ if(PYTHON_EXECUTABLE)
endif ()
endforeach()
if(NOT "${VTK_BINARY_DIR}" MATCHES "^${VTK_SOURCE_DIR}$")
if(NOT "${VTK_BINARY_DIR}" STREQUAL "${VTK_SOURCE_DIR}")
foreach(file ${VTK_PYTHON_FILES})
if (NOT IS_ABSOLUTE "${file}")
set(src "${CMAKE_CURRENT_SOURCE_DIR}/${file}.py")
......
......@@ -186,6 +186,7 @@ class QVTKRenderWindowInteractor(QWidget):
self.__saveY = 0
self.__saveModifiers = Qt.NoModifier
self.__saveButtons = Qt.NoButton
self.__wheelDelta = 0
# do special handling of some keywords:
# stereo, rw
......@@ -426,10 +427,17 @@ class QVTKRenderWindowInteractor(QWidget):
self._Iren.KeyReleaseEvent()
def wheelEvent(self, ev):
if ev.delta() >= 0:
self._Iren.MouseWheelForwardEvent()
if hasattr(ev, 'delta'):
self.__wheelDelta += ev.delta()
else:
self.__wheelDelta += ev.angleDelta().y()
if self.__wheelDelta >= 120:
self._Iren.MouseWheelForwardEvent()
self.__wheelDelta = 0
elif self.__wheelDelta <= -120:
self._Iren.MouseWheelBackwardEvent()
self.__wheelDelta = 0
def GetRenderWindow(self):
return self._RenderWindow
......
......@@ -49,6 +49,9 @@
#define PyUnicode_DecodeLocaleAndSize PyUnicode_DecodeFSDefaultAndSize
#define PyUnicode_DecodeLocale PyUnicode_DecodeFSDefault
#define PyUnicode_EncodeLocale(o,e) PyUnicode_EncodeFSDefault(o)
#define PyString_AsString _PyUnicode_AsString
#else
#define PyString_AsString PyUnicode_AsUTF8
#endif
// Buffer compatibility
......
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