]> Creatis software - clitk.git/commitdiff
*** empty log message ***
authorbharath <bharath>
Fri, 9 Apr 2010 09:17:30 +0000 (09:17 +0000)
committerbharath <bharath>
Fri, 9 Apr 2010 09:17:30 +0000 (09:17 +0000)
13 files changed:
common/clitkHisImageIO.h
common/clitkTimer.cxx
common/clitkTimer.h
common/clitkVfImageIO.h
common/clitkVoxImageIO.h
common/clitkXdrImageIO.h
common/clitkXdrImageIOWriter.cxx
filters/CMakeLists.txt
filters/clitkBinarizeImageGenericFilter.txx
filters/clitkImageArithmGenericFilter.txx
filters/clitkImageResampleGenericFilter.cxx
tools/CMakeLists.txt
vv/CMakeLists.txt

index 1410aba11776059a521ac94f7e146b9c22570fb6..b9e70ae5130dc2576fd16098e776b53224ccdbe5 100755 (executable)
@@ -69,7 +69,7 @@ namespace clitk {
 } // end namespace
 
   // explicit template instantiation
-template class itk::CreateObjectFunction<clitk::HisImageIO>;
+//template class itk::CreateObjectFunction<clitk::HisImageIO>;
 
 #endif /* end #define CLITKHISIMAGEIO_H */
 
index 7892cb62768f5c43e40335d6f0ab63e1a2155916..89297f3088ae88f1511cd231ca2026ac0d856a6b 100644 (file)
@@ -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)+
index 5f27490f6613a475dbbef36088db9baef3607840..2134f41ba865390e3921ff06b1d3133cf84a478b 100644 (file)
@@ -29,7 +29,7 @@
 
 #include "clitkCommon.h"
 #include <ctime> 
-#if defined(unix)
+#if defined(unix) || defined(__APPLE__)
 #  include <sys/time.h>
 #  include <sys/resource.h>
 #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)
index 197b1688d398f7150c0563cdc7f6f51e602ac8a6..3ee037f3b7ba9ff1089fb47ca69447ed81e6bee3 100644 (file)
@@ -80,7 +80,7 @@ namespace clitk {
 } // end namespace
 
   // explicit template instantiation
-template class itk::CreateObjectFunction<clitk::VfImageIO>;
+//template class itk::CreateObjectFunction<clitk::VfImageIO>;
 
 #endif /* end #define CLITKVFIMAGEIO_H */
 
index fece68cf193a9f022bfe86f912642c1ccc4545af..ac53ebfd99d7bb30e62129801b3feb07b0e55cdf 100644 (file)
@@ -78,7 +78,7 @@ namespace clitk {
 } // end namespace
 
   // explicit template instantiation
-template class itk::CreateObjectFunction<clitk::VoxImageIO>;
+//template class itk::CreateObjectFunction<clitk::VoxImageIO>;
 
 #endif /* end #define CLITKVOXIMAGEIO_H */
 
index ce27d11f66fab412236ae4ea955a918707f7133f..d145e063cd122590b4eb85c30288d40836916288 100644 (file)
@@ -73,9 +73,9 @@ public:
 
 protected:
     void ITKError(std::string funcName, int msgID);
-    void WriteImage(const char* file, char* headerinfo, char* headerfile, int raw,\r
-                    int offset, char bLittleEndian, int iNkiCompression,\r
-                    int wcoords, int append, int getsize, char *tobuffer, const void* data);\r
+    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<clitk::XdrImageIO>;
+//template class itk::CreateObjectFunction<clitk::XdrImageIO>;
 
 #endif /* end #define CLITKXDRIMAGEIO_H */
 
index 9533c69edb449e77563dcc06b93c1fd0ae914b13..082d6656ae4d2d50980c2175474ce4d0c61c92e8 100755 (executable)
@@ -31,7 +31,7 @@
 #include <sys/stat.h>
 
 //From mbfield.h
-#ifndef unix
+#if !defined(unix) && !defined(__APPLE__)
 //#define _read  readfix
 #endif
 #define AVSINT ptrdiff_t
 #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 <math.h>
 #include <stdlib.h>
 #include <limits.h>
-#ifndef unix
+#if !defined(unix) && !defined(__APPLE__)
 #include <io.h>
 #endif
 #include <fcntl.h>
index 89339caf09054a18e4d008ef3ce11a9c7bdb245b..0a372c149244316c835ebe8800a1b1f695ee2559 100644 (file)
@@ -15,6 +15,7 @@ SET(clitkFilters_SRC
   clitkVFResampleGenericFilter.cxx
   clitkBinarizeImageGenericFilter.cxx
   clitkBinarizeImage_ggo.c
+ clitkMedianImageGenericFilter.cxx
   )  
 
 ADD_LIBRARY(clitkFilters STATIC ${clitkFilters_SRC})
index d0a8ced64ad87c6935bfc816823dc7c125b5c1fc..2076e71e4204527e347aae4b268ca36b6ebaac4b 100644 (file)
@@ -31,6 +31,8 @@
 #include "itkBinaryThresholdImageFilter.h"
 #include "itkMaskImageFilter.h"
 #include "itkMaskNegatedImageFilter.h"
+#include <clitkCommon.h>
+#include <tiff.h>
 
 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);
   }
   //--------------------------------------------------------------------
   
index b7804ffdbc1ade1a3603c5bd4455fc9c58168056..60ddc084877ecca8c98607cc8da6e5878e47b505 100644 (file)
@@ -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);
   }
   //--------------------------------------------------------------------
 
index 5dd2b8e44e06d9cc3d6d1cfed99f4ce1084a465e..12670f5484a3db3dac853e45bbb74d28f69897fa 100644 (file)
@@ -60,11 +60,13 @@ clitk::ImageResampleGenericFilter::ImageResampleGenericFilter():
 //--------------------------------------------------------------------
 template<unsigned int Dim>
 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);
 }
 //--------------------------------------------------------------------
 
index bd7eb8a2f03154c83878bff2bbfe37f687b78a9e..270ceccfb56eca3c8600345c5ed0564353f6a446 100644 (file)
@@ -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)
index 43d7d82f52fd2e8d72e5d0db32b7eacb54990bb0..d74b2bbf44368236c019af964bf3eb6c2b60a475 100644 (file)
@@ -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)