Skip to content

Commit

Permalink
Merge branches 'deprecate-classes', 'zlib-soversion', 'unlink-agl', '…
Browse files Browse the repository at this point in the history
…osmesa_32', 'matrix-cleanup2', 'solveleastsquares-memory-leak', 'python3_vtk_qt_fixes', '15914-reslice-mapper', 'release_splat_memory', 'km_coverity1', 'fix-cxx11-cmake-warning', 'fix-for-special-chars-in-dir' and 'ios-9.2-vtk7' into release

* deprecate-classes:
  Deprecating vtkVolumeRaycastMapper and vtkVolumeTextureMapper2D/3D.

* zlib-soversion:
  zlib 2015-12-14 (751703ae)
  zlib: remove zlib1.rc from the list of used files.
  zlib 2015-12-09 (acc12639)
  ThirdParty: Improve update script default merge message behavior
  ThirdParty: Teach update script to find upstream hash in commit message
  ThirdParty: Teach update script to store upstream hash in commit message
  metaio 2015-11-23 (4c85a18e)
  jsoncpp 2015-10-01 (eb1ddde0)
  png 2015-12-07 (63adbb10)
  zlib 2015-11-18 (0abb295c)

* unlink-agl:
  Remove AGL.framework from OS X OPENGL_LIBRARIES.

* osmesa_32:
  get a 3.2 context from OS mesa using new funcs

* matrix-cleanup2:
  Change deprecation warning to "VTK 7.0".
  Synchronize vtkMatrix3x3 with vtkMatrix4x4.
  Remove warning about deprecated method usage.
  Eliminate C-style casts from vtkMatrix4x4.
  Rename Element parameter to element.
  Mark legacy methods as "legacy".
  Remove the legacy BTX/ETX markers.
  Move some comments so they become visible to doxygen.

* solveleastsquares-memory-leak:
  Fix memory leak in vtkMath::SolveLeastSquares.

* python3_vtk_qt_fixes:
  Fixes QTVTKRenderWindowInteractor for python3

* 15914-reslice-mapper:
  BUG 15914: Fix corrupt image from vtkImageResliceMapper

* release_splat_memory:
  Free up memory in the point gaussian

* km_coverity1:
  Fix some coverity issues

* fix-cxx11-cmake-warning:
  fix a cmake warning for users of VTK

* fix-for-special-chars-in-dir:
  Fix CMake error if in directory with ++ in name.

* ios-9.2-vtk7:
  ios: fix newline-at-end-of-file
  update for newer versions of iOS
  • Loading branch information
Chuck Atkins committed Jan 11, 2016
14 parents bfbdc62 + bc6c71e + d9d26ba + 4a1fbef + e7e71c4 + 1cb28ce + 9d952e9 + 5146150 + 46a54e5 + fff7309 + 69bafcd + 0a56667 + a849580 + 60d6c9a commit 4d6be94
Show file tree
Hide file tree
Showing 75 changed files with 863 additions and 626 deletions.
3 changes: 2 additions & 1 deletion CMake/VTKConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
8 changes: 7 additions & 1 deletion CMake/ios.device.toolchain.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,13 @@ if (NOT CMAKE_OSX_SYSROOT)
iPhoneOS7.1.sdk
iPhoneOS8.0.sdk
iPhoneOS9.0.sdk
iPhoneOS9.1.sdk)
iPhoneOS9.1.sdk
iPhoneOS9.2.sdk
iPhoneOS9.3.sdk # guess
iPhoneOS9.4.sdk # guess
iPhoneOS10.0.sdk # guess
iPhoneOS10.1.sdk # guess
)
if (EXISTS ${sdk_root}/${sdk} AND IS_DIRECTORY ${sdk_root}/${sdk})
set(CMAKE_OSX_SYSROOT ${sdk_root}/${sdk})
endif()
Expand Down
8 changes: 7 additions & 1 deletion CMake/ios.simulator.toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@ if (NOT CMAKE_OSX_SYSROOT)
iPhoneSimulator7.1.sdk
iPhoneSimulator8.0.sdk
iPhoneSimulator9.0.sdk
iPhoneSimulator9.1.sdk)
iPhoneSimulator9.1.sdk
iPhoneSimulator9.2.sdk
iPhoneSimulator9.3.sdk # guess
iPhoneSimulator9.4.sdk # guess
iPhoneSimulator10.0.sdk # guess
iPhoneSimulator10.1.sdk # guess
)
if (EXISTS ${sdk_root}/${sdk} AND IS_DIRECTORY ${sdk_root}/${sdk})
set(CMAKE_OSX_SYSROOT ${sdk_root}/${sdk})
endif()
Expand Down
15 changes: 15 additions & 0 deletions CMake/vtkOpenGL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,21 @@ elseif(VTK_USE_OFFSCREEN_EGL)
else()
find_package(OpenGL REQUIRED)
include_directories(SYSTEM ${OPENGL_INCLUDE_DIR})
if(APPLE)
# Remove the deprecated AGL framework found by FindOpenGL.cmake
# (this is only required for CMake 3.4.1 and earlier)
set(_new_libs)
foreach(_lib ${OPENGL_LIBRARIES})
get_filename_component(_name "${_lib}" NAME)
string(TOLOWER "${_name}" _name)
if(NOT "${_name}" STREQUAL "agl.framework")
list(APPEND _new_libs ${_lib})
endif()
endforeach()
set(OPENGL_LIBRARIES ${_new_libs})
unset(_new_libs)
unset(_name)
endif()
endif()

# Function to link a VTK target to the necessary OpenGL libraries.
Expand Down
27 changes: 13 additions & 14 deletions Common/Core/vtkMath.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,7 @@ int vtkMath::SolveLeastSquares(int numberOfSamples, double **xt, int xOrder,
double **hmt = NULL;
int homogRC = 0;
int *homogenFlags = new int[yOrder];
int successFlag;

// Ok, first init some flags check and see if all the systems are homogeneous
if (checkHomogeneous)
Expand Down Expand Up @@ -1138,22 +1139,20 @@ int vtkMath::SolveLeastSquares(int numberOfSamples, double **xt, int xOrder,
}
}

// next get the inverse of XXt
if (!(vtkMath::InvertMatrix(XXt, XXtI, xOrder)))
{
delete [] homogenFlags;
return 0;
}
successFlag = vtkMath::InvertMatrix(XXt, XXtI, xOrder);

// next get m
for (i = 0; i < xOrder; i++)
// next get the inverse of XXt
if (successFlag)
{
for (j = 0; j < yOrder; j++)
for (i = 0; i < xOrder; i++)
{
mt[i][j] = 0.0;
for (k = 0; k < xOrder; k++)
for (j = 0; j < yOrder; j++)
{
mt[i][j] += XXtI[i][k] * XYt[k][j];
mt[i][j] = 0.0;
for (k = 0; k < xOrder; k++)
{
mt[i][j] += XXtI[i][k] * XYt[k][j];
}
}
}
}
Expand Down Expand Up @@ -1198,11 +1197,11 @@ int vtkMath::SolveLeastSquares(int numberOfSamples, double **xt, int xOrder,

if (someHomogeneous)
{
return homogRC;
return homogRC && successFlag;
}
else
{
return 1;
return successFlag;
}
}

Expand Down
26 changes: 7 additions & 19 deletions Common/Math/Testing/Cxx/TestMatrix3x3.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,28 +38,16 @@ int TestMatrix3x3(int,char *[])
// Check copying and comparison
vtkNew<vtkMatrix3x3> matrix2;
matrix2->DeepCopy(matrix.GetPointer());
if (*matrix.GetPointer() != *matrix2.GetPointer())
{
vtkGenericWarningMacro("DeepCopy of vtkMatrix3x3 failed.");
return 1;
}
if (!(*matrix.GetPointer() == *matrix2.GetPointer()))
for (int i = 0; i < 3; ++i)
{
vtkGenericWarningMacro("Problem with vtkMatrix3x3::operator==");
return 1;
for (int j = 0; j < 3; ++j)
if (matrix->GetElement(i, j) != matrix2->GetElement(i, j))
{
vtkGenericWarningMacro("DeepCopy of vtkMatrix3x3 failed.");
return 1;
}
}
matrix2->SetElement(0, 0, 5.0);
if (!(*matrix.GetPointer() != *matrix2.GetPointer()))
{
vtkGenericWarningMacro("Problem with vtkMatrix3x3::operator!=");
return 1;
}
if (*matrix.GetPointer() == *matrix2.GetPointer())
{
vtkGenericWarningMacro("Problem with vtkMatrix3x3::operator==");
return 1;
}

if (!vtkMathUtilities::FuzzyCompare(matrix2->GetElement(0, 0), 5.0))
{
vtkGenericWarningMacro("Value not stored in matrix properly.");
Expand Down
Loading

0 comments on commit 4d6be94

Please sign in to comment.