]> Creatis software - clitk.git/commitdiff
itkv4 migration use itk::ThreadIdType
authorVivien Delmon <vivien.delmon@creatis.insa-lyon.fr>
Fri, 18 Nov 2011 16:37:54 +0000 (17:37 +0100)
committerVivien Delmon <vivien.delmon@creatis.insa-lyon.fr>
Fri, 18 Nov 2011 16:37:54 +0000 (17:37 +0100)
- Add a typedef on unsigned int for itk 3.20 compatibility
- Use itk::ThreadIdType where needed

37 files changed:
common/clitkCommon.h
itk/RelativePositionPropImageFilter.h
itk/RelativePositionPropImageFilter.txx
itk/clitkBackProjectImageFilter.h
itk/clitkBackProjectImageFilter.txx
itk/clitkComposeVFFilter.h
itk/clitkComposeVFFilter.txx
itk/clitkDecomposeAndReconstructImageFilter.h
itk/clitkDecomposeThroughErosionImageFilter.h
itk/clitkExtractImageFilter.h
itk/clitkExtractImageFilter.txx
itk/clitkForwardWarpImageFilter.txx
itk/clitkInvertVFFilter.txx
itk/clitkReconstructThroughDilationImageFilter.h
itk/itkLabelOverlapMeasuresImageFilter.txx
registration/clitkDifferenceImageFilter.h
registration/clitkDifferenceImageFilter.txx
registration/clitkExtractImageFilter.h
registration/clitkExtractImageFilter.txx
registration/clitkLinearCombinationImageFilter.h
registration/clitkLinearCombinationImageFilter.txx
registration/clitkOptNormalizedCorrelationImageToImageMetric.h
registration/clitkOptNormalizedCorrelationImageToImageMetric.txx
registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.h
registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx
registration/clitkResampleBSplineDeformableTransformImageFilter.h
registration/clitkTransformToDeformationFieldSource.h
registration/clitkTransformToDeformationFieldSource.txx
registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.h
registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.txx
registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.h
registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.txx
tools/clitkCombineImageFilter.h
tools/clitkCombineImageFilter.txx
tools/clitkComposeVFGenericFilter.h
tools/clitkVectorImageToImageFilter.h
tools/clitkVectorImageToImageFilter.txx

index 769ca63f0bf4400cbb783cf53d3bd7b44b3fc293..11a6255955e8b2185c25b49334bd64158d58a8dc 100644 (file)
 #  include <windows.h>
 #endif
 
+#if ITK_VERSION_MAJOR < 4
+namespace itk
+{
+  typedef unsigned int ThreadIdType;
+}
+#endif
+
 //--------------------------------------------------------------------
 namespace clitk {
 
index 11797e78d72ed449edddafc67d1873f7b2a1a3d1..05172245ba70114bcf5e696bcc6fdac1e58ed7d3 100644 (file)
@@ -194,7 +194,7 @@ namespace itk
     virtual ~RelativePositionPropImageFilter() {}
     void PrintSelf(std::ostream& os, Indent indent) const;
 
-    //void GenerateThreadedData(const typename TOutputImage::RegionType& outputRegionForThread, int threadId);
+    //void GenerateThreadedData(const typename TOutputImage::RegionType& outputRegionForThread, ThreadIdType threadId);
     void GenerateData();
 
   private:
index 15a5773cd802648533cc96343ddd0b29f04cd736..8e677b9f38f67a2ce80bbeccb1dc742ad980e032 100644 (file)
@@ -82,7 +82,7 @@ namespace itk
   template< class TInputImage, class TOutputImage ,class TtNorm>
   void
   RelativePositionPropImageFilter< TInputImage, TOutputImage ,TtNorm>
-  //::GenerateThreadedData(const typename TOutputImage::RegionType& outputRegionForThread, int threadId)
+  //::GenerateThreadedData(const typename TOutputImage::RegionType& outputRegionForThread, ThreadIdType threadId)
   ::GenerateData()
   {
 
index 7de71a116111326f2bed06060af31bc165a6ecb5..0b905585e524f342c24925671f14e46b6d465323 100644 (file)
@@ -242,7 +242,7 @@ namespace clitk
     void BeforeThreadedGenerateData(void );
   
     // Threaded Generate Data
-    void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, int threadId );
+    void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, itk::ThreadIdType threadId );
 
  
     //------------------------------------------------
index befc8822013cb8543d7bbc0d3ece59b417f84b31..af78d849f80b1e1e66d9f131ee65dd939708e4d6 100644 (file)
@@ -303,7 +303,7 @@ namespace clitk
   template <class InputImageType, class OutputImageType>
   void 
   BackProjectImageFilter<InputImageType, OutputImageType>
-  ::ThreadedGenerateData( const OutputImageRegionType & outputRegionForThread,  int threadId )
+  ::ThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, itk::ThreadIdType threadId )
   {
     //Projection pointer
     InputImageConstPointer inputPtr=this->GetInput();
index d66d819b0c750b4a82447bd52877d09ce690030e..d043c1af00492abd7114946b28232a47e630e0a2 100644 (file)
@@ -75,7 +75,7 @@ namespace clitk
 
     //========================================================================================
     //Threaded execution should implement generate threaded data
-    void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId );
+    void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId );
   
     bool m_Verbose;
     PixelType m_EdgePaddingValue;
index e70d9c3f26dc8f74473fde3e677c584eba1b173a..f0bf5a9a7a159fd7183a14159f70244598dae809 100644 (file)
@@ -36,7 +36,7 @@ namespace clitk
   //=========================================================================================================================
   //update the output for the outputRegionForThread
   template<class InputImageType, class OutputImageType> 
-  void ComposeVFFilter<InputImageType, OutputImageType>::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId )
+  void ComposeVFFilter<InputImageType, OutputImageType>::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId )
   {
  
     //Get pointer to the output
index 32d6bccb1bfecc7e48c24642e153ed52cd997454..bf97509a7bc43beb32b4e3f955df26ca50aba4c8 100644 (file)
@@ -131,7 +131,7 @@ namespace clitk
 
     //     // Threaded Generate Data
     //     void BeforeThreadedGenerateData(void );
-    //     void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, int threadId );
+    //     void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId );
     //     void AfterThreadedGenerateData(void );
     //     // Override defaults
     //     virtual void GenerateInputRequestedRegion();
index 3ab61cbd141b02d815a58e1476caf48df8fef1bf..aff2b12231cafa321ce581199e8fc431d9e48983 100644 (file)
@@ -124,7 +124,7 @@ namespace clitk
 
     //     // Threaded Generate Data
     //     void BeforeThreadedGenerateData(void );
-    //     void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, int threadId );
+    //     void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId );
     //     void AfterThreadedGenerateData(void );
     //     // Override defaults
     //     virtual void GenerateInputRequestedRegion();
index 7ea101adc2edbaba0f74e4f9becaa6be367b9b13..aae8332e04109089474228ae767522fe735d2376 100644 (file)
@@ -95,7 +95,7 @@ protected:
 
 
   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
-                            int threadId );
+                            itk::ThreadIdType threadId );
   InputImageRegionType m_ExtractionRegion;
   OutputImageRegionType m_OutputImageRegion;
 
index 236a7cb0c1d3178eaa29eb999a264f79f99d3190..36cd3fd66be8ea0de8464d637aebc3665f89e5c9 100644 (file)
@@ -237,7 +237,7 @@ template <class TInputImage, class TOutputImage>
 void 
 ExtractImageFilter<TInputImage,TOutputImage>
 ::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
-                       int threadId)
+                       itk::ThreadIdType threadId)
 {
   itkDebugMacro(<<"Actually executing");
 
index c072b5d85abdf2660dfce34f5894d758a8939dfb..37a76d61996bd45769f40a82f47defcdcc24f501 100644 (file)
@@ -84,7 +84,7 @@ protected:
 
   //the actual processing
   void BeforeThreadedGenerateData();
-  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId );
+  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId );
 
   //member data
   typename  itk::Image< double, ImageDimension>::Pointer m_Weights;
@@ -124,7 +124,7 @@ void HelperClass1<InputImageType, OutputImageType, DeformationFieldType>::Before
 //=========================================================================================================================
 //update the output for the outputRegionForThread
 template<class InputImageType, class OutputImageType, class DeformationFieldType >
-void HelperClass1<InputImageType, OutputImageType, DeformationFieldType>::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId )
+void HelperClass1<InputImageType, OutputImageType, DeformationFieldType>::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId )
 {
 
   //Get pointer to the input
@@ -303,7 +303,7 @@ protected:
 
 
   //the actual processing
-  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId );
+  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId );
 
 
   //member data
@@ -330,7 +330,7 @@ HelperClass2<InputImageType, OutputImageType>::HelperClass2()
 //=========================================================================================================================
 //update the output for the outputRegionForThread
 template<class InputImageType, class OutputImageType > void
-HelperClass2<InputImageType, OutputImageType>::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId )
+HelperClass2<InputImageType, OutputImageType>::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId )
 {
 
   //Get pointer to the input
index 2e517c951199dc8e94078b2db4128fd2b2707375..6bda75eb0d2b65ba4a21b6f438862201c6fffd14 100644 (file)
@@ -74,7 +74,7 @@ protected:
 
   //the actual processing
   void BeforeThreadedGenerateData();
-  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId );
+  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId );
 
   //member data
   typename  WeightsImageType::Pointer m_Weights;
@@ -111,7 +111,7 @@ void HelperClass1<InputImageType, OutputImageType>::BeforeThreadedGenerateData()
 //=========================================================================================================================
 //update the output for the outputRegionForThread
 template<class InputImageType, class OutputImageType>
-void HelperClass1<InputImageType, OutputImageType>::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId )
+void HelperClass1<InputImageType, OutputImageType>::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId )
 {
 
   //Get pointer to the input
@@ -282,7 +282,7 @@ protected:
 
 
   //the actual processing
-  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId );
+  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId );
 
 
   //member data
@@ -308,7 +308,7 @@ template<class InputImageType, class OutputImageType > HelperClass2<InputImageTy
 
 //=========================================================================================================================
 //update the output for the outputRegionForThread
-template<class InputImageType, class OutputImageType > void HelperClass2<InputImageType, OutputImageType>::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId )
+template<class InputImageType, class OutputImageType > void HelperClass2<InputImageType, OutputImageType>::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId )
 {
 
   //Get pointer to the input
index 32d31fe51075bf235a8256d9d8066f38d7bf509a..de4d5abd636025ac777485e1748deacdb5755d3a 100644 (file)
@@ -115,7 +115,7 @@ namespace clitk
 
     //     // Threaded Generate Data
     //     void BeforeThreadedGenerateData(void );
-    //     void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, int threadId );
+    //     void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId );
     //     void AfterThreadedGenerateData(void );
     //     // Override defaults
     //     virtual void GenerateInputRequestedRegion();
index ced277b9b815265c8a25d628e16886305a14014b..dd047ba48f6ba65eccaeaabc2acacd05e0a1fe74 100644 (file)
@@ -145,7 +145,7 @@ template<class TLabelImage>
 void
 LabelOverlapMeasuresImageFilter<TLabelImage>
 ::ThreadedGenerateData( const RegionType& outputRegionForThread,
-  int threadId )
+  ThreadIdType threadId )
 {
   ImageRegionConstIterator<LabelImageType> ItS( this->GetSourceImage(),
     outputRegionForThread );
index 5199d9ee4a2ce07b6a32b5c0112c0449c6faf3de..b958c69cb31316445a99b0e2f3b239496d6485d5 100644 (file)
@@ -17,6 +17,7 @@
 ===========================================================================**/
 #ifndef __clitkDifferenceImageFilter_h
 #define __clitkDifferenceImageFilter_h
+#include "clitkCommon.h"
 #include "clitkImageCommon.h"
 
 //itk include
@@ -56,7 +57,7 @@ namespace clitk
   protected:
     DifferenceImageFilter();
     ~DifferenceImageFilter() {};
-    void ThreadedGenerateData(const OutputImageRegionType& threadRegion, int threadId);
+    void ThreadedGenerateData(const OutputImageRegionType& threadRegion, itk::ThreadIdType threadId);
     
        
   };
index 6aa822edd4b46d0658afffe7615d9d8f27e4bbea..4ea8213e66c29934acdfda99dff422c362dc15ee 100644 (file)
@@ -53,7 +53,7 @@ namespace clitk
   //=========================================================================================================================
   //Update
   template <class InputImageType, class OutputImageType> 
-  void DifferenceImageFilter<InputImageType, OutputImageType>::ThreadedGenerateData(const OutputImageRegionType &threadRegion, int threadId)
+  void DifferenceImageFilter<InputImageType, OutputImageType>::ThreadedGenerateData(const OutputImageRegionType &threadRegion, itk::ThreadIdType threadId)
   {
     //Pointers to input and output
     typename InputImageType::ConstPointer input1=this->GetInput(0);
index 1e797bcd63f76f868db0afbb04b39afb9469f1f7..f3eac186edef23f5cf85cdd0440a1e1faacf5d2d 100644 (file)
@@ -93,7 +93,7 @@ protected:
 
 
   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
-                            int threadId );
+                            itk::ThreadIdType threadId );
   InputImageRegionType m_ExtractionRegion;
   OutputImageRegionType m_OutputImageRegion;
 
index d321f9ef413d2b03dd2330db7e246f01274d02cd..7ce13a11054062cf4bccb487593c752a8ff3971e 100644 (file)
@@ -236,7 +236,7 @@ template <class TInputImage, class TOutputImage>
 void 
 ExtractImageFilter<TInputImage,TOutputImage>
 ::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
-                       int threadId)
+                       itk::ThreadIdType threadId)
 {
   itkDebugMacro(<<"Actually executing");
 
index 879f0ad45eb30fcd797ff319a11d71ffeff89f6c..196ab02f7fb3e12e8cd79ca4eca4072cfc367a31 100644 (file)
@@ -73,7 +73,7 @@ namespace clitk
     LinearCombinationImageFilter();
     virtual ~LinearCombinationImageFilter(){};
 
-    virtual void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId);
+    virtual void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId);
     
   private:
     LinearCombinationImageFilter(const Self&); //purposely not implemented
index fad326cf9dd624bc94eac0c82c882a0288ac39a2..eeb61ff46ddb599a47af5f883a22bce113479f34 100644 (file)
@@ -71,7 +71,7 @@ namespace clitk
   template <class InputImageType, class OutputImageType> 
   void 
   LinearCombinationImageFilter<InputImageType, OutputImageType>
-  ::ThreadedGenerateData(const OutputImageRegionType &threadRegion, int threadId)
+  ::ThreadedGenerateData(const OutputImageRegionType &threadRegion, itk::ThreadIdType threadId)
   {
     //Pointers to input and output
     typename InputImageType::ConstPointer input1=this->GetInput(0);
index 83448afee1ea403bda7ba1dbe83553f5272d89c5..150899409faf56b97c5673b08697a6ade386d9f5 100644 (file)
@@ -130,13 +130,13 @@ private:
   MeasureType ComputeSums( const ParametersType & parameters ) const;
 
 
-  inline bool GetValueThreadProcessSample( unsigned int threadID,
+  inline bool GetValueThreadProcessSample( itk::ThreadIdType threadID,
       unsigned long fixedImageSample,
       const MovingImagePointType & mappedPoint,
       double movingImageValue ) const;
 
 
-  inline bool GetValueAndDerivativeThreadProcessSample( unsigned int threadID,
+  inline bool GetValueAndDerivativeThreadProcessSample( itk::ThreadIdType threadID,
       unsigned long fixedImageSample,
       const MovingImagePointType & mappedPoint,
       double movingImageValue,
index e8d4c271316e9b735b1657cfec59203a65222fe8..d1a89f9646aed937205fa639c9269812e1d4e199 100644 (file)
@@ -159,7 +159,7 @@ NormalizedCorrelationImageToImageMetric<TFixedImage,TMovingImage>
     delete [] m_ThreaderDerivativeF;
   }
   m_ThreaderDerivativeF = new DerivativeType[this->m_NumberOfThreads];
-  for(unsigned int threadID=0; threadID<this->m_NumberOfThreads; threadID++) {
+  for(itk::ThreadIdType threadID=0; threadID<this->m_NumberOfThreads; threadID++) {
     m_ThreaderDerivativeF[threadID].SetSize( this->m_NumberOfParameters );
   }
 
@@ -167,7 +167,7 @@ NormalizedCorrelationImageToImageMetric<TFixedImage,TMovingImage>
     delete [] m_ThreaderDerivativeM;
   }
   m_ThreaderDerivativeM = new DerivativeType[this->m_NumberOfThreads];
-  for(unsigned int threadID=0; threadID<this->m_NumberOfThreads; threadID++) {
+  for(itk::ThreadIdType threadID=0; threadID<this->m_NumberOfThreads; threadID++) {
     m_ThreaderDerivativeM[threadID].SetSize( this->m_NumberOfParameters );
   }
 }
@@ -177,7 +177,7 @@ template < class TFixedImage, class TMovingImage  >
 inline bool
 NormalizedCorrelationImageToImageMetric<TFixedImage,TMovingImage>
 ::GetValueThreadProcessSample(
-  unsigned int threadID,
+  itk::ThreadIdType threadID,
   unsigned long fixedImageSample,
   const MovingImagePointType & itkNotUsed(mappedPoint),
   double movingImageValue) const
@@ -354,7 +354,7 @@ template < class TFixedImage, class TMovingImage  >
 inline bool
 NormalizedCorrelationImageToImageMetric<TFixedImage,TMovingImage>
 ::GetValueAndDerivativeThreadProcessSample(
-  unsigned int threadID,
+  itk::ThreadIdType threadID,
   unsigned long fixedImageSample,
   const MovingImagePointType & itkNotUsed(mappedPoint),
   double movingImageValue,
@@ -440,7 +440,7 @@ NormalizedCorrelationImageToImageMetric<TFixedImage,TMovingImage>
           0,
           this->m_NumberOfParameters * sizeof(typename DerivativeType::ValueType) );
 
-  for( unsigned int threadID = 0; threadID<this->m_NumberOfThreads; threadID++ ) {
+  for( itk::ThreadIdType threadID = 0; threadID<this->m_NumberOfThreads; threadID++ ) {
     memset( m_ThreaderDerivativeF[threadID].data_block(),
             0,
             this->m_NumberOfParameters * sizeof(typename DerivativeType::ValueType) );
index 65559c2fcbb9d94b705ed7eb5c87c1bc234875df..93a2ba919b005fbea9b9ce9e1691ab5ddbc9ac94 100644 (file)
@@ -130,13 +130,13 @@ private:
   MeasureType ComputeSums( const ParametersType & parameters ) const;
 
 
-  inline bool GetValueThreadProcessSample( unsigned int threadID,
+  inline bool GetValueThreadProcessSample( ThreadIdType threadID,
       unsigned long fixedImageSample,
       const MovingImagePointType & mappedPoint,
       double movingImageValue ) const;
 
 
-  inline bool GetValueAndDerivativeThreadProcessSample( unsigned int threadID,
+  inline bool GetValueAndDerivativeThreadProcessSample( ThreadIdType threadID,
       unsigned long fixedImageSample,
       const MovingImagePointType & mappedPoint,
       double movingImageValue,
index 643b8020f751979f3a6abd5ebf5e4d2cbe2d8fca..147c6fbcbb2252259209c6799ea645b9e20dcaf8 100644 (file)
@@ -159,7 +159,7 @@ NormalizedCorrelationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
     delete [] m_ThreaderDerivativeF;
   }
   m_ThreaderDerivativeF = new DerivativeType[this->m_NumberOfThreads];
-  for(unsigned int threadID=0; threadID<this->m_NumberOfThreads; threadID++) {
+  for(ThreadIdType threadID=0; threadID<this->m_NumberOfThreads; threadID++) {
     m_ThreaderDerivativeF[threadID].SetSize( this->m_NumberOfParameters );
   }
 
@@ -167,7 +167,7 @@ NormalizedCorrelationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
     delete [] m_ThreaderDerivativeM;
   }
   m_ThreaderDerivativeM = new DerivativeType[this->m_NumberOfThreads];
-  for(unsigned int threadID=0; threadID<this->m_NumberOfThreads; threadID++) {
+  for(ThreadIdType threadID=0; threadID<this->m_NumberOfThreads; threadID++) {
     m_ThreaderDerivativeM[threadID].SetSize( this->m_NumberOfParameters );
   }
 }
@@ -177,7 +177,7 @@ template < class TFixedImage, class TMovingImage  >
 inline bool
 NormalizedCorrelationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
 ::GetValueThreadProcessSample(
-  unsigned int threadID,
+  ThreadIdType threadID,
   unsigned long fixedImageSample,
   const MovingImagePointType & itkNotUsed(mappedPoint),
   double movingImageValue) const
@@ -354,7 +354,7 @@ template < class TFixedImage, class TMovingImage  >
 inline bool
 NormalizedCorrelationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
 ::GetValueAndDerivativeThreadProcessSample(
-  unsigned int threadID,
+  ThreadIdType threadID,
   unsigned long fixedImageSample,
   const MovingImagePointType & itkNotUsed(mappedPoint),
   double movingImageValue,
@@ -464,7 +464,7 @@ NormalizedCorrelationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
           0,
           this->m_NumberOfParameters * sizeof(typename DerivativeType::ValueType) );
 
-  for( unsigned int threadID = 0; threadID<this->m_NumberOfThreads; threadID++ ) {
+  for( ThreadIdType threadID = 0; threadID<this->m_NumberOfThreads; threadID++ ) {
     memset( m_ThreaderDerivativeF[threadID].data_block(),
             0,
             this->m_NumberOfParameters * sizeof(typename DerivativeType::ValueType) );
index a5788a9f4bba1af6fafc4f6ad6077ee043b86571..3d4fbedbc9852a6abadd70a9aefda1bce0d0c6e8 100644 (file)
@@ -133,7 +133,7 @@ namespace clitk
     void GenerateData(void);
     //     // Threaded Generate Data
     //     void BeforeThreadedGenerateData(void );
-    //     void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, int threadId );
+    //     void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId );
     //     void AfterThreadedGenerateData(void );
     //     // Override defaults
     //     virtual void GenerateInputRequestedRegion();
index 69a6df7ea6c63864261e9d969bc1af6c712cd7f8..27008216cb18439aeb4060c88451009fa14b7645 100644 (file)
@@ -184,21 +184,21 @@ protected:
    */
   void ThreadedGenerateData(
     const OutputImageRegionType & outputRegionForThread,
-    int threadId );
+    itk::ThreadIdType threadId );
 
   /** Default implementation for resampling that works for any
    * transformation type.
    */
   void NonlinearThreadedGenerateData(
     const OutputImageRegionType& outputRegionForThread,
-    int threadId );
+    itk::ThreadIdType threadId );
 
   /** Faster implementation for resampling that works for with linear
    *  transformation types. 
    */
   void LinearThreadedGenerateData(
     const OutputImageRegionType & outputRegionForThread,
-    int threadId );
+    itk::ThreadIdType threadId );
   
 private:
 
index d45f49d33f1fa32f6528b88e57b7fe6d3d2b32f7..adac4f6f0e41e8103f73a14abc70c3f73da43b6d 100644 (file)
@@ -182,7 +182,7 @@ void
 TransformToDeformationFieldSource<TOutputImage, TTransformPrecisionType>
   ::ThreadedGenerateData(
   const OutputImageRegionType & outputRegionForThread,
-  int threadId )
+  itk::ThreadIdType threadId )
 {
   // Check whether we can use a fast path for resampling. Fast path
   // can be used if the transformation is linear. Transform respond
@@ -203,7 +203,7 @@ void
 TransformToDeformationFieldSource<TOutputImage, TTransformPrecisionType>
   ::NonlinearThreadedGenerateData(
   const OutputImageRegionType & outputRegionForThread,
-  int threadId )
+  itk::ThreadIdType threadId )
 {
   // Get the output pointer
   OutputImagePointer outputPtr = this->GetOutput();
@@ -253,7 +253,7 @@ void
 TransformToDeformationFieldSource<TOutputImage, TTransformPrecisionType>
   ::LinearThreadedGenerateData(
   const OutputImageRegionType & outputRegionForThread,
-  int threadId )
+  itk::ThreadIdType threadId )
 {
   // Get the output pointer
   OutputImagePointer outputPtr = this->GetOutput();
index 7cfe51e203aa30af2ef6c6c65c8bc2a3e03369e6..54eedb8deb23ec5cb59d4f40e542906c4f2b651d 100644 (file)
@@ -313,7 +313,7 @@ private:
     FixedImageSampleContainer & samples );
 
   /** Compute PDF derivative contribution for each parameter. */
-  virtual void ComputePDFDerivatives( unsigned int threadID,
+  virtual void ComputePDFDerivatives( ThreadIdType threadID,
                                       unsigned int sampleNumber,
                                       int movingImageParzenWindowIndex,
                                       const ImageDerivativesType
@@ -333,26 +333,26 @@ private:
   mutable bool                                  m_ImplicitDerivativesSecondPass;
 
 
-  virtual inline void GetValueThreadPreProcess( unsigned int threadID,
+  virtual inline void GetValueThreadPreProcess( ThreadIdType threadID,
       bool withinSampleThread ) const;
-  virtual inline bool GetValueThreadProcessSample( unsigned int threadID,
+  virtual inline bool GetValueThreadProcessSample( ThreadIdType threadID,
       unsigned long fixedImageSample,
       const MovingImagePointType & mappedPoint,
       double movingImageValue ) const;
-  virtual inline void GetValueThreadPostProcess( unsigned int threadID,
+  virtual inline void GetValueThreadPostProcess( ThreadIdType threadID,
       bool withinSampleThread ) const;
 
   virtual inline void GetValueAndDerivativeThreadPreProcess(
-    unsigned int threadID,
+    ThreadIdType threadID,
     bool withinSampleThread ) const;
-  virtual inline bool GetValueAndDerivativeThreadProcessSample( unsigned int threadID,
+  virtual inline bool GetValueAndDerivativeThreadProcessSample( ThreadIdType threadID,
       unsigned long fixedImageSample,
       const MovingImagePointType & mappedPoint,
       double movingImageValue,
       const ImageDerivativesType &
       movingImageGradientValue ) const;
   virtual inline void GetValueAndDerivativeThreadPostProcess(
-    unsigned int threadID,
+    ThreadIdType threadID,
     bool withinSampleThread ) const;
 
 };
index 9099ca46fb72876dc3e4a120f71d65ed6ea2e82c..efe9cba383476068a521e6f0edaa8e8c4bc81064 100644 (file)
@@ -386,7 +386,7 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
   }
   m_ThreaderJointPDFSum = new double[this->m_NumberOfThreads];
 
-  unsigned int threadID;
+  ThreadIdType threadID;
 
   int binRange = m_NumberOfHistogramBins / this->m_NumberOfThreads;
 
@@ -473,7 +473,7 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
 template < class TFixedImage, class TMovingImage  >
 inline void
 MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
-::GetValueThreadPreProcess( unsigned int threadID,
+::GetValueThreadPreProcess( ThreadIdType threadID,
                             bool withinSampleThread ) const
 {
 
@@ -501,7 +501,7 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
 template < class TFixedImage, class TMovingImage  >
 inline bool
 MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
-::GetValueThreadProcessSample( unsigned int threadID,
+::GetValueThreadProcessSample( ThreadIdType threadID,
                                unsigned long fixedImageSample,
                                const MovingImagePointType & itkNotUsed(mappedPoint),
                                double movingImageValue) const
@@ -576,7 +576,7 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
 template < class TFixedImage, class TMovingImage  >
 inline void
 MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
-::GetValueThreadPostProcess( unsigned int threadID,
+::GetValueThreadPostProcess( ThreadIdType threadID,
                              bool itkNotUsed(withinSampleThread) ) const
 {
   unsigned int t;
@@ -638,7 +638,7 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
   // MUST BE CALLED TO INITIATE PROCESSING
   this->GetValueMultiThreadedPostProcessInitiate();
 
-  for(unsigned int threadID = 0; threadID<this->m_NumberOfThreads-1; threadID++) {
+  for(ThreadIdType threadID = 0; threadID<this->m_NumberOfThreads-1; threadID++) {
     m_JointPDFSum += m_ThreaderJointPDFSum[threadID];
   }
   if ( m_JointPDFSum == 0.0 ) {
@@ -720,7 +720,7 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
 template < class TFixedImage, class TMovingImage  >
 inline void
 MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
-::GetValueAndDerivativeThreadPreProcess( unsigned int threadID,
+::GetValueAndDerivativeThreadPreProcess( ThreadIdType threadID,
     bool itkNotUsed(withinSampleThread) ) const
 {
   if(threadID > 0) {
@@ -757,7 +757,7 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
 template < class TFixedImage, class TMovingImage  >
 inline bool
 MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
-::GetValueAndDerivativeThreadProcessSample( unsigned int threadID,
+::GetValueAndDerivativeThreadProcessSample( ThreadIdType threadID,
     unsigned long fixedImageSample,
     const MovingImagePointType & itkNotUsed(mappedPoint),
     double movingImageValue,
@@ -864,7 +864,7 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
 template < class TFixedImage, class TMovingImage  >
 inline void
 MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
-::GetValueAndDerivativeThreadPostProcess( unsigned int threadID,
+::GetValueAndDerivativeThreadPostProcess( ThreadIdType threadID,
     bool withinSampleThread ) const
 {
   this->GetValueThreadPostProcess( threadID, withinSampleThread );
@@ -931,7 +931,7 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
   } else {
     this->m_PRatioArray.Fill( 0.0 );
     this->m_MetricDerivative.Fill( NumericTraits< MeasureType >::Zero );
-    for(unsigned int threadID = 0; threadID < this->m_NumberOfThreads-1; threadID++ ) {
+    for(ThreadIdType threadID = 0; threadID < this->m_NumberOfThreads-1; threadID++ ) {
       this->m_ThreaderMetricDerivative[threadID].Fill( NumericTraits< MeasureType >::Zero );
     }
     this->m_ImplicitDerivativesSecondPass = false;
@@ -947,7 +947,7 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
   // CALL IF DOING THREADED POST PROCESSING
   this->GetValueAndDerivativeMultiThreadedPostProcessInitiate();
 
-  for(unsigned int threadID = 0; threadID<this->m_NumberOfThreads-1; threadID++) {
+  for(ThreadIdType threadID = 0; threadID<this->m_NumberOfThreads-1; threadID++) {
     m_JointPDFSum += m_ThreaderJointPDFSum[threadID];
   }
   if ( m_JointPDFSum == 0.0 ) {
@@ -1091,7 +1091,7 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
 template < class TFixedImage, class TMovingImage >
 void
 MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
-::ComputePDFDerivatives( unsigned int threadID,
+::ComputePDFDerivatives( ThreadIdType threadID,
                          unsigned int sampleNumber,
                          int pdfMovingIndex,
                          const ImageDerivativesType & movingImageGradientValue,
index acb0b1b3aa4065be0e402fda51a3ecc0dabea788..2eb0bc79aa4030d16ff5fe2f3218cf16d8f71d27 100644 (file)
@@ -129,12 +129,12 @@ private:
   //purposely not implemented
   void operator=(const Self &);
 
-  inline bool GetValueThreadProcessSample( unsigned int threadID,
+  inline bool GetValueThreadProcessSample( ThreadIdType threadID,
       unsigned long fixedImageSample,
       const MovingImagePointType & mappedPoint,
       double movingImageValue ) const;
 
-  inline bool GetValueAndDerivativeThreadProcessSample( unsigned int threadID,
+  inline bool GetValueAndDerivativeThreadProcessSample( ThreadIdType threadID,
       unsigned long fixedImageSample,
       const MovingImagePointType & mappedPoint,
       double movingImageValue,
index feaeaaff1f0370ad233ac40c18e79daccbe3c1f2..f7b7f96adf2ec59be116c0672e2c04db3926442a 100644 (file)
@@ -115,7 +115,7 @@ MeanSquaresImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
     delete [] m_ThreaderMSEDerivatives;
   }
   m_ThreaderMSEDerivatives = new DerivativeType[this->m_NumberOfThreads];
-  for(unsigned int threadID=0; threadID<this->m_NumberOfThreads; threadID++) {
+  for(ThreadIdType threadID=0; threadID<this->m_NumberOfThreads; threadID++) {
     m_ThreaderMSEDerivatives[threadID].SetSize( this->m_NumberOfParameters );
   }
 }
@@ -123,7 +123,7 @@ MeanSquaresImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
 template < class TFixedImage, class TMovingImage  >
 inline bool
 MeanSquaresImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
-::GetValueThreadProcessSample( unsigned int threadID,
+::GetValueThreadProcessSample( ThreadIdType threadID,
                                unsigned long fixedImageSample,
                                const MovingImagePointType & itkNotUsed(mappedPoint),
                                double movingImageValue) const
@@ -184,7 +184,7 @@ MeanSquaresImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
 template < class TFixedImage, class TMovingImage  >
 inline bool
 MeanSquaresImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
-::GetValueAndDerivativeThreadProcessSample( unsigned int threadID,
+::GetValueAndDerivativeThreadProcessSample( ThreadIdType threadID,
     unsigned long fixedImageSample,
     const MovingImagePointType & itkNotUsed(mappedPoint),
     double movingImageValue,
@@ -270,7 +270,7 @@ MeanSquaresImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
           0,
           this->m_NumberOfParameters * sizeof(double) );
 
-  for( unsigned int threadID = 0; threadID<this->m_NumberOfThreads; threadID++ ) {
+  for( ThreadIdType threadID = 0; threadID<this->m_NumberOfThreads; threadID++ ) {
     memset( m_ThreaderMSEDerivatives[threadID].data_block(),
             0,
             this->m_NumberOfParameters * sizeof(double) );
index 024b5c6ae2ce8e61817c1741b96774f797bc8bc5..c48b1d188fbf0aaf20ec15b796f9d70f7bc203b2 100644 (file)
@@ -90,7 +90,7 @@ namespace clitk
     // Update
     //----------------------------------------  
     // Generate Data
-    void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, int threadId);
+    void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, itk::ThreadIdType threadId);
 
     //----------------------------------------  
     // Data members
index 8a4f0514e39a9ac82b8ddcaa5de6d12f9ce72add..206adac7ad7a7cb65befa6f6866b4076b540f9d6 100644 (file)
@@ -46,7 +46,7 @@ namespace clitk
   //-------------------------------------------------------------------
   template<class InputImageType> 
   void 
-  CombineImageFilter<InputImageType>::ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, int threadId)
+  CombineImageFilter<InputImageType>::ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, itk::ThreadIdType threadId)
   {
     typename InputImageType::ConstPointer input1=this->GetInput(0);
     typename InputImageType::ConstPointer input2=this->GetInput(1);
index c3e8bd38fb237ac709fe8c1efd25750a08909d27..dcb913e0841bb775d62cedf53fd099ebe9c60cf8 100644 (file)
@@ -21,6 +21,7 @@
 
 // clitk
 #include "clitkIO.h"
+#include "clitkCommon.h"
 #include "clitkImageCommon.h"
 #include "clitkComposeVFFilter.h"
 
index cf5946e3849e4adac4fd5ed3d74a3c02422f33d5..f2288f0381de2295dc6d4dc6c67fe00afeb010b6 100644 (file)
@@ -86,7 +86,7 @@ namespace clitk
     //----------------------------------------  
     // Update
     //----------------------------------------  
-    void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, int threadId );
+    void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, itk::ThreadIdType threadId );
    
     //----------------------------------------  
     // Data members
index 909a42290e3a84ba556889972f24d5f93eceb718..018a8f7238473c4a1132e978bcb94fc2c6fe37b1 100644 (file)
@@ -47,7 +47,7 @@ namespace clitk
   //-------------------------------------------------------------------
   template<class InputImageType, class  OutputImageType> 
   void 
-  VectorImageToImageFilter<InputImageType, OutputImageType>::ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, int threadId)
+  VectorImageToImageFilter<InputImageType, OutputImageType>::ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, itk::ThreadIdType threadId)
   {
     // Iterators
     typename OutputImageType::Pointer output=this->GetOutput();