From: bharath Date: Fri, 9 Apr 2010 09:17:30 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: v1.2.0~729 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=2691ab3b136c618dd64f634507133e91e1a9c468;p=clitk.git *** empty log message *** --- diff --git a/common/clitkHisImageIO.h b/common/clitkHisImageIO.h index 1410aba..b9e70ae 100755 --- a/common/clitkHisImageIO.h +++ b/common/clitkHisImageIO.h @@ -69,7 +69,7 @@ namespace clitk { } // end namespace // explicit template instantiation -template class itk::CreateObjectFunction; +//template class itk::CreateObjectFunction; #endif /* end #define CLITKHISIMAGEIO_H */ diff --git a/common/clitkTimer.cxx b/common/clitkTimer.cxx index 7892cb6..89297f3 100644 --- a/common/clitkTimer.cxx +++ b/common/clitkTimer.cxx @@ -44,7 +44,7 @@ clitk::Timer::Timer() { //==================================================================== void clitk::Timer::Start() { -#if defined(unix) +#if defined(unix) || defined(__APPLE__) getrusage(RUSAGE_SELF, &mBegin); #elif defined(WIN32) QueryPerformanceCounter((LARGE_INTEGER*)&mBegin); @@ -55,7 +55,7 @@ void clitk::Timer::Start() { //==================================================================== void clitk::Timer::Stop(bool accumulate) { -#if defined(unix) +#if defined(unix) || defined (__APPLE__) getrusage(RUSAGE_SELF, &mEnd); if (accumulate) { mElapsed += (mEnd.ru_utime.tv_usec - mBegin.ru_utime.tv_usec)+ diff --git a/common/clitkTimer.h b/common/clitkTimer.h index 5f27490..2134f41 100644 --- a/common/clitkTimer.h +++ b/common/clitkTimer.h @@ -29,7 +29,7 @@ #include "clitkCommon.h" #include -#if defined(unix) +#if defined(unix) || defined(__APPLE__) # include # include #elif defined(WIN32) @@ -59,7 +59,7 @@ namespace clitk { //==================================================================== protected: -#if defined(unix) +#if defined(unix) || defined(__APPLE__) rusage mBegin; rusage mEnd; #elif defined(WIN32) diff --git a/common/clitkVfImageIO.h b/common/clitkVfImageIO.h index 197b168..3ee037f 100644 --- a/common/clitkVfImageIO.h +++ b/common/clitkVfImageIO.h @@ -80,7 +80,7 @@ namespace clitk { } // end namespace // explicit template instantiation -template class itk::CreateObjectFunction; +//template class itk::CreateObjectFunction; #endif /* end #define CLITKVFIMAGEIO_H */ diff --git a/common/clitkVoxImageIO.h b/common/clitkVoxImageIO.h index fece68c..ac53ebf 100644 --- a/common/clitkVoxImageIO.h +++ b/common/clitkVoxImageIO.h @@ -78,7 +78,7 @@ namespace clitk { } // end namespace // explicit template instantiation -template class itk::CreateObjectFunction; +//template class itk::CreateObjectFunction; #endif /* end #define CLITKVOXIMAGEIO_H */ diff --git a/common/clitkXdrImageIO.h b/common/clitkXdrImageIO.h index ce27d11..d145e06 100644 --- a/common/clitkXdrImageIO.h +++ b/common/clitkXdrImageIO.h @@ -73,9 +73,9 @@ public: protected: void ITKError(std::string funcName, int msgID); - void WriteImage(const char* file, char* headerinfo, char* headerfile, int raw, - int offset, char bLittleEndian, int iNkiCompression, - int wcoords, int append, int getsize, char *tobuffer, const void* data); + void WriteImage(const char* file, char* headerinfo, char* headerfile, int raw, + int offset, char bLittleEndian, int iNkiCompression, + int wcoords, int append, int getsize, char *tobuffer, const void* data); int m_HeaderSize; int forcenoswap; @@ -84,7 +84,7 @@ protected: } // end namespace // explicit template instantiation -template class itk::CreateObjectFunction; +//template class itk::CreateObjectFunction; #endif /* end #define CLITKXDRIMAGEIO_H */ diff --git a/common/clitkXdrImageIOWriter.cxx b/common/clitkXdrImageIOWriter.cxx index 9533c69..082d665 100755 --- a/common/clitkXdrImageIOWriter.cxx +++ b/common/clitkXdrImageIOWriter.cxx @@ -31,7 +31,7 @@ #include //From mbfield.h -#ifndef unix +#if !defined(unix) && !defined(__APPLE__) //#define _read readfix #endif #define AVSINT ptrdiff_t @@ -39,13 +39,14 @@ #define AVS_OK //From portdefs.h -#ifdef unix +#if defined(unix) || defined(__APPLE__) #define O_BINARY 0 #define setmode(a,b) 0 #endif #ifndef __LARGE__ -# if defined(__GNUC__) || defined(unix) +# if defined(__GNUC__) || defined(unix) || defined(__APPLE__) + typedef long long Q_INT64; typedef unsigned long long Q_UINT64; # define Q_INT64_CONST(x) (x##ll) @@ -94,7 +95,7 @@ void clitk::XdrImageIO::Write(const void* buffer) #include #include #include -#ifndef unix +#if !defined(unix) && !defined(__APPLE__) #include #endif #include diff --git a/filters/CMakeLists.txt b/filters/CMakeLists.txt index 89339ca..0a372c1 100644 --- a/filters/CMakeLists.txt +++ b/filters/CMakeLists.txt @@ -15,6 +15,7 @@ SET(clitkFilters_SRC clitkVFResampleGenericFilter.cxx clitkBinarizeImageGenericFilter.cxx clitkBinarizeImage_ggo.c + clitkMedianImageGenericFilter.cxx ) ADD_LIBRARY(clitkFilters STATIC ${clitkFilters_SRC}) diff --git a/filters/clitkBinarizeImageGenericFilter.txx b/filters/clitkBinarizeImageGenericFilter.txx index d0a8ced..2076e71 100644 --- a/filters/clitkBinarizeImageGenericFilter.txx +++ b/filters/clitkBinarizeImageGenericFilter.txx @@ -31,6 +31,8 @@ #include "itkBinaryThresholdImageFilter.h" #include "itkMaskImageFilter.h" #include "itkMaskNegatedImageFilter.h" +#include +#include namespace clitk { @@ -53,8 +55,11 @@ namespace clitk ADD_IMAGE_TYPE(Dim, char); ADD_IMAGE_TYPE(Dim, uchar); ADD_IMAGE_TYPE(Dim, short); + ADD_IMAGE_TYPE(Dim, ushort); ADD_IMAGE_TYPE(Dim, int); + ADD_IMAGE_TYPE(Dim, uint16); ADD_IMAGE_TYPE(Dim, float); + ADD_IMAGE_TYPE(Dim, double); } //-------------------------------------------------------------------- diff --git a/filters/clitkImageArithmGenericFilter.txx b/filters/clitkImageArithmGenericFilter.txx index b7804ff..60ddc08 100644 --- a/filters/clitkImageArithmGenericFilter.txx +++ b/filters/clitkImageArithmGenericFilter.txx @@ -40,7 +40,10 @@ namespace clitk ADD_IMAGE_TYPE(Dim, char); ADD_IMAGE_TYPE(Dim, uchar); ADD_IMAGE_TYPE(Dim, short); + ADD_IMAGE_TYPE(Dim, ushort); + ADD_IMAGE_TYPE(Dim, int); ADD_IMAGE_TYPE(Dim, float); + ADD_IMAGE_TYPE(Dim, double); } //-------------------------------------------------------------------- diff --git a/filters/clitkImageResampleGenericFilter.cxx b/filters/clitkImageResampleGenericFilter.cxx index 5dd2b8e..12670f5 100644 --- a/filters/clitkImageResampleGenericFilter.cxx +++ b/filters/clitkImageResampleGenericFilter.cxx @@ -60,11 +60,13 @@ clitk::ImageResampleGenericFilter::ImageResampleGenericFilter(): //-------------------------------------------------------------------- template void clitk::ImageResampleGenericFilter::InitializeImageTypeWithDim() { - ADD_IMAGE_TYPE(Dim, char); - ADD_IMAGE_TYPE(Dim, uchar); - ADD_IMAGE_TYPE(Dim, short); - ADD_IMAGE_TYPE(Dim, int); - ADD_IMAGE_TYPE(Dim, float); + ADD_IMAGE_TYPE(Dim, char); + ADD_IMAGE_TYPE(Dim, uchar); + ADD_IMAGE_TYPE(Dim, short); + ADD_IMAGE_TYPE(Dim, ushort); + ADD_IMAGE_TYPE(Dim, int); + ADD_IMAGE_TYPE(Dim, float); + ADD_IMAGE_TYPE(Dim, double); } //-------------------------------------------------------------------- diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index bd7eb8a..270cecc 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -79,3 +79,6 @@ TARGET_LINK_LIBRARIES(clitkImageArithm clitkCommon ITKIO ITKStatistics clitkFilt ADD_EXECUTABLE(clitkBinarizeImage clitkBinarizeImage.cxx) TARGET_LINK_LIBRARIES(clitkBinarizeImage clitkCommon ITKIO clitkFilters) + +ADD_EXECUTABLE(clitkMedianImageFilter clitkMedianImageFilter.cxx clitkMedianImageFilter_ggo.c) +TARGET_LINK_LIBRARIES(clitkMedianImageFilter clitkCommon ITKIO clitkFilters ITKBasicFilters) diff --git a/vv/CMakeLists.txt b/vv/CMakeLists.txt index 43d7d82..d74b2bb 100644 --- a/vv/CMakeLists.txt +++ b/vv/CMakeLists.txt @@ -103,6 +103,7 @@ SET(vv_SRCS vvToolManager.cxx vvToolCreatorBase.cxx vvToolWidgetBase.cxx + vvToolMedianFilter.cxx # vvToolFoo.cxx # vvToolFooWithWidgetBase.cxx vvToolCropImage.cxx @@ -139,6 +140,7 @@ QT4_WRAP_CPP(vv_SRCS vvToolCreatorBase.h # vvToolFoo.h # vvToolFooWithWidgetBase.h + vvToolMedianFilter.h vvToolBinarize.h vvToolSimpleInputSelectorWidget.h vvToolInputSelectorWidget.h @@ -171,6 +173,7 @@ QT4_WRAP_UI(vv_UI_CXX qt_ui/vvToolSimpleInputSelectorWidget.ui qt_ui/vvToolInputSelectorWidget.ui qt_ui/vvToolWidgetBase.ui + qt_ui/vvToolMedianFilter.ui # qt_ui/vvToolFoo.ui qt_ui/vvToolCropImage.ui qt_ui/vvToolBinarize.ui @@ -184,10 +187,11 @@ QT4_ADD_RESOURCES(vv_SRCS ${vvUI_RCCS}) #========================================================= #support for parallel deformable registration with OpenMP +IF(NOT __APPLE__) IF(CMAKE_COMPILER_IS_GNUCC) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp -march=native") ENDIF(CMAKE_COMPILER_IS_GNUCC) - +ENDIF(NOT __APPLE__) #========================================================= IF (CLITK_VV_USE_BDCM)