Skip to content

Commit cd8b741

Browse files
committed
Added GeodesicMeasurement plugin
The plugin is meant to be compiled and shipped with ParaView, but not necessarily enabled by default. It exposes a filter that is used to compute piece-wise geodesic paths between a set of input points. The first input to this filter is a polygonal surface on which geodesic measurements should be taken. Points in the second input are used to define the endpoints. Geodesic paths are computed between consecutive points in the endpoints input and form a partial loop. Options for completing the loop with another geodesic or with a straight line are available. Change-Id: Iee70117176567aedba3f2e57057d0dcca4fb5485
1 parent be7d47d commit cd8b741

File tree

125 files changed

+30669
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+30669
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
project( GeodesicMeasurementPlugin )
2+
cmake_minimum_required( VERSION 2.8 )
3+
4+
if (NOT ParaView_BINARY_DIR)
5+
find_package( ParaView REQUIRED )
6+
include( ${PARAVIEW_USE_FILE} )
7+
endif()
8+
9+
add_subdirectory( FmmMesh )
10+
11+
include_directories(
12+
${CMAKE_CURRENT_SOURCE_DIR}/FmmMesh
13+
${CMAKE_CURRENT_BINARY_DIR}/FmmMesh
14+
${VTK_INCLUDE_DIRS}
15+
)
16+
17+
add_paraview_plugin( GeodesicMeasurement "1.0"
18+
SERVER_MANAGER_XML GeodesicMeasurement.xml
19+
SERVER_MANAGER_SOURCES
20+
vtkPolyDataGeodesicDistance.cxx
21+
vtkFastMarchingGeodesicDistance.cxx
22+
vtkFastMarchingGeodesicPath.cxx
23+
vtkGeodesicsBetweenPoints.cxx
24+
)
25+
26+
target_link_libraries( GeodesicMeasurement PRIVATE FmmMesh )
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
project( FmmMesh )
2+
3+
set( vtkFmmMesh_THIRD_PARTY 1)
4+
set(vtkFmmMesh_LIBRARIES FmmMesh)
5+
6+
if(NOT LIBRARY_OUTPUT_PATH)
7+
set(LIBRARY_OUTPUT_PATH ${FmmMesh_BINARY_DIR}/bin CACHE INTERNAL
8+
"Single output directory for building all libraries.")
9+
endif(NOT LIBRARY_OUTPUT_PATH)
10+
set(FmmMesh_LIBRARY_DIRS ${LIBRARY_OUTPUT_PATH})
11+
set(FmmMesh_RUNTIME_DIRS ${LIBRARY_OUTPUT_PATH})
12+
13+
if(NOT EXECUTABLE_OUTPUT_PATH)
14+
set(EXECUTABLE_OUTPUT_PATH ${FmmMesh_BINARY_DIR}/bin CACHE INTERNAL
15+
"Single output directory for building all executables.")
16+
endif(NOT EXECUTABLE_OUTPUT_PATH)
17+
18+
set( VTKFMMMESH_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS} )
19+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/vtkFmmMeshConfig.h.in
20+
${CMAKE_CURRENT_BINARY_DIR}/vtkFmmMeshConfig.h)
21+
22+
set( ${PROJECT_NAME}_SRCS
23+
gw_core/GW_Config.cpp
24+
gw_core/GW_Face.cpp
25+
gw_core/GW_FaceIterator.cpp
26+
gw_core/GW_Mesh.cpp
27+
gw_core/GW_SmartCounter.cpp
28+
gw_core/GW_Vertex.cpp
29+
gw_core/GW_VertexIterator.cpp
30+
gw_geodesic/GW_GeodesicFace.cpp
31+
gw_geodesic/GW_GeodesicMesh.cpp
32+
gw_geodesic/GW_GeodesicPath.cpp
33+
gw_geodesic/GW_GeodesicPoint.cpp
34+
gw_geodesic/GW_GeodesicVertex.cpp
35+
gw_geodesic/GW_TriangularInterpolation_Linear.cpp
36+
gw_geodesic/GW_TriangularInterpolation_Quadratic.cpp
37+
gw_geodesic/GW_TriangularInterpolation_Cubic.cpp
38+
)
39+
40+
set( ${PROJECT_NAME}_HDRS
41+
gw_core/GW_Config.h
42+
gw_core/GW_Face.h
43+
gw_core/GW_Mesh.h
44+
gw_core/GW_FaceIterator.h
45+
gw_core/GW_Vertex.h
46+
gw_core/GW_VertexIterator.h
47+
gw_core/GW_SmartCounter.h
48+
gw_geodesic/GW_GeodesicFace.h
49+
gw_geodesic/GW_GeodesicMesh.h
50+
gw_geodesic/GW_GeodesicPath.h
51+
gw_geodesic/GW_GeodesicPoint.h
52+
gw_geodesic/GW_GeodesicVertex.h
53+
gw_geodesic/GW_TriangularInterpolation_Linear.h
54+
gw_geodesic/GW_TriangularInterpolation_Quadratic.h
55+
gw_geodesic/GW_TriangularInterpolation_Cubic.h
56+
)
57+
58+
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/gw_core
59+
${CMAKE_CURRENT_SOURCE_DIR}/gw_geodesic
60+
${CMAKE_CURRENT_BINARY_DIR} )
61+
62+
add_library( ${PROJECT_NAME} SHARED
63+
${${PROJECT_NAME}_SRCS}
64+
${${PROJECT_NAME}_HDRS} )
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Copyright (c) 2009, Gabriel Peyre
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are
6+
met:
7+
8+
* Redistributions of source code must retain the above copyright
9+
notice, this list of conditions and the following disclaimer.
10+
* Redistributions in binary form must reproduce the above copyright
11+
notice, this list of conditions and the following disclaimer in
12+
the documentation and/or other materials provided with the distribution
13+
14+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
18+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24+
POSSIBILITY OF SUCH DAMAGE.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
All files here are provided under a BSD license
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include "stdafx.h"
2+
#include "GW_Config.h"
3+
4+
using namespace GW;
5+
6+
string GW::gw_alinea = " * ";
7+
string GW::gw_endl = "\n";
8+
FILE* GW::GW_OutputStream = NULL;
9+
10+
void GW::GW_OutputComment( const char* str )
11+
{
12+
if( GW_OutputStream!=NULL )
13+
{
14+
string str2 = gw_alinea + str + gw_endl;
15+
fprintf( GW_OutputStream, str2.c_str() );
16+
}
17+
}

0 commit comments

Comments
 (0)