Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:gofigure2/GoFigure2 into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
evanschwab committed Jun 20, 2011
2 parents 0f1f4bb + 0f8c085 commit 6e36fb7
Show file tree
Hide file tree
Showing 238 changed files with 18,366 additions and 6,731 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -15,3 +15,6 @@ qtcreator-build/

#OSX specifics
.DS_Store

*.orig

2 changes: 1 addition & 1 deletion CMake/ConfigBoost.cmake
Expand Up @@ -3,5 +3,5 @@ FIND_PACKAGE( Boost REQUIRED )
IF( Boost_FOUND )
INCLUDE_DIRECTORIES( BEFORE ${Boost_INCLUDE_DIRS} )
ELSE( Boost_FOUND )
MESSAGE( SEND_ERROR "BOOST NOT FOUND, CMAKE WILL STOP NOW")
MESSAGE( SEND_ERROR "BOOST NOT FOUND, CMAKE WILL STOP NOW")
ENDIF( Boost_FOUND )
78 changes: 54 additions & 24 deletions CMake/ConfigITK.cmake
@@ -1,36 +1,66 @@
#----------------------------------------------------------
FIND_PACKAGE( ITK REQUIRED )
IF( ITK_FOUND )

IF( ITK_FOUND )
#----------------------------------------------------------
INCLUDE( ${ITK_USE_FILE} )

#----------------------------------------------------------
# Check the version of ITK
IF( ( ${ITK_VERSION_MAJOR} LESS 3 ) OR
( ( ${ITK_VERSION_MAJOR} EQUAL 3 ) AND
( ${ITK_VERSION_MINOR} LESS 18 ) ) )
MESSAGE( SEND_ERROR
"GoFigure2 requires ITK 3.18 or newer version (your version of ITK is ${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}.${ITK_VERSION_PATCH})" )
ENDIF( ( ${ITK_VERSION_MAJOR} LESS 3 ) OR
( ( ${ITK_VERSION_MAJOR} EQUAL 3 ) AND
( ${ITK_VERSION_MINOR} LESS 18 ) ) )

# ( by checking the existence of a variable
# can't check version: 4.0.0 is modularized and old style...)
#----------------------------------------------------------
# Check if "REVIEW" is "ON"
IF( ${ITK_VERSION_MAJOR} EQUAL 3 )
IF( ( ${ITK_USE_REVIEW} MATCHES "OFF" ) OR
( ${ITK_USE_REVIEW_STATISTICS} MATCHES "OFF" ) )
MESSAGE( SEND_ERROR
"GoFigure2 requires ITK to be compiled with USE_REVIEW and USE_REVIEW_STATISTICS turned ON" )
ENDIF( ( ${ITK_USE_REVIEW} MATCHES "OFF" ) OR
( ${ITK_USE_REVIEW_STATISTICS} MATCHES "OFF" ) )
ELSE( ${ITK_VERSION_MAJOR} EQUAL 3 )
IF( ${ITK_USE_REVIEW} MATCHES "OFF" )
IF( ITK_VERSION_MAJOR EQUAL "4" )

ADD_DEFINITIONS( -DITKv4 )

IF( NOT DEFINED ITK_MODULES_ENABLED )
MESSAGE( SEND_ERROR
"GoFigure2 requires ITK to be compiled with USE_REVIEW turned ON" )
ENDIF( ${ITK_USE_REVIEW} MATCHES "OFF" )
ENDIF( ${ITK_VERSION_MAJOR} EQUAL 3 )
"WRONG VERSION OF ITK, REQUIERES MODULARIZED ITK, CMAKE WILL STOP NOW")
ENDIF ( NOT DEFINED ITK_MODULES_ENABLED )

# check if requiered modules are enabled
# note that ITK-Review requires all modules to be turned ON...
list(FIND ITK_MODULES_ENABLED ITK-Review ITK-Review_FOUND)
IF( ITK-Review_FOUND LESS 0 )
MESSAGE( SEND_ERROR "GoFigure2 requires ITK to be compiled with ITK-Review turned ON")
ENDIF( ITK-Review_FOUND LESS 0 )

ELSE( ITK_VERSION_MAJOR EQUAL "4" )

REMOVE_DEFINITIONS( -DITKv4 )
# Make sure it is at least ITK 3
IF( ITK_VERSION_MAJOR EQUAL "3" )

# Make sure it is ITK 3.20
IF( ITK_VERSION_MINOR EQUAL "20" )

# Make sure it is ITK 3.20.1
IF( ITK_VERSION_PATCH EQUAL "1" )

IF( ( ${ITK_USE_REVIEW} MATCHES "OFF" ) OR
( ${ITK_USE_REVIEW_STATISTICS} MATCHES "OFF" ) )
MESSAGE( SEND_ERROR
"GoFigure2 requires ITK to be compiled with USE_REVIEW"
" and USE_REVIEW_STATISTICS turned ON" )
ENDIF()

ELSE( ITK_VERSION_PATCH EQUAL "1" )
MESSAGE( SEND_ERROR "GoFigure2 requires at ITK 3.20.1" )
ENDIF( ITK_VERSION_PATCH EQUAL "1" )

ELSE( ITK_VERSION_MINOR EQUAL "20" )

MESSAGE( SEND_ERROR "GoFigure2 requires at ITK 3.20.1" )

ENDIF( ITK_VERSION_MINOR EQUAL "20" )

ELSE( ITK_VERSION_MAJOR EQUAL "3" )

MESSAGE( SEND_ERROR "GoFigure2 requires at ITK 3.20.1" )

ENDIF( ITK_VERSION_MAJOR EQUAL "3" )

ENDIF( ITK_VERSION_MAJOR EQUAL "4" )

ELSE( ITK_FOUND )
MESSAGE( SEND_ERROR "ITK NOT FOUND, CMAKE WILL STOP NOW")
Expand Down
4 changes: 2 additions & 2 deletions CMake/SuperBuild/External-Boost.cmake
Expand Up @@ -2,10 +2,10 @@
# Get and build boost

set( proj Boost )
set( version 1.45.0 )
set( version 1.46.1 )

ExternalProject_Add(${proj}
GIT_REPOSITORY "${git_protocol}://github.com/boost-lib/boost-cmake.git"
GIT_REPOSITORY "${git_protocol}://github.com/pocb/boost.git"
GIT_TAG "origin/cmake-${version}"
SOURCE_DIR ${proj}
BINARY_DIR ${proj}-build
Expand Down
19 changes: 16 additions & 3 deletions CMake/SuperBuild/External-FFMPEG.cmake
Expand Up @@ -9,21 +9,34 @@ IF( SUPER_SHARED_LIBS )
set( SHARED_FFMPEG --enable-shared )
ENDIF( SUPER_SHARED_LIBS )

OPTION( FFMPEG_GPL "Use a GPL version of FFMPEG" OFF )

SET(FFMPEG_GPL_FLAG "")

IF( FFMPEG_GPL )
SET(FFMPEG_GPL_FLAG "--enable-gpl")
SET(msg "ATTENTION: You have enabled the use of GPL components of FFMPEG.")
SET(msg "${msg} By enabling this option, the binary of GoFigure2")
SET(msg "${msg} that you are going to build will be covered by a GPL license.")
MESSAGE("${msg}")
ENDIF( FFMPEG_GPL )

SET(FFMPEG_INSTALL_DIR ${CMAKE_BINARY_DIR}/${proj}-install)

ExternalProject_Add(${proj}
# Set up dirs
SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
INSTALL_DIR ${FFMPEG_INSTALL_DIR}
# get the project
GIT_REPOSITORY "${git_protocol}://git.ffmpeg.org/ffmpeg.git"
GIT_REPOSITORY "${git_protocol}://git.videolan.org/ffmpeg.git"
GIT_TAG "ffmpeg-0.6.3"

# Build the project
BUILD_IN_SOURCE 1

# Configure step
# DO STH FOR THE ARCHITECTURE...
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${FFMPEG_INSTALL_DIR} ${SHARED_FFMPEG} --enable-gpl --enable-avfilter --disable-yasm --disable-decoders --disable-zlib --disable-demuxer=matroska
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${FFMPEG_INSTALL_DIR} ${SHARED_FFMPEG} ${FFMPEG_GPL_FLAG} --enable-avfilter --disable-yasm --disable-decoders --disable-zlib --disable-demuxer=matroska
)

# define the library suffix
Expand Down
11 changes: 9 additions & 2 deletions CMake/SuperBuild/External-ITK.cmake
Expand Up @@ -3,17 +3,24 @@

set(proj ITK)

if( WIN32 )
set( ITK_TAG "release" )
else()
set( ITK_TAG "2260c095f5809045a10d76cca0acee326502ac53" )
endif()

ExternalProject_Add(${proj}
GIT_REPOSITORY "${git_protocol}://itk.org/ITK.git"
GIT_TAG "v4.0a06"
GIT_TAG "${ITK_TAG}"
UPDATE_COMMAND ""
SOURCE_DIR ${proj}
BINARY_DIR ${proj}-build
CMAKE_GENERATOR ${gen}
CMAKE_ARGS
${ep_common_args}
-DITK_INSTALL_LIB_DIR:PATH=${GOFIGURE2_INSTALL_LIB_DIR}
-DITK_USE_REVIEW:BOOL=ON
# should change soon
-DITK_USE_REVIEW:INTERNAL=ON
INSTALL_COMMAND ""
DEPENDS
${ITK_DEPENDENCIES}
Expand Down
14 changes: 11 additions & 3 deletions CMakeLists.txt
Expand Up @@ -167,7 +167,6 @@ ELSE( SUPERBUILD )
#----------------------------------------------------------
# Then find ITK
#### ITK ####

INCLUDE( "${GOFIGURE2_SOURCE_DIR}/CMake/ConfigITK.cmake" )

#----------------------------------------------------------
Expand Down Expand Up @@ -203,8 +202,15 @@ ELSE( SUPERBUILD )
${GOFIGURE2_BINARY_DIR}/Code/
${GOFIGURE2_SOURCE_DIR}/Code/IO/
${GOFIGURE2_BINARY_DIR}/Code/IO/
${GOFIGURE2_SOURCE_DIR}/Code/IO/GoImage/
${GOFIGURE2_BINARY_DIR}/Code/IO/GoImage/
${GOFIGURE2_SOURCE_DIR}/Code/Filters/
${GOFIGURE2_BINARY_DIR}/Code/Filters/
${GOFIGURE2_SOURCE_DIR}/Code/Filters/Contour/
${GOFIGURE2_SOURCE_DIR}/Code/Filters/Mesh/
${GOFIGURE2_SOURCE_DIR}/Code/Filters/Mesh/Attributes/
${GOFIGURE2_SOURCE_DIR}/Code/Filters/Mesh/Split/
${GOFIGURE2_SOURCE_DIR}/Code/Filters/Mesh/Merge/
${GOFIGURE2_SOURCE_DIR}/Code/GUI/
${GOFIGURE2_BINARY_DIR}/Code/GUI/
${GOFIGURE2_SOURCE_DIR}/Code/GUI/lib/
Expand All @@ -218,6 +224,10 @@ ELSE( SUPERBUILD )
${GOFIGURE2_BINARY_DIR}/Code/GUI/lib/Video/
${GOFIGURE2_SOURCE_DIR}/Code/GUI/lib/Wizard/
${GOFIGURE2_BINARY_DIR}/Code/GUI/lib/Wizard/
${GOFIGURE2_SOURCE_DIR}/Code/GUI/lib/TraceEditing/
${GOFIGURE2_BINARY_DIR}/Code/GUI/lib/TraceEditing/
${GOFIGURE2_SOURCE_DIR}/Code/GUI/lib/TransferFunctionEditor/
${GOFIGURE2_BINARY_DIR}/Code/GUI/lib/TransferFunctionEditor/
${GOFIGURE2_SOURCE_DIR}/Interfaces/
${GOFIGURE2_BINARY_DIR}/Interfaces/
${GOFIGURE2_SOURCE_DIR}/Code/GUI/src/
Expand Down Expand Up @@ -323,6 +333,4 @@ ELSE( SUPERBUILD )
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/GOFIGURE2Uninstall.cmake"
)

INCLUDE( GOFIGURE2CPack.cmake )

ENDIF( SUPERBUILD )
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion Code/CMakeLists.txt
@@ -1,8 +1,10 @@
# add subdirectories
ADD_SUBDIRECTORY( ExternalCode )
ADD_SUBDIRECTORY( Database )
ADD_SUBDIRECTORY( IO )
ADD_SUBDIRECTORY( GUI )
ADD_SUBDIRECTORY( Filters )
ADD_SUBDIRECTORY( GUI )


FILE( GLOB __source_file_h "${CMAKE_CURRENT_SOURCE_DIR}/*.h" )

Expand Down
Expand Up @@ -153,4 +153,4 @@ ImageToVTKImageFilter< TInputImage >

} // end namespace itk

#endif
#endif
Expand Up @@ -133,22 +133,21 @@ void vtkFillImageWithPolyDataExecuteZ(vtkFillImageWithPolyData *self,
unsigned char *outPtr,
int id, int slice, double bbox[6])
{
int num0, num1, num2, numC, pixSize;
int idx0, idx1, idx2;
vtkIdType in1Inc0, in1Inc1, in1Inc2;
vtkIdType outInc0, outInc1, outInc2;
unsigned long count = 0;
unsigned long target;

numC = outData->GetNumberOfScalarComponents();
pixSize = numC * static_cast< int >( sizeof( T ) );
// numC = outData->GetNumberOfScalarComponents();
// pixSize = numC * static_cast< int >( sizeof( T ) );

// Get information to march through data
inData->GetContinuousIncrements(ext, in1Inc0, in1Inc1, in1Inc2);
outData->GetContinuousIncrements(ext, outInc0, outInc1, outInc2);
num0 = ext[1] - ext[0] + 1;
num1 = ext[3] - ext[2] + 1;
num2 = ext[5] - ext[4] + 1;
int num0 = ext[1] - ext[0] + 1;
int num1 = ext[3] - ext[2] + 1;
int num2 = ext[5] - ext[4] + 1;

double outVal = self->GetInsidePixelValue();

Expand Down Expand Up @@ -226,22 +225,21 @@ void vtkFillImageWithPolyDataExecuteY(vtkFillImageWithPolyData *self, int ext[6]
vtkImageData *outData, unsigned char *outPtr,
int id, int slice, double bbox[6])
{
int num0, num1, num2, numC;
int idx0, idx1, idx2;
vtkIdType in1Inc0, in1Inc1, in1Inc2;
vtkIdType outInc0, outInc1, outInc2;
unsigned long count = 0;
unsigned long target;

numC = outData->GetNumberOfScalarComponents();
// numC = outData->GetNumberOfScalarComponents();
// int pixSize = numC * static_cast<int>(sizeof(T));

// Get information to march through data
inData->GetContinuousIncrements(ext, in1Inc0, in1Inc1, in1Inc2);
outData->GetContinuousIncrements(ext, outInc0, outInc1, outInc2);
num0 = ext[1] - ext[0] + 1;
num1 = ext[3] - ext[2] + 1;
num2 = ext[5] - ext[4] + 1;
int num0 = ext[1] - ext[0] + 1;
int num1 = ext[3] - ext[2] + 1;
int num2 = ext[5] - ext[4] + 1;

vtkPoints *points = self->GetPolyData()->GetPoints();
vtkIdType numP = self->GetPolyData()->GetNumberOfPoints();
Expand Down Expand Up @@ -319,15 +317,15 @@ void vtkFillImageWithPolyDataExecuteX(vtkFillImageWithPolyData *self, int ext[6]
vtkImageData *outData, unsigned char *outPtr,
int id, int slice, double bbox[6])
{
int num0, num1, num2, numC, pixSize;
int num0, num1, num2;
int idx0, idx1, idx2;
vtkIdType in1Inc0, in1Inc1, in1Inc2;
vtkIdType outInc0, outInc1, outInc2;
unsigned long count = 0;
unsigned long target;

numC = outData->GetNumberOfScalarComponents();
pixSize = numC * static_cast< int >( sizeof( T ) );
// numC = outData->GetNumberOfScalarComponents();
// pixSize = numC * static_cast< int >( sizeof( T ) );

// Get information to march through data
inData->GetContinuousIncrements(ext, in1Inc0, in1Inc1, in1Inc2);
Expand Down Expand Up @@ -520,4 +518,4 @@ double vtkFillImageWithPolyData::Angle2D(const double dp1[2], const double dp2[2
}

return dt;
}
}

0 comments on commit 6e36fb7

Please sign in to comment.