Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selection tool feature #46

Closed
wants to merge 12 commits into from
Closed
16 changes: 16 additions & 0 deletions DynamicModeler/Logic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ set(KIT ${PROJECT_NAME})

set(${KIT}_EXPORT_DIRECTIVE "VTK_SLICER_${MODULE_NAME_UPPER}_MODULE_LOGIC_EXPORT")

add_subdirectory(FastMarching)

#
# vtkAddon
#
Expand All @@ -13,9 +15,20 @@ endif()

set(${KIT}_INCLUDE_DIRECTORIES
${vtkAddon_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/FastMarching
${CMAKE_CURRENT_SOURCE_DIR}/FastMarching/gw_geodesic
${CMAKE_CURRENT_SOURCE_DIR}/FastMarching/gw_core
)

set(${KIT}_SRCS
vtkFastMarchingGeodesicDistance.cxx
vtkFastMarchingGeodesicDistance.h
vtkFastMarchingGeodesicPath.cxx
vtkFastMarchingGeodesicPath.h
vtkPolyDataGeodesicDistance.cxx
vtkPolyDataGeodesicDistance.h
vtkPolygonalSurfaceContourLineInterpolator2.cxx
vtkPolygonalSurfaceContourLineInterpolator2.h
vtkImplicitPolyDataPointDistance.cxx
vtkImplicitPolyDataPointDistance.h
vtkSlicer${MODULE_NAME}AppendTool.cxx
Expand All @@ -36,6 +49,8 @@ set(${KIT}_SRCS
vtkSlicer${MODULE_NAME}PlaneCutTool.h
vtkSlicer${MODULE_NAME}ROICutTool.cxx
vtkSlicer${MODULE_NAME}ROICutTool.h
vtkSlicer${MODULE_NAME}SelectionTool.cxx
vtkSlicer${MODULE_NAME}SelectionTool.h
vtkSlicer${MODULE_NAME}Tool.cxx
vtkSlicer${MODULE_NAME}Tool.h
vtkSlicer${MODULE_NAME}ToolFactory.cxx
Expand All @@ -45,6 +60,7 @@ set(${KIT}_SRCS
set(${KIT}_TARGET_LIBRARIES
vtkSlicer${MODULE_NAME}ModuleMRML
vtkAddon
MeshGeodesics
)

#-----------------------------------------------------------------------------
Expand Down
58 changes: 58 additions & 0 deletions DynamicModeler/Logic/FastMarching/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
PROJECT( MeshGeodesics )

IF(NOT LIBRARY_OUTPUT_PATH)
SET(LIBRARY_OUTPUT_PATH ${MeshGeodesics_BINARY_DIR}/bin CACHE INTERNAL
"Single output directory for building all libraries.")
ENDIF(NOT LIBRARY_OUTPUT_PATH)
SET(MeshGeodesics_LIBRARY_DIRS ${LIBRARY_OUTPUT_PATH})
SET(MeshGeodesics_RUNTIME_DIRS ${LIBRARY_OUTPUT_PATH})

IF(NOT EXECUTABLE_OUTPUT_PATH)
SET(EXECUTABLE_OUTPUT_PATH ${MeshGeodesics_BINARY_DIR}/bin CACHE INTERNAL
"Single output directory for building all executables.")
ENDIF(NOT EXECUTABLE_OUTPUT_PATH)


SET( ${PROJECT_NAME}_SRCS
gw_core/GW_Config.cpp
gw_core/GW_Face.cpp
gw_core/GW_FaceIterator.cpp
gw_core/GW_Mesh.cpp
gw_core/GW_SmartCounter.cpp
gw_core/GW_Vertex.cpp
gw_core/GW_VertexIterator.cpp
gw_geodesic/GW_GeodesicFace.cpp
gw_geodesic/GW_GeodesicMesh.cpp
gw_geodesic/GW_GeodesicPath.cpp
gw_geodesic/GW_GeodesicPoint.cpp
gw_geodesic/GW_GeodesicVertex.cpp
gw_geodesic/GW_TriangularInterpolation_Linear.cpp
gw_geodesic/GW_TriangularInterpolation_Quadratic.cpp
gw_geodesic/GW_TriangularInterpolation_Cubic.cpp
)

SET( ${PROJECT_NAME}_HDRS
gw_core/GW_Config.h
gw_core/GW_Face.h
gw_core/GW_Mesh.h
gw_core/GW_FaceIterator.h
gw_core/GW_Vertex.h
gw_core/GW_VertexIterator.h
gw_core/GW_SmartCounter.h
gw_geodesic/GW_GeodesicFace.h
gw_geodesic/GW_GeodesicMesh.h
gw_geodesic/GW_GeodesicPath.h
gw_geodesic/GW_GeodesicPoint.h
gw_geodesic/GW_GeodesicVertex.h
gw_geodesic/GW_TriangularInterpolation_Linear.h
gw_geodesic/GW_TriangularInterpolation_Quadratic.h
gw_geodesic/GW_TriangularInterpolation_Cubic.h
)

INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/gw_core
${CMAKE_CURRENT_SOURCE_DIR}/gw_geodesic
${CMAKE_CURRENT_BINARY_DIR}/gw_maths )

ADD_LIBRARY( ${PROJECT_NAME} STATIC
${${PROJECT_NAME}_SRCS}
${${PROJECT_NAME}_HDRS} )
24 changes: 24 additions & 0 deletions DynamicModeler/Logic/FastMarching/Copyright.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Copyright (c) 2009, Gabriel Peyre
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the distribution

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
1 change: 1 addition & 0 deletions DynamicModeler/Logic/FastMarching/License.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
All files here are provided under a BSD license
18 changes: 18 additions & 0 deletions DynamicModeler/Logic/FastMarching/gw_core/GW_Config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include "stdafx.h"
#include "GW_Config.h"

using namespace GW;

string GW::gw_alinea = " * ";
string GW::gw_endl = "\n";
FILE* GW::GW_OutputStream = NULL;

void GW::GW_OutputComment( const char* str )
{
if( GW_OutputStream!=NULL )
{
string str2 = gw_alinea + str + gw_endl;
fprintf( GW_OutputStream, str2.c_str() );
}
}