Created
January 26, 2014 14:56
-
-
Save iMichka/8633973 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From b54ec1eaeff29eb7775cb586062d53524db5455a Mon Sep 17 00:00:00 2001 | |
| From: Michka Popoff <[email protected]> | |
| Date: Sun, 26 Jan 2014 15:51:02 +0100 | |
| Subject: [PATCH] Fix 10.8.5 python for 4.5.0 release | |
| --- | |
| .../ImageGrid/include/itkConstantPadImageFilter.hxx | 2 +- | |
| .../Filtering/ImageIntensity/include/itkMaskImageFilter.h | 6 +++--- | |
| .../ImageIntensity/include/itkMaskNegatedImageFilter.h | 2 +- | |
| .../include/itkConnectedComponentFunctorImageFilter.hxx | 14 +++++++------- | |
| .../include/itkVectorConnectedComponentImageFilter.h | 4 ++-- | |
| .../LevelSets/include/itkNormalVectorDiffusionFunction.hxx | 10 +++++----- | |
| 6 files changed, 19 insertions(+), 19 deletions(-) | |
| diff --git a/Modules/Filtering/ImageGrid/include/itkConstantPadImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkConstantPadImageFilter.hxx | |
| index 4cc6436..033d723 100644 | |
| --- a/Modules/Filtering/ImageGrid/include/itkConstantPadImageFilter.hxx | |
| +++ b/Modules/Filtering/ImageGrid/include/itkConstantPadImageFilter.hxx | |
| @@ -31,7 +31,7 @@ template< typename TInputImage, typename TOutputImage > | |
| ConstantPadImageFilter< TInputImage, TOutputImage > | |
| ::ConstantPadImageFilter() | |
| { | |
| - m_InternalBoundaryCondition.SetConstant( NumericTraits< OutputImagePixelType >::Zero ); | |
| + m_InternalBoundaryCondition.SetConstant( NumericTraits< OutputImagePixelType >::ZeroValue() ); | |
| this->InternalSetBoundaryCondition( &m_InternalBoundaryCondition ); | |
| } | |
| diff --git a/Modules/Filtering/ImageIntensity/include/itkMaskImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkMaskImageFilter.h | |
| index 5e3d954..d6cbdfa 100644 | |
| --- a/Modules/Filtering/ImageIntensity/include/itkMaskImageFilter.h | |
| +++ b/Modules/Filtering/ImageIntensity/include/itkMaskImageFilter.h | |
| @@ -93,7 +93,7 @@ private: | |
| template < typename TPixelType > | |
| void InitializeOutsideValue( TPixelType * ) | |
| { | |
| - this->m_OutsideValue = NumericTraits< TPixelType >::Zero; | |
| + this->m_OutsideValue = NumericTraits< TPixelType >::ZeroValue(); | |
| } | |
| template < typename TValueType > | |
| @@ -262,12 +262,12 @@ private: | |
| VariableLengthVector< TValue > currentValue = | |
| this->GetFunctor().GetOutsideValue(); | |
| VariableLengthVector< TValue > zeroVector( currentValue.GetSize() ); | |
| - zeroVector.Fill( NumericTraits< TValue >::Zero ); | |
| + zeroVector.Fill( NumericTraits< TValue >::ZeroValue() ); | |
| if ( currentValue == zeroVector ) | |
| { | |
| zeroVector.SetSize( this->GetOutput()->GetVectorLength() ); | |
| - zeroVector.Fill( NumericTraits< TValue >::Zero ); | |
| + zeroVector.Fill( NumericTraits< TValue >::ZeroValue() ); | |
| this->GetFunctor().SetOutsideValue( zeroVector ); | |
| } | |
| else if ( this->GetFunctor().GetOutsideValue().GetSize() != | |
| diff --git a/Modules/Filtering/ImageIntensity/include/itkMaskNegatedImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkMaskNegatedImageFilter.h | |
| index c39d702..ca45378 100644 | |
| --- a/Modules/Filtering/ImageIntensity/include/itkMaskNegatedImageFilter.h | |
| +++ b/Modules/Filtering/ImageIntensity/include/itkMaskNegatedImageFilter.h | |
| @@ -37,7 +37,7 @@ public: | |
| typedef typename NumericTraits< TInput >::AccumulateType AccumulatorType; | |
| MaskNegatedInput() | |
| - : m_OutsideValue(NumericTraits< TOutput >::Zero) | |
| + : m_OutsideValue(NumericTraits< TOutput >::ZeroValue()) | |
| , m_MaskingValue(NumericTraits< TMask >::ZeroValue()) | |
| { | |
| } | |
| diff --git a/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentFunctorImageFilter.hxx b/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentFunctorImageFilter.hxx | |
| index a419659..053068a 100644 | |
| --- a/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentFunctorImageFilter.hxx | |
| +++ b/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentFunctorImageFilter.hxx | |
| @@ -37,7 +37,7 @@ ConnectedComponentFunctorImageFilter< TInputImage, TOutputImage, TFunctor, TMask | |
| InputPixelType value, neighborValue; | |
| OutputPixelType label, originalLabel, neighborLabel; | |
| - OutputPixelType maxLabel = NumericTraits< OutputPixelType >::Zero; | |
| + OutputPixelType maxLabel = NumericTraits< OutputPixelType >::ZeroValue(); | |
| const OutputPixelType maxPossibleLabel = NumericTraits< OutputPixelType >::max(); | |
| typename TOutputImage::Pointer output = this->GetOutput(); | |
| @@ -49,7 +49,7 @@ ConnectedComponentFunctorImageFilter< TInputImage, TOutputImage, TFunctor, TMask | |
| // Set up the boundary condition to be zero padded (used on output image) | |
| ConstantBoundaryCondition< TOutputImage > BC; | |
| - BC.SetConstant(NumericTraits< OutputPixelType >::Zero); | |
| + BC.SetConstant(NumericTraits< OutputPixelType >::ZeroValue()); | |
| // Neighborhood iterators. Let's use a shaped neighborhood so we can | |
| // restrict the access to face connected neighbors. These iterators | |
| @@ -119,10 +119,10 @@ ConnectedComponentFunctorImageFilter< TInputImage, TOutputImage, TFunctor, TMask | |
| oit.GoToBegin(); | |
| while ( !mit.IsAtEnd() ) | |
| { | |
| - if ( mit.Get() == NumericTraits< MaskPixelType >::Zero ) | |
| + if ( mit.Get() == NumericTraits< MaskPixelType >::ZeroValue() ) | |
| { | |
| // mark pixel as unlabeled | |
| - oit.Set(NumericTraits< OutputPixelType >::Zero); | |
| + oit.Set(NumericTraits< OutputPixelType >::ZeroValue()); | |
| } | |
| ++mit; | |
| @@ -146,7 +146,7 @@ ConnectedComponentFunctorImageFilter< TInputImage, TOutputImage, TFunctor, TMask | |
| originalLabel = label; | |
| // If the pixel is not background | |
| - if ( label != NumericTraits< OutputPixelType >::Zero ) | |
| + if ( label != NumericTraits< OutputPixelType >::ZeroValue() ) | |
| { | |
| // loop over the "previous" neighbors to find labels. this loop | |
| // may establish one or more new equivalence classes | |
| @@ -160,7 +160,7 @@ ConnectedComponentFunctorImageFilter< TInputImage, TOutputImage, TFunctor, TMask | |
| // if the previous pixel has a label, verify equivalence or | |
| // establish a new equivalence | |
| - if ( neighborLabel != NumericTraits< OutputPixelType >::Zero ) | |
| + if ( neighborLabel != NumericTraits< OutputPixelType >::ZeroValue() ) | |
| { | |
| // see if current pixel is connected to its neighbor | |
| neighborValue = isIt.Get(); | |
| @@ -228,7 +228,7 @@ ConnectedComponentFunctorImageFilter< TInputImage, TOutputImage, TFunctor, TMask | |
| { | |
| label = oit.Get(); | |
| // if pixel has a label, write out the final equivalence | |
| - if ( label != NumericTraits< OutputPixelType >::Zero ) | |
| + if ( label != NumericTraits< OutputPixelType >::ZeroValue() ) | |
| { | |
| oit.Set( eqTable->Lookup(label) ); | |
| } | |
| diff --git a/Modules/Segmentation/ConnectedComponents/include/itkVectorConnectedComponentImageFilter.h b/Modules/Segmentation/ConnectedComponents/include/itkVectorConnectedComponentImageFilter.h | |
| index de85cf5..f45309f 100644 | |
| --- a/Modules/Segmentation/ConnectedComponents/include/itkVectorConnectedComponentImageFilter.h | |
| +++ b/Modules/Segmentation/ConnectedComponents/include/itkVectorConnectedComponentImageFilter.h | |
| @@ -51,7 +51,7 @@ class SimilarVectorsFunctor | |
| { | |
| public: | |
| SimilarVectorsFunctor() | |
| - { m_Threshold = itk::NumericTraits< typename TInput::ValueType >::Zero; } | |
| + { m_Threshold = itk::NumericTraits< typename TInput::ValueType >::ZeroValue(); } | |
| ~SimilarVectorsFunctor() {} | |
| @@ -72,7 +72,7 @@ public: | |
| bool operator()(const TInput & a, const TInput & b) const | |
| { | |
| typedef typename NumericTraits<typename TInput::ValueType>::RealType RealValueType; | |
| - RealValueType dotProduct = NumericTraits<RealValueType>::Zero; | |
| + RealValueType dotProduct = NumericTraits<RealValueType>::ZeroValue(); | |
| for ( unsigned int i = 0; i < NumericTraits<TInput>::GetLength(a); ++i) | |
| { | |
| dotProduct += a[i]*b[i]; | |
| diff --git a/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.hxx b/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.hxx | |
| index dedaa7d..fecd231 100644 | |
| --- a/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.hxx | |
| +++ b/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.hxx | |
| @@ -38,8 +38,8 @@ NormalVectorDiffusionFunction< TSparseImageType > | |
| this->SetRadius(r); | |
| this->SetTimeStep( static_cast< TimeStepType >( 0.5 / ImageDimension ) ); | |
| m_NormalProcessType = 0; | |
| - m_ConductanceParameter = NumericTraits< NodeValueType >::Zero; | |
| - m_FluxStopConstant = NumericTraits< NodeValueType >::Zero; | |
| + m_ConductanceParameter = NumericTraits< NodeValueType >::ZeroValue(); | |
| + m_FluxStopConstant = NumericTraits< NodeValueType >::ZeroValue(); | |
| } | |
| template< typename TSparseImageType > | |
| @@ -88,7 +88,7 @@ NormalVectorDiffusionFunction< TSparseImageType > | |
| { | |
| for ( j = 0; j < ImageDimension; j++ ) | |
| { | |
| - CenterNode->m_Flux[i][j] = NumericTraits< NodeValueType >::Zero; | |
| + CenterNode->m_Flux[i][j] = NumericTraits< NodeValueType >::ZeroValue(); | |
| } | |
| } | |
| else | |
| @@ -151,7 +151,7 @@ NormalVectorDiffusionFunction< TSparseImageType > | |
| // now compute the intrinsic derivative | |
| for ( j = 0; j < ImageDimension; j++ ) // component axis | |
| { | |
| - DotProduct = NumericTraits< NodeValueType >::Zero; | |
| + DotProduct = NumericTraits< NodeValueType >::ZeroValue(); | |
| for ( k = 0; k < ImageDimension; k++ ) // derivative axis | |
| { | |
| DotProduct += ( gradient[k][j] * CenterNode->m_ManifoldNormal[i][k] ); | |
| @@ -190,7 +190,7 @@ NormalVectorDiffusionFunction< TSparseImageType > | |
| const NeighborhoodScalesType neighborhoodScales = this->ComputeNeighborhoodScales(); | |
| - change = NumericTraits< NormalVectorType >::Zero; | |
| + change = NumericTraits< NormalVectorType >::ZeroValue(); | |
| for ( i = 0; i < ImageDimension; i++ ) // flux offset axis | |
| { | |
| NextNode = it.GetNext (i); | |
| -- | |
| 1.8.3.4 (Apple Git-47) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment