Permalink
Browse files

ENH: Utilize new mattes with improved threading

The Mattes mutual information registration was not utilizing
multiple threads very well.  This patch addresses that problem.

Update ITK and SlicerExecutionModel to match.
  • Loading branch information...
1 parent 093661d commit 90c872f0c04317b0d4901427da633560747cebf6 @hjmjohnson hjmjohnson committed Jul 22, 2014
@@ -306,7 +306,9 @@ BRAINSFitHelper::Update(void)
{
typedef itk::MattesMutualInformationImageToImageMetricv4<FixedImageType, MovingImageType, FixedImageType, double> MIMetricType;
MIMetricType::Pointer mutualInformationMetric = MIMetricType::New();
- mutualInformationMetric->SetMaximumNumberOfThreads(std::min( 3U,itk::MultiThreader::GetGlobalDefaultNumberOfThreads() ) );
+ //The next line was a hack for early ITKv4 mattes mutual informaiton
+ //that was using a lot of memory
+ //mutualInformationMetric->SetMaximumNumberOfThreads(std::min( 3U,itk::MultiThreader::GetGlobalDefaultNumberOfThreads() ) );
mutualInformationMetric = mutualInformationMetric;
mutualInformationMetric->SetNumberOfHistogramBins( this->m_NumberOfHistogramBins );
mutualInformationMetric->SetUseMovingImageGradientFilter( gradientfilter );
@@ -0,0 +1 @@
+---
@@ -0,0 +1,3 @@
+Start testing: Jul 18 16:21 CDT
+----------------------------------------------------------
+End testing: Jul 18 16:21 CDT
@@ -37,8 +37,9 @@ if(NOT DEFINED ITK_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
set(git_protocol "git")
endif()
- set(${proj}_REPOSITORY ${git_protocol}://itk.org/ITK.git)
- set(${proj}_GIT_TAG 06d5bfec67805bfadb5dc344b08ab554381592c6 )
+ #set(${proj}_REPOSITORY ${git_protocol}://itk.org/ITK.git)
+ set(${proj}_REPOSITORY ${git_protocol}://github.com/BRAINSia/ITK.git
+ set(${proj}_GIT_TAG c123bf502918db7acb7b9afe5ba3fc5cd362b47e )
# message("COMMON_EXTERNAL_PROJECT_ARGS:
#${COMMON_EXTERNAL_PROJECT_ARGS}")
ExternalProject_Add(${proj}
@@ -33,7 +33,7 @@ if(NOT DEFINED SlicerExecutionModel_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM
ExternalProject_Add(${proj}
${${proj}_EP_ARGS}
GIT_REPOSITORY "${git_protocol}://github.com/Slicer/SlicerExecutionModel.git"
- GIT_TAG "ecb58ad73c5dcdebf8c4d46257c7e44a07a7cdd4"
+ GIT_TAG "feef59eae446e4881d7992b6a229b03731ccb8d1"
SOURCE_DIR ${SOURCE_DOWNLOAD_CACHE}/${proj}
BINARY_DIR ${proj}-build
CMAKE_ARGS -Wno-dev --no-warn-unused-cli
@@ -0,0 +1,3 @@
+Start testing: Jul 18 16:21 CDT
+----------------------------------------------------------
+End testing: Jul 18 16:21 CDT

0 comments on commit 90c872f

Please sign in to comment.