]> 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 769ca63..11a6255 100644 (file)
 #  include <windows.h>
 #endif
 
+#if ITK_VERSION_MAJOR < 4
+namespace itk
+{
+  typedef unsigned int ThreadIdType;
+}
+#endif
+
 //--------------------------------------------------------------------
 namespace clitk {
 
index 11797e7..0517224 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 15a5773..8e677b9 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 7de71a1..0b90558 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 befc882..af78d84 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 d66d819..d043c1a 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 e70d9c3..f0bf5a9 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 32d6bcc..bf97509 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 3ab61cb..aff2b12 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 7ea101a..aae8332 100644 (file)
@@ -95,7 +95,7 @@ protected:
 
 
   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
-                            int threadId );
+                            itk::ThreadIdType threadId );
   InputImageRegionType m_ExtractionRegion;
   OutputImageRegionType m_OutputImageRegion;
 
index 236a7cb..36cd3fd 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 c072b5d..37a76d6 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 2e517c9..6bda75e 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 32d31fe..de4d5ab 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 ced277b..dd047ba 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 5199d9e..b958c69 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 6aa822e..4ea8213 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 1e797bc..f3eac18 100644 (file)
@@ -93,7 +93,7 @@ protected:
 
 
   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
-                            int threadId );
+                            itk::ThreadIdType threadId );
   InputImageRegionType m_ExtractionRegion;
   OutputImageRegionType m_OutputImageRegion;
 
index d321f9e..7ce13a1 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 879f0ad..196ab02 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 fad326c..eeb61ff 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 83448af..1508994 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 e8d4c27..d1a89f9 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 65559c2..93a2ba9 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 643b802..147c6fb 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 a5788a9..3d4fbed 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 69a6df7..2700821 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 d45f49d..adac4f6 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 7cfe51e..54eedb8 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 9099ca4..efe9cba 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 acb0b1b..2eb0bc7 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 feaeaaf..f7b7f96 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 024b5c6..c48b1d1 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 8a4f051..206adac 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 c3e8bd3..dcb913e 100644 (file)
@@ -21,6 +21,7 @@
 
 // clitk
 #include "clitkIO.h"
+#include "clitkCommon.h"
 #include "clitkImageCommon.h"
 #include "clitkComposeVFFilter.h"
 
index cf5946e..f2288f0 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 909a422..018a8f7 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();