From: Vivien Delmon Date: Mon, 12 Dec 2011 17:07:11 +0000 (+0100) Subject: Revert "itkv4 migration use itk::ThreadIdType" X-Git-Tag: v1.3.0~146 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=1eaa43a8aa678f784fd0f4b587d45c1435285214;p=clitk.git Revert "itkv4 migration use itk::ThreadIdType" This reverts commit a6957c4825e83c61b977ec316dd841878617ffbd. --- diff --git a/common/clitkCommon.h b/common/clitkCommon.h index 11a6255..769ca63 100644 --- a/common/clitkCommon.h +++ b/common/clitkCommon.h @@ -42,13 +42,6 @@ # include #endif -#if ITK_VERSION_MAJOR < 4 -namespace itk -{ - typedef unsigned int ThreadIdType; -} -#endif - //-------------------------------------------------------------------- namespace clitk { diff --git a/itk/RelativePositionPropImageFilter.h b/itk/RelativePositionPropImageFilter.h index 0517224..11797e7 100644 --- a/itk/RelativePositionPropImageFilter.h +++ b/itk/RelativePositionPropImageFilter.h @@ -194,7 +194,7 @@ namespace itk virtual ~RelativePositionPropImageFilter() {} void PrintSelf(std::ostream& os, Indent indent) const; - //void GenerateThreadedData(const typename TOutputImage::RegionType& outputRegionForThread, ThreadIdType threadId); + //void GenerateThreadedData(const typename TOutputImage::RegionType& outputRegionForThread, int threadId); void GenerateData(); private: diff --git a/itk/RelativePositionPropImageFilter.txx b/itk/RelativePositionPropImageFilter.txx index 8e677b9..15a5773 100644 --- a/itk/RelativePositionPropImageFilter.txx +++ b/itk/RelativePositionPropImageFilter.txx @@ -82,7 +82,7 @@ namespace itk template< class TInputImage, class TOutputImage ,class TtNorm> void RelativePositionPropImageFilter< TInputImage, TOutputImage ,TtNorm> - //::GenerateThreadedData(const typename TOutputImage::RegionType& outputRegionForThread, ThreadIdType threadId) + //::GenerateThreadedData(const typename TOutputImage::RegionType& outputRegionForThread, int threadId) ::GenerateData() { diff --git a/itk/clitkBackProjectImageFilter.h b/itk/clitkBackProjectImageFilter.h index 0b90558..7de71a1 100644 --- a/itk/clitkBackProjectImageFilter.h +++ b/itk/clitkBackProjectImageFilter.h @@ -242,7 +242,7 @@ namespace clitk void BeforeThreadedGenerateData(void ); // Threaded Generate Data - void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, itk::ThreadIdType threadId ); + void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, int threadId ); //------------------------------------------------ diff --git a/itk/clitkBackProjectImageFilter.txx b/itk/clitkBackProjectImageFilter.txx index 9091f0d..c070336 100644 --- a/itk/clitkBackProjectImageFilter.txx +++ b/itk/clitkBackProjectImageFilter.txx @@ -303,7 +303,7 @@ namespace clitk template void BackProjectImageFilter - ::ThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, itk::ThreadIdType threadId ) + ::ThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, int threadId ) { //Projection pointer InputImageConstPointer inputPtr=this->GetInput(); diff --git a/itk/clitkComposeVFFilter.h b/itk/clitkComposeVFFilter.h index d043c1a..d66d819 100644 --- a/itk/clitkComposeVFFilter.h +++ b/itk/clitkComposeVFFilter.h @@ -75,7 +75,7 @@ namespace clitk //======================================================================================== //Threaded execution should implement generate threaded data - void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId ); + void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId ); bool m_Verbose; PixelType m_EdgePaddingValue; diff --git a/itk/clitkComposeVFFilter.txx b/itk/clitkComposeVFFilter.txx index 5cc5db1..7103a10 100644 --- a/itk/clitkComposeVFFilter.txx +++ b/itk/clitkComposeVFFilter.txx @@ -36,7 +36,7 @@ namespace clitk //========================================================================================================================= //update the output for the outputRegionForThread template - void ComposeVFFilter::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId ) + void ComposeVFFilter::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId ) { //Get pointer to the output diff --git a/itk/clitkDecomposeAndReconstructImageFilter.h b/itk/clitkDecomposeAndReconstructImageFilter.h index bf97509..32d6bcc 100644 --- a/itk/clitkDecomposeAndReconstructImageFilter.h +++ b/itk/clitkDecomposeAndReconstructImageFilter.h @@ -131,7 +131,7 @@ namespace clitk // // Threaded Generate Data // void BeforeThreadedGenerateData(void ); - // void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId ); + // void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, int threadId ); // void AfterThreadedGenerateData(void ); // // Override defaults // virtual void GenerateInputRequestedRegion(); diff --git a/itk/clitkDecomposeThroughErosionImageFilter.h b/itk/clitkDecomposeThroughErosionImageFilter.h index aff2b12..3ab61cb 100644 --- a/itk/clitkDecomposeThroughErosionImageFilter.h +++ b/itk/clitkDecomposeThroughErosionImageFilter.h @@ -124,7 +124,7 @@ namespace clitk // // Threaded Generate Data // void BeforeThreadedGenerateData(void ); - // void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId ); + // void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, int threadId ); // void AfterThreadedGenerateData(void ); // // Override defaults // virtual void GenerateInputRequestedRegion(); diff --git a/itk/clitkExtractImageFilter.h b/itk/clitkExtractImageFilter.h index aae8332..7ea101a 100644 --- a/itk/clitkExtractImageFilter.h +++ b/itk/clitkExtractImageFilter.h @@ -95,7 +95,7 @@ protected: void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, - itk::ThreadIdType threadId ); + int threadId ); InputImageRegionType m_ExtractionRegion; OutputImageRegionType m_OutputImageRegion; diff --git a/itk/clitkExtractImageFilter.txx b/itk/clitkExtractImageFilter.txx index 36cd3fd..236a7cb 100644 --- a/itk/clitkExtractImageFilter.txx +++ b/itk/clitkExtractImageFilter.txx @@ -237,7 +237,7 @@ template void ExtractImageFilter ::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, - itk::ThreadIdType threadId) + int threadId) { itkDebugMacro(<<"Actually executing"); diff --git a/itk/clitkForwardWarpImageFilter.txx b/itk/clitkForwardWarpImageFilter.txx index 283abe6..f5e9853 100644 --- a/itk/clitkForwardWarpImageFilter.txx +++ b/itk/clitkForwardWarpImageFilter.txx @@ -84,7 +84,7 @@ protected: //the actual processing void BeforeThreadedGenerateData(); - void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId ); + void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId ); //member data typename itk::Image< double, ImageDimension>::Pointer m_Weights; @@ -124,7 +124,7 @@ void HelperClass1::Before //========================================================================================================================= //update the output for the outputRegionForThread template -void HelperClass1::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId ) +void HelperClass1::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId ) { //Get pointer to the input @@ -303,7 +303,7 @@ protected: //the actual processing - void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId ); + void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId ); //member data @@ -330,7 +330,7 @@ HelperClass2::HelperClass2() //========================================================================================================================= //update the output for the outputRegionForThread template void -HelperClass2::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId ) +HelperClass2::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId ) { //Get pointer to the input diff --git a/itk/clitkInvertVFFilter.txx b/itk/clitkInvertVFFilter.txx index 600775c..0c443ca 100644 --- a/itk/clitkInvertVFFilter.txx +++ b/itk/clitkInvertVFFilter.txx @@ -74,7 +74,7 @@ protected: //the actual processing void BeforeThreadedGenerateData(); - void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId ); + void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId ); //member data typename WeightsImageType::Pointer m_Weights; @@ -111,7 +111,7 @@ void HelperClass1::BeforeThreadedGenerateData() //========================================================================================================================= //update the output for the outputRegionForThread template -void HelperClass1::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId ) +void HelperClass1::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId ) { //Get pointer to the input @@ -282,7 +282,7 @@ protected: //the actual processing - void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId ); + void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId ); //member data @@ -308,7 +308,7 @@ template HelperClass2 void HelperClass2::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId ) +template void HelperClass2::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId ) { //Get pointer to the input diff --git a/itk/clitkReconstructThroughDilationImageFilter.h b/itk/clitkReconstructThroughDilationImageFilter.h index de4d5ab..32d31fe 100644 --- a/itk/clitkReconstructThroughDilationImageFilter.h +++ b/itk/clitkReconstructThroughDilationImageFilter.h @@ -115,7 +115,7 @@ namespace clitk // // Threaded Generate Data // void BeforeThreadedGenerateData(void ); - // void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId ); + // void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, int threadId ); // void AfterThreadedGenerateData(void ); // // Override defaults // virtual void GenerateInputRequestedRegion(); diff --git a/itk/itkLabelOverlapMeasuresImageFilter.txx b/itk/itkLabelOverlapMeasuresImageFilter.txx index dd047ba..ced277b 100644 --- a/itk/itkLabelOverlapMeasuresImageFilter.txx +++ b/itk/itkLabelOverlapMeasuresImageFilter.txx @@ -145,7 +145,7 @@ template void LabelOverlapMeasuresImageFilter ::ThreadedGenerateData( const RegionType& outputRegionForThread, - ThreadIdType threadId ) + int threadId ) { ImageRegionConstIterator ItS( this->GetSourceImage(), outputRegionForThread ); diff --git a/registration/clitkDifferenceImageFilter.h b/registration/clitkDifferenceImageFilter.h index b958c69..5199d9e 100644 --- a/registration/clitkDifferenceImageFilter.h +++ b/registration/clitkDifferenceImageFilter.h @@ -17,7 +17,6 @@ ===========================================================================**/ #ifndef __clitkDifferenceImageFilter_h #define __clitkDifferenceImageFilter_h -#include "clitkCommon.h" #include "clitkImageCommon.h" //itk include @@ -57,7 +56,7 @@ namespace clitk protected: DifferenceImageFilter(); ~DifferenceImageFilter() {}; - void ThreadedGenerateData(const OutputImageRegionType& threadRegion, itk::ThreadIdType threadId); + void ThreadedGenerateData(const OutputImageRegionType& threadRegion, int threadId); }; diff --git a/registration/clitkDifferenceImageFilter.txx b/registration/clitkDifferenceImageFilter.txx index 4ea8213..6aa822e 100644 --- a/registration/clitkDifferenceImageFilter.txx +++ b/registration/clitkDifferenceImageFilter.txx @@ -53,7 +53,7 @@ namespace clitk //========================================================================================================================= //Update template - void DifferenceImageFilter::ThreadedGenerateData(const OutputImageRegionType &threadRegion, itk::ThreadIdType threadId) + void DifferenceImageFilter::ThreadedGenerateData(const OutputImageRegionType &threadRegion, int threadId) { //Pointers to input and output typename InputImageType::ConstPointer input1=this->GetInput(0); diff --git a/registration/clitkExtractImageFilter.h b/registration/clitkExtractImageFilter.h index f3eac18..1e797bc 100644 --- a/registration/clitkExtractImageFilter.h +++ b/registration/clitkExtractImageFilter.h @@ -93,7 +93,7 @@ protected: void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, - itk::ThreadIdType threadId ); + int threadId ); InputImageRegionType m_ExtractionRegion; OutputImageRegionType m_OutputImageRegion; diff --git a/registration/clitkExtractImageFilter.txx b/registration/clitkExtractImageFilter.txx index 7ce13a1..d321f9e 100644 --- a/registration/clitkExtractImageFilter.txx +++ b/registration/clitkExtractImageFilter.txx @@ -236,7 +236,7 @@ template void ExtractImageFilter ::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, - itk::ThreadIdType threadId) + int threadId) { itkDebugMacro(<<"Actually executing"); diff --git a/registration/clitkLinearCombinationImageFilter.h b/registration/clitkLinearCombinationImageFilter.h index 196ab02..879f0ad 100644 --- a/registration/clitkLinearCombinationImageFilter.h +++ b/registration/clitkLinearCombinationImageFilter.h @@ -73,7 +73,7 @@ namespace clitk LinearCombinationImageFilter(); virtual ~LinearCombinationImageFilter(){}; - virtual void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId); + virtual void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId); private: LinearCombinationImageFilter(const Self&); //purposely not implemented diff --git a/registration/clitkLinearCombinationImageFilter.txx b/registration/clitkLinearCombinationImageFilter.txx index eeb61ff..fad326c 100644 --- a/registration/clitkLinearCombinationImageFilter.txx +++ b/registration/clitkLinearCombinationImageFilter.txx @@ -71,7 +71,7 @@ namespace clitk template void LinearCombinationImageFilter - ::ThreadedGenerateData(const OutputImageRegionType &threadRegion, itk::ThreadIdType threadId) + ::ThreadedGenerateData(const OutputImageRegionType &threadRegion, int threadId) { //Pointers to input and output typename InputImageType::ConstPointer input1=this->GetInput(0); diff --git a/registration/clitkOptNormalizedCorrelationImageToImageMetric.h b/registration/clitkOptNormalizedCorrelationImageToImageMetric.h index 1508994..83448af 100644 --- a/registration/clitkOptNormalizedCorrelationImageToImageMetric.h +++ b/registration/clitkOptNormalizedCorrelationImageToImageMetric.h @@ -130,13 +130,13 @@ private: MeasureType ComputeSums( const ParametersType & parameters ) const; - inline bool GetValueThreadProcessSample( itk::ThreadIdType threadID, + inline bool GetValueThreadProcessSample( unsigned int threadID, unsigned long fixedImageSample, const MovingImagePointType & mappedPoint, double movingImageValue ) const; - inline bool GetValueAndDerivativeThreadProcessSample( itk::ThreadIdType threadID, + inline bool GetValueAndDerivativeThreadProcessSample( unsigned int threadID, unsigned long fixedImageSample, const MovingImagePointType & mappedPoint, double movingImageValue, diff --git a/registration/clitkOptNormalizedCorrelationImageToImageMetric.txx b/registration/clitkOptNormalizedCorrelationImageToImageMetric.txx index 5d00ffb..3c0dfab 100644 --- a/registration/clitkOptNormalizedCorrelationImageToImageMetric.txx +++ b/registration/clitkOptNormalizedCorrelationImageToImageMetric.txx @@ -159,7 +159,7 @@ NormalizedCorrelationImageToImageMetric delete [] m_ThreaderDerivativeF; } m_ThreaderDerivativeF = new DerivativeType[this->m_NumberOfThreads]; - for(itk::ThreadIdType threadID=0; threadIDm_NumberOfThreads; threadID++) { + for(unsigned int threadID=0; threadIDm_NumberOfThreads; threadID++) { m_ThreaderDerivativeF[threadID].SetSize( this->m_NumberOfParameters ); } @@ -167,7 +167,7 @@ NormalizedCorrelationImageToImageMetric delete [] m_ThreaderDerivativeM; } m_ThreaderDerivativeM = new DerivativeType[this->m_NumberOfThreads]; - for(itk::ThreadIdType threadID=0; threadIDm_NumberOfThreads; threadID++) { + for(unsigned int threadID=0; threadIDm_NumberOfThreads; threadID++) { m_ThreaderDerivativeM[threadID].SetSize( this->m_NumberOfParameters ); } } @@ -177,7 +177,7 @@ template < class TFixedImage, class TMovingImage > inline bool NormalizedCorrelationImageToImageMetric ::GetValueThreadProcessSample( - itk::ThreadIdType threadID, + unsigned int threadID, unsigned long fixedImageSample, const MovingImagePointType & itkNotUsed(mappedPoint), double movingImageValue) const @@ -358,7 +358,7 @@ template < class TFixedImage, class TMovingImage > inline bool NormalizedCorrelationImageToImageMetric ::GetValueAndDerivativeThreadProcessSample( - itk::ThreadIdType threadID, + unsigned int threadID, unsigned long fixedImageSample, const MovingImagePointType & itkNotUsed(mappedPoint), double movingImageValue, @@ -446,7 +446,7 @@ NormalizedCorrelationImageToImageMetric 0, this->m_NumberOfParameters * sizeof(typename DerivativeType::ValueType) ); - for( itk::ThreadIdType threadID = 0; threadIDm_NumberOfThreads; threadID++ ) { + for( unsigned int threadID = 0; threadIDm_NumberOfThreads; threadID++ ) { memset( m_ThreaderDerivativeF[threadID].data_block(), 0, this->m_NumberOfParameters * sizeof(typename DerivativeType::ValueType) ); diff --git a/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.h b/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.h index 93a2ba9..65559c2 100644 --- a/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.h +++ b/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.h @@ -130,13 +130,13 @@ private: MeasureType ComputeSums( const ParametersType & parameters ) const; - inline bool GetValueThreadProcessSample( ThreadIdType threadID, + inline bool GetValueThreadProcessSample( unsigned int threadID, unsigned long fixedImageSample, const MovingImagePointType & mappedPoint, double movingImageValue ) const; - inline bool GetValueAndDerivativeThreadProcessSample( ThreadIdType threadID, + inline bool GetValueAndDerivativeThreadProcessSample( unsigned int threadID, unsigned long fixedImageSample, const MovingImagePointType & mappedPoint, double movingImageValue, diff --git a/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx b/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx index 769171b..d7c7777 100644 --- a/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx +++ b/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx @@ -159,7 +159,7 @@ NormalizedCorrelationImageToImageMetricFor3DBLUTFFD delete [] m_ThreaderDerivativeF; } m_ThreaderDerivativeF = new DerivativeType[this->m_NumberOfThreads]; - for(ThreadIdType threadID=0; threadIDm_NumberOfThreads; threadID++) { + for(unsigned int threadID=0; threadIDm_NumberOfThreads; threadID++) { m_ThreaderDerivativeF[threadID].SetSize( this->m_NumberOfParameters ); } @@ -167,7 +167,7 @@ NormalizedCorrelationImageToImageMetricFor3DBLUTFFD delete [] m_ThreaderDerivativeM; } m_ThreaderDerivativeM = new DerivativeType[this->m_NumberOfThreads]; - for(ThreadIdType threadID=0; threadIDm_NumberOfThreads; threadID++) { + for(unsigned int threadID=0; threadIDm_NumberOfThreads; threadID++) { m_ThreaderDerivativeM[threadID].SetSize( this->m_NumberOfParameters ); } } @@ -177,7 +177,7 @@ template < class TFixedImage, class TMovingImage > inline bool NormalizedCorrelationImageToImageMetricFor3DBLUTFFD ::GetValueThreadProcessSample( - ThreadIdType threadID, + unsigned int threadID, unsigned long fixedImageSample, const MovingImagePointType & itkNotUsed(mappedPoint), double movingImageValue) const @@ -358,7 +358,7 @@ template < class TFixedImage, class TMovingImage > inline bool NormalizedCorrelationImageToImageMetricFor3DBLUTFFD ::GetValueAndDerivativeThreadProcessSample( - ThreadIdType threadID, + unsigned int threadID, unsigned long fixedImageSample, const MovingImagePointType & itkNotUsed(mappedPoint), double movingImageValue, @@ -470,7 +470,7 @@ NormalizedCorrelationImageToImageMetricFor3DBLUTFFD 0, this->m_NumberOfParameters * sizeof(typename DerivativeType::ValueType) ); - for( ThreadIdType threadID = 0; threadIDm_NumberOfThreads; threadID++ ) { + for( unsigned int threadID = 0; threadIDm_NumberOfThreads; threadID++ ) { memset( m_ThreaderDerivativeF[threadID].data_block(), 0, this->m_NumberOfParameters * sizeof(typename DerivativeType::ValueType) ); diff --git a/registration/clitkResampleBSplineDeformableTransformImageFilter.h b/registration/clitkResampleBSplineDeformableTransformImageFilter.h index 3d4fbed..a5788a9 100644 --- a/registration/clitkResampleBSplineDeformableTransformImageFilter.h +++ b/registration/clitkResampleBSplineDeformableTransformImageFilter.h @@ -133,7 +133,7 @@ namespace clitk void GenerateData(void); // // Threaded Generate Data // void BeforeThreadedGenerateData(void ); - // void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId ); + // void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, int threadId ); // void AfterThreadedGenerateData(void ); // // Override defaults // virtual void GenerateInputRequestedRegion(); diff --git a/registration/clitkTransformToDeformationFieldSource.h b/registration/clitkTransformToDeformationFieldSource.h index 2700821..69a6df7 100644 --- a/registration/clitkTransformToDeformationFieldSource.h +++ b/registration/clitkTransformToDeformationFieldSource.h @@ -184,21 +184,21 @@ protected: */ void ThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, - itk::ThreadIdType threadId ); + int threadId ); /** Default implementation for resampling that works for any * transformation type. */ void NonlinearThreadedGenerateData( const OutputImageRegionType& outputRegionForThread, - itk::ThreadIdType threadId ); + int threadId ); /** Faster implementation for resampling that works for with linear * transformation types. */ void LinearThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, - itk::ThreadIdType threadId ); + int threadId ); private: diff --git a/registration/clitkTransformToDeformationFieldSource.txx b/registration/clitkTransformToDeformationFieldSource.txx index adac4f6..d45f49d 100644 --- a/registration/clitkTransformToDeformationFieldSource.txx +++ b/registration/clitkTransformToDeformationFieldSource.txx @@ -182,7 +182,7 @@ void TransformToDeformationFieldSource ::ThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, - itk::ThreadIdType threadId ) + int 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 ::NonlinearThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, - itk::ThreadIdType threadId ) + int threadId ) { // Get the output pointer OutputImagePointer outputPtr = this->GetOutput(); @@ -253,7 +253,7 @@ void TransformToDeformationFieldSource ::LinearThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, - itk::ThreadIdType threadId ) + int threadId ) { // Get the output pointer OutputImagePointer outputPtr = this->GetOutput(); diff --git a/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.h b/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.h index 54eedb8..7cfe51e 100644 --- a/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.h +++ b/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.h @@ -313,7 +313,7 @@ private: FixedImageSampleContainer & samples ); /** Compute PDF derivative contribution for each parameter. */ - virtual void ComputePDFDerivatives( ThreadIdType threadID, + virtual void ComputePDFDerivatives( unsigned int threadID, unsigned int sampleNumber, int movingImageParzenWindowIndex, const ImageDerivativesType @@ -333,26 +333,26 @@ private: mutable bool m_ImplicitDerivativesSecondPass; - virtual inline void GetValueThreadPreProcess( ThreadIdType threadID, + virtual inline void GetValueThreadPreProcess( unsigned int threadID, bool withinSampleThread ) const; - virtual inline bool GetValueThreadProcessSample( ThreadIdType threadID, + virtual inline bool GetValueThreadProcessSample( unsigned int threadID, unsigned long fixedImageSample, const MovingImagePointType & mappedPoint, double movingImageValue ) const; - virtual inline void GetValueThreadPostProcess( ThreadIdType threadID, + virtual inline void GetValueThreadPostProcess( unsigned int threadID, bool withinSampleThread ) const; virtual inline void GetValueAndDerivativeThreadPreProcess( - ThreadIdType threadID, + unsigned int threadID, bool withinSampleThread ) const; - virtual inline bool GetValueAndDerivativeThreadProcessSample( ThreadIdType threadID, + virtual inline bool GetValueAndDerivativeThreadProcessSample( unsigned int threadID, unsigned long fixedImageSample, const MovingImagePointType & mappedPoint, double movingImageValue, const ImageDerivativesType & movingImageGradientValue ) const; virtual inline void GetValueAndDerivativeThreadPostProcess( - ThreadIdType threadID, + unsigned int threadID, bool withinSampleThread ) const; }; diff --git a/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.txx b/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.txx index b09abd3..f55b19a 100644 --- a/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.txx +++ b/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.txx @@ -386,7 +386,7 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD } m_ThreaderJointPDFSum = new double[this->m_NumberOfThreads]; - ThreadIdType threadID; + unsigned int threadID; int binRange = m_NumberOfHistogramBins / this->m_NumberOfThreads; @@ -473,7 +473,7 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD template < class TFixedImage, class TMovingImage > inline void MattesMutualInformationImageToImageMetricFor3DBLUTFFD -::GetValueThreadPreProcess( ThreadIdType threadID, +::GetValueThreadPreProcess( unsigned int threadID, bool withinSampleThread ) const { @@ -501,7 +501,7 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD template < class TFixedImage, class TMovingImage > inline bool MattesMutualInformationImageToImageMetricFor3DBLUTFFD -::GetValueThreadProcessSample( ThreadIdType threadID, +::GetValueThreadProcessSample( unsigned int threadID, unsigned long fixedImageSample, const MovingImagePointType & itkNotUsed(mappedPoint), double movingImageValue) const @@ -576,7 +576,7 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD template < class TFixedImage, class TMovingImage > inline void MattesMutualInformationImageToImageMetricFor3DBLUTFFD -::GetValueThreadPostProcess( ThreadIdType threadID, +::GetValueThreadPostProcess( unsigned int threadID, bool itkNotUsed(withinSampleThread) ) const { unsigned int t; @@ -640,7 +640,7 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD // MUST BE CALLED TO INITIATE PROCESSING this->GetValueMultiThreadedPostProcessInitiate(); - for(ThreadIdType threadID = 0; threadIDm_NumberOfThreads-1; threadID++) { + for(unsigned int threadID = 0; threadIDm_NumberOfThreads-1; threadID++) { m_JointPDFSum += m_ThreaderJointPDFSum[threadID]; } if ( m_JointPDFSum == 0.0 ) { @@ -722,7 +722,7 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD template < class TFixedImage, class TMovingImage > inline void MattesMutualInformationImageToImageMetricFor3DBLUTFFD -::GetValueAndDerivativeThreadPreProcess( ThreadIdType threadID, +::GetValueAndDerivativeThreadPreProcess( unsigned int threadID, bool itkNotUsed(withinSampleThread) ) const { if(threadID > 0) { @@ -759,7 +759,7 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD template < class TFixedImage, class TMovingImage > inline bool MattesMutualInformationImageToImageMetricFor3DBLUTFFD -::GetValueAndDerivativeThreadProcessSample( ThreadIdType threadID, +::GetValueAndDerivativeThreadProcessSample( unsigned int threadID, unsigned long fixedImageSample, const MovingImagePointType & itkNotUsed(mappedPoint), double movingImageValue, @@ -866,7 +866,7 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD template < class TFixedImage, class TMovingImage > inline void MattesMutualInformationImageToImageMetricFor3DBLUTFFD -::GetValueAndDerivativeThreadPostProcess( ThreadIdType threadID, +::GetValueAndDerivativeThreadPostProcess( unsigned int threadID, bool withinSampleThread ) const { this->GetValueThreadPostProcess( threadID, withinSampleThread ); @@ -933,7 +933,7 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD } else { this->m_PRatioArray.Fill( 0.0 ); this->m_MetricDerivative.Fill( NumericTraits< MeasureType >::Zero ); - for(ThreadIdType threadID = 0; threadID < this->m_NumberOfThreads-1; threadID++ ) { + for(unsigned int threadID = 0; threadID < this->m_NumberOfThreads-1; threadID++ ) { this->m_ThreaderMetricDerivative[threadID].Fill( NumericTraits< MeasureType >::Zero ); } this->m_ImplicitDerivativesSecondPass = false; @@ -951,7 +951,7 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD // CALL IF DOING THREADED POST PROCESSING this->GetValueAndDerivativeMultiThreadedPostProcessInitiate(); - for(ThreadIdType threadID = 0; threadIDm_NumberOfThreads-1; threadID++) { + for(unsigned int threadID = 0; threadIDm_NumberOfThreads-1; threadID++) { m_JointPDFSum += m_ThreaderJointPDFSum[threadID]; } if ( m_JointPDFSum == 0.0 ) { @@ -1095,7 +1095,7 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD template < class TFixedImage, class TMovingImage > void MattesMutualInformationImageToImageMetricFor3DBLUTFFD -::ComputePDFDerivatives( ThreadIdType threadID, +::ComputePDFDerivatives( unsigned int threadID, unsigned int sampleNumber, int pdfMovingIndex, const ImageDerivativesType & movingImageGradientValue, diff --git a/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.h b/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.h index 2eb0bc7..acb0b1b 100644 --- a/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.h +++ b/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.h @@ -129,12 +129,12 @@ private: //purposely not implemented void operator=(const Self &); - inline bool GetValueThreadProcessSample( ThreadIdType threadID, + inline bool GetValueThreadProcessSample( unsigned int threadID, unsigned long fixedImageSample, const MovingImagePointType & mappedPoint, double movingImageValue ) const; - inline bool GetValueAndDerivativeThreadProcessSample( ThreadIdType threadID, + inline bool GetValueAndDerivativeThreadProcessSample( unsigned int threadID, unsigned long fixedImageSample, const MovingImagePointType & mappedPoint, double movingImageValue, diff --git a/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.txx b/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.txx index ec32c74..cf17340 100644 --- a/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.txx +++ b/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.txx @@ -115,7 +115,7 @@ MeanSquaresImageToImageMetricFor3DBLUTFFD delete [] m_ThreaderMSEDerivatives; } m_ThreaderMSEDerivatives = new DerivativeType[this->m_NumberOfThreads]; - for(ThreadIdType threadID=0; threadIDm_NumberOfThreads; threadID++) { + for(unsigned int threadID=0; threadIDm_NumberOfThreads; threadID++) { m_ThreaderMSEDerivatives[threadID].SetSize( this->m_NumberOfParameters ); } } @@ -123,7 +123,7 @@ MeanSquaresImageToImageMetricFor3DBLUTFFD template < class TFixedImage, class TMovingImage > inline bool MeanSquaresImageToImageMetricFor3DBLUTFFD -::GetValueThreadProcessSample( ThreadIdType threadID, +::GetValueThreadProcessSample( unsigned int threadID, unsigned long fixedImageSample, const MovingImagePointType & itkNotUsed(mappedPoint), double movingImageValue) const @@ -186,7 +186,7 @@ MeanSquaresImageToImageMetricFor3DBLUTFFD template < class TFixedImage, class TMovingImage > inline bool MeanSquaresImageToImageMetricFor3DBLUTFFD -::GetValueAndDerivativeThreadProcessSample( ThreadIdType threadID, +::GetValueAndDerivativeThreadProcessSample( unsigned int threadID, unsigned long fixedImageSample, const MovingImagePointType & itkNotUsed(mappedPoint), double movingImageValue, @@ -274,7 +274,7 @@ MeanSquaresImageToImageMetricFor3DBLUTFFD 0, this->m_NumberOfParameters * sizeof(double) ); - for( ThreadIdType threadID = 0; threadIDm_NumberOfThreads; threadID++ ) { + for( unsigned int threadID = 0; threadIDm_NumberOfThreads; threadID++ ) { memset( m_ThreaderMSEDerivatives[threadID].data_block(), 0, this->m_NumberOfParameters * sizeof(double) ); diff --git a/tools/clitkCombineImageFilter.h b/tools/clitkCombineImageFilter.h index c48b1d1..024b5c6 100644 --- a/tools/clitkCombineImageFilter.h +++ b/tools/clitkCombineImageFilter.h @@ -90,7 +90,7 @@ namespace clitk // Update //---------------------------------------- // Generate Data - void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, itk::ThreadIdType threadId); + void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, int threadId); //---------------------------------------- // Data members diff --git a/tools/clitkCombineImageFilter.txx b/tools/clitkCombineImageFilter.txx index 206adac..8a4f051 100644 --- a/tools/clitkCombineImageFilter.txx +++ b/tools/clitkCombineImageFilter.txx @@ -46,7 +46,7 @@ namespace clitk //------------------------------------------------------------------- template void - CombineImageFilter::ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, itk::ThreadIdType threadId) + CombineImageFilter::ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, int threadId) { typename InputImageType::ConstPointer input1=this->GetInput(0); typename InputImageType::ConstPointer input2=this->GetInput(1); diff --git a/tools/clitkComposeVFGenericFilter.h b/tools/clitkComposeVFGenericFilter.h index dcb913e..c3e8bd3 100644 --- a/tools/clitkComposeVFGenericFilter.h +++ b/tools/clitkComposeVFGenericFilter.h @@ -21,7 +21,6 @@ // clitk #include "clitkIO.h" -#include "clitkCommon.h" #include "clitkImageCommon.h" #include "clitkComposeVFFilter.h" diff --git a/tools/clitkVectorImageToImageFilter.h b/tools/clitkVectorImageToImageFilter.h index f2288f0..cf5946e 100644 --- a/tools/clitkVectorImageToImageFilter.h +++ b/tools/clitkVectorImageToImageFilter.h @@ -86,7 +86,7 @@ namespace clitk //---------------------------------------- // Update //---------------------------------------- - void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, itk::ThreadIdType threadId ); + void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, int threadId ); //---------------------------------------- // Data members diff --git a/tools/clitkVectorImageToImageFilter.txx b/tools/clitkVectorImageToImageFilter.txx index 018a8f7..909a422 100644 --- a/tools/clitkVectorImageToImageFilter.txx +++ b/tools/clitkVectorImageToImageFilter.txx @@ -47,7 +47,7 @@ namespace clitk //------------------------------------------------------------------- template void - VectorImageToImageFilter::ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, itk::ThreadIdType threadId) + VectorImageToImageFilter::ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, int threadId) { // Iterators typename OutputImageType::Pointer output=this->GetOutput();