From c2f70406b9e5999ffaf080cb49d28e8f304f908e Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Tue, 25 Sep 2012 07:22:39 -0500 Subject: [PATCH 1/7] WIP: Force explicit instantiation/optimization In order to profile external applicstion built upon itk efficiently, ITK core libary should be built in an optimized mode, and only your application components that need debugging should be built with debug instrumentation. It was found that the itkIndex was the largest peformance bottle neck because it was only defined in the header, and therefore it was not possible to separate the optimization of the itkIndex class from the algorithm that needed debugging. By putting the itkIndex<3u> implementation in a highly optimized separate compilation unit, the real performance issues of the external application becomes much easier to debug. In order to get extern templates to work it is REQUIRED that the definition of the member functions occurs outside of the class. Any definition of member functions that occur inside the class are always assumed to be inline and are therefore ignored by the "extern template", thus they are compiled into every compilation unit ignoring the benefits of separate one-time comiplation. Change-Id: Ia806af7a0deb183a1b292f08e107433a16494bbf --- Modules/Core/Common/include/itkIndex.h | 221 +++++-------------- Modules/Core/Common/include/itkIndex.hxx | 263 +++++++++++++++++++++++ Modules/Core/Common/src/CMakeLists.txt | 1 + Modules/Core/Common/src/itkIndex.cxx | 14 ++ 4 files changed, 326 insertions(+), 173 deletions(-) create mode 100644 Modules/Core/Common/include/itkIndex.hxx create mode 100644 Modules/Core/Common/src/itkIndex.cxx diff --git a/Modules/Core/Common/include/itkIndex.h b/Modules/Core/Common/include/itkIndex.h index d34d03714bc..0461b93eb64 100644 --- a/Modules/Core/Common/include/itkIndex.h +++ b/Modules/Core/Common/include/itkIndex.h @@ -83,165 +83,73 @@ class Index itkStaticConstMacro(Dimension, unsigned int, VIndexDimension); /** Get the dimension (size) of the index. */ - static unsigned int GetIndexDimension() { return VIndexDimension; } + static unsigned int GetIndexDimension(); /** Compatible Size typedef. */ - typedef Size< VIndexDimension > SizeType; + typedef Size SizeType; /** Compatible Offset and Offset value typedef. */ - typedef Offset< VIndexDimension > OffsetType; - typedef ::itk::OffsetValueType OffsetValueType; + typedef Offset OffsetType; + typedef ::itk::OffsetValueType OffsetValueType; /** Lexicographic ordering functor type. */ - typedef Functor::IndexLexicographicCompare< VIndexDimension > LexicographicCompare; + typedef Functor::IndexLexicographicCompare LexicographicCompare; /** Add a size to an index. This method models a random access Index. */ - const Self - operator+(const SizeType & size) const - { - Self result; - - for ( unsigned int i = 0; i < VIndexDimension; i++ ) - { result[i] = m_Index[i] + static_cast< IndexValueType >( size[i] ); } - return result; - } + const Self operator+(const SizeType & size) const; /** Increment index by a size. This method models a random access Index. */ - const Self & - operator+=(const SizeType & size) - { - for ( unsigned int i = 0; i < VIndexDimension; i++ ) - { m_Index[i] += static_cast< IndexValueType >( size[i] ); } - return *this; - } - - /** Subtract a size from an index. This method models a random access Index. - */ - const Self - operator-(const SizeType & size) const - { - Self result; + const Self & operator+=(const SizeType & size); - for ( unsigned int i = 0; i < VIndexDimension; i++ ) - { result[i] = m_Index[i] - static_cast< IndexValueType >( size[i] ); } - return result; - } + /** Subtract a size from an index. This method models a random access Index. */ + const Self operator-(const SizeType & size) const; /** Decrement index by a size. This method models a random access Index. */ - const Self & - operator-=(const SizeType & size) - { - for ( unsigned int i = 0; i < VIndexDimension; i++ ) - { m_Index[i] -= static_cast< IndexValueType >( size[i] ); } - return *this; - } + const Self & operator-=(const SizeType & size); /** Add an offset to an index. */ - const Self - operator+(const OffsetType & offset) const - { - Self result; - - for ( unsigned int i = 0; i < VIndexDimension; i++ ) - { result[i] = m_Index[i] + offset[i]; } - return result; - } + const Self operator+(const OffsetType & offset) const; /** Increment index by an offset. This method models a random access Index. */ - const Self & - operator+=(const OffsetType & offset) - { - for ( unsigned int i = 0; i < VIndexDimension; i++ ) - { m_Index[i] += offset[i]; } - return *this; - } + const Self & operator+=(const OffsetType & offset); /** Decrement index by an offset. This method models a random access Index. */ - const Self & - operator-=(const OffsetType & offset) - { - for ( unsigned int i = 0; i < VIndexDimension; i++ ) - { m_Index[i] -= offset[i]; } - return *this; - } + const Self & operator-=(const OffsetType & offset); /** Subtract an offset from an index. */ - const Self - operator-(const OffsetType & off) const - { - Self result; - - for ( unsigned int i = 0; i < VIndexDimension; i++ ) - { result[i] = m_Index[i] - off.m_Offset[i]; } - return result; - } + const Self operator-(const OffsetType & off) const; /** Subtract two indices. This method models a random access Index. */ - const OffsetType - operator-(const Self & vec) const - { - OffsetType result; - - for ( unsigned int i = 0; i < VIndexDimension; i++ ) - { result[i] = m_Index[i] - vec.m_Index[i]; } - return result; - } + const OffsetType operator-(const Self & vec) const; /** Multiply an index by a size (elementwise product). This method * models a random access Index. */ - const Self - operator*(const SizeType & vec) const - { - Self result; - - for ( unsigned int i = 0; i < VIndexDimension; i++ ) - { result[i] = m_Index[i] * static_cast< IndexValueType >( vec.m_Size[i] ); } - return result; - } + const Self operator*(const SizeType & vec) const; /** Compare two indices. */ - bool - operator==(const Self & vec) const - { - bool same = true; - - for ( unsigned int i = 0; i < VIndexDimension && same; i++ ) - { same = ( m_Index[i] == vec.m_Index[i] ); } - return same; - } + bool operator==(const Self & vec) const; /** Compare two indices. */ - bool - operator!=(const Self & vec) const - { - bool same = true; - - for ( unsigned int i = 0; i < VIndexDimension && same; i++ ) - { same = ( m_Index[i] == vec.m_Index[i] ); } - return !same; - } + bool operator!=(const Self & vec) const; /** Access an element of the index. Elements are numbered * 0, ..., VIndexDimension-1. No bounds checking is performed. */ - IndexValueType & operator[](unsigned int dim) - { return m_Index[dim]; } + IndexValueType & operator[](const unsigned int dim); /** Access an element of the index. Elements are numbered * 0, ..., VIndexDimension-1. This version can only be an rvalue. * No bounds checking is performed. */ - IndexValueType operator[](unsigned int dim) const - { return m_Index[dim]; } + IndexValueType operator[](const unsigned int dim) const; /** Get the index. This provides a read only reference to the index. * \sa SetIndex() */ - const IndexValueType * GetIndex() const { return m_Index; } + const IndexValueType * GetIndex() const; /** Set the index. * Try to prototype this function so that val has to point to a block of * memory that is the appropriate size. * \sa GetIndex() */ - void SetIndex(const IndexValueType val[VIndexDimension]) - { memcpy(m_Index, val, sizeof( IndexValueType ) * VIndexDimension); } + void SetIndex(const IndexValueType val[VIndexDimension]); /** Sets the value of one of the elements in the index. * This method is mainly intended to facilitate the access to elements @@ -249,8 +157,7 @@ class Index * \warning No bound checking is performed * \sa SetIndex() * \sa GetElement() */ - void SetElement(unsigned long element, IndexValueType val) - { m_Index[element] = val; } + void SetElement(const unsigned long element, const IndexValueType val); /** Gets the value of one of the elements in the index. * This method is mainly intended to facilitate the access to elements @@ -258,18 +165,16 @@ class Index * \warning No bound checking is performed * \sa GetIndex() * \sa SetElement() */ - IndexValueType GetElement(unsigned long element) const - { return m_Index[element]; } + IndexValueType GetElement(const unsigned long element) const; /** Return a basis vector of the form [0, ..., 0, 1, 0, ... 0] where the "1" * is positioned in the location specified by the parameter "dim". Valid * values of "dim" are 0, ..., VIndexDimension-1. */ - static Self GetBasisIndex(unsigned int dim); + static Self GetBasisIndex(const unsigned int dim); /** Set one value for the index in all dimensions. Useful for initializing * an offset to zero. */ - void Fill(IndexValueType value) - { for ( unsigned int i = 0; i < VIndexDimension; ++i ) { m_Index[i] = value; } } + void Fill(const IndexValueType value); /** Index is an "aggregate" class. Its data is public (m_Index) * allowing for fast and convenient instantiations/assignments. @@ -279,8 +184,8 @@ class Index IndexValueType m_Index[VIndexDimension]; /** Copy values from a FixedArray by rounding each one of the components */ - template< class TCoordRep > - inline void CopyWithRound(const FixedArray< TCoordRep, VIndexDimension > & point) + template + inline void CopyWithRound(const FixedArray & point) { itkForLoopRoundingAndAssignmentMacro(IndexType, ContinuousIndexType, @@ -298,21 +203,21 @@ class Index } /** Copy values from a FixedArray by casting each one of the components */ - template< class TCoordRep > - inline void CopyWithCast(const FixedArray< TCoordRep, VIndexDimension > & point) + template + inline void CopyWithCast(const FixedArray & point) { - for ( unsigned int i = 0; i < VIndexDimension; ++i ) + for( unsigned int i = 0; i < VIndexDimension; ++i ) { - m_Index[i] = static_cast< IndexValueType >( point[i] ); + m_Index[i] = static_cast( point[i] ); } } // force gccxml to find the constructors found before the internal upgrade to // gcc 4.2 #if defined( CABLE_CONFIGURATION ) - Index(); //purposely not implemented - Index(const Self &); //purposely not implemented - void operator=(const Self &); //purposely not implemented + Index(); // purposely not implemented + Index(const Self &); // purposely not implemented + void operator=(const Self &); // purposely not implemented #endif }; @@ -327,56 +232,26 @@ namespace Functor * little geometric meaning. * \ingroup ITKCommon */ -template< unsigned int VIndexDimension > +template class IndexLexicographicCompare { public: - bool operator()(Index< VIndexDimension > const & l, - Index< VIndexDimension > const & r) const - { - for ( unsigned int i = 0; i < VIndexDimension; ++i ) - { - if ( l.m_Index[i] < r.m_Index[i] ) - { - return true; - } - else if ( l.m_Index[i] > r.m_Index[i] ) - { - return false; - } - } - return false; - } + bool operator()(Index const & l, Index const & r) const; + }; } -template< unsigned int VIndexDimension > -Index< VIndexDimension > -Index< VIndexDimension > -::GetBasisIndex(unsigned int dim) -{ - Self ind; +} // end namespace itk - memset(ind.m_Index, 0, sizeof( IndexValueType ) * VIndexDimension); - ind.m_Index[dim] = 1; - return ind; -} +extern template class itk::Index<2u>; +extern template class itk::Index<3u>; +extern template class itk::Index<4u>; +extern template class itk::Functor::IndexLexicographicCompare<2u>; +extern template class itk::Functor::IndexLexicographicCompare<3u>; +extern template class itk::Functor::IndexLexicographicCompare<4u>; -template< unsigned int VIndexDimension > -std::ostream & operator<<(std::ostream & os, const Index< VIndexDimension > & ind) -{ - os << "["; - for ( unsigned int i = 0; i + 1 < VIndexDimension; ++i ) - { - os << ind[i] << ", "; - } - if ( VIndexDimension >= 1 ) - { - os << ind[VIndexDimension - 1]; - } - os << "]"; - return os; -} -} // end namespace itk +#ifndef ITK_MANUAL_INSTANTIATION +#include "itkIndex.hxx" +#endif #endif diff --git a/Modules/Core/Common/include/itkIndex.hxx b/Modules/Core/Common/include/itkIndex.hxx new file mode 100644 index 00000000000..0c14e0f319c --- /dev/null +++ b/Modules/Core/Common/include/itkIndex.hxx @@ -0,0 +1,263 @@ +#include "itkIndex.h" + +namespace itk +{ + +template +std::ostream & operator<<(std::ostream & os, const Index & ind) +{ + os << "["; + for( unsigned int i = 0; i + 1 < VIndexDimension; ++i ) + { + os << ind[i] << ", "; + } + if( VIndexDimension >= 1 ) + { + os << ind[VIndexDimension - 1]; + } + os << "]"; + return os; +} + +template +unsigned int +Index::GetIndexDimension() +{ + return VIndexDimension; +} + +template +const typename Index::Self +Index::operator+(const SizeType & size) const +{ + Self result; + + for( unsigned int i = 0; i < VIndexDimension; i++ ) + { + result[i] = m_Index[i] + static_cast( size[i] ); + } + return result; +} + +template +const typename Index::Self & +Index::operator+=(const SizeType & size) +{ + for( unsigned int i = 0; i < VIndexDimension; i++ ) + { + m_Index[i] += static_cast( size[i] ); + } + return *this; +} + +template +const typename Index::Self +Index::operator-(const SizeType & size) const +{ + Self result; + + for( unsigned int i = 0; i < VIndexDimension; i++ ) + { + result[i] = m_Index[i] - static_cast( size[i] ); + } + return result; +} + +template +const typename Index::Self & +Index::operator-=(const SizeType & size) +{ + for( unsigned int i = 0; i < VIndexDimension; i++ ) + { + m_Index[i] -= static_cast( size[i] ); + } + return *this; +} + +template +const typename Index::Self +Index::operator+(const OffsetType & offset) const +{ + Self result; + + for( unsigned int i = 0; i < VIndexDimension; i++ ) + { + result[i] = m_Index[i] + offset[i]; + } + return result; +} + +template +const typename Index::Self & +Index::operator+=(const OffsetType & offset) +{ + for( unsigned int i = 0; i < VIndexDimension; i++ ) + { + m_Index[i] += offset[i]; + } + return *this; +} + +template +const typename Index::Self & +Index::operator-=(const OffsetType & offset) +{ + for( unsigned int i = 0; i < VIndexDimension; i++ ) + { + m_Index[i] -= offset[i]; + } + return *this; +} + +template +const typename Index::Self +Index::operator-(const OffsetType & off) const +{ + Self result; + + for( unsigned int i = 0; i < VIndexDimension; i++ ) + { + result[i] = m_Index[i] - off.m_Offset[i]; + } + return result; +} + +template +const typename Index::OffsetType +Index::operator-(const Self & vec) const +{ + OffsetType result; + + for( unsigned int i = 0; i < VIndexDimension; i++ ) + { + result[i] = m_Index[i] - vec.m_Index[i]; + } + return result; +} + +template +const typename Index::Self +Index::operator*(const SizeType & vec) const +{ + Self result; + + for( unsigned int i = 0; i < VIndexDimension; i++ ) + { + result[i] = m_Index[i] * static_cast( vec.m_Size[i] ); + } + return result; +} + +template +bool +Index::operator==(const Self & vec) const +{ + bool same = true; + + for( unsigned int i = 0; i < VIndexDimension && same; i++ ) + { + same = ( m_Index[i] == vec.m_Index[i] ); + } + return same; +} + +template +bool +Index::operator!=(const Self & vec) const +{ + bool same = true; + + for( unsigned int i = 0; i < VIndexDimension && same; i++ ) + { + same = ( m_Index[i] == vec.m_Index[i] ); + } + return !same; +} + +template +typename Index::IndexValueType & +Index::operator[](const unsigned int dim) +{ + return m_Index[dim]; +} + +template +typename Index::IndexValueType +Index::operator[](const unsigned int dim) const +{ + return m_Index[dim]; +} + +template +const typename Index::IndexValueType +* Index::GetIndex() const + { + return m_Index; + } + +template +void +Index::SetIndex(const IndexValueType val[VIndexDimension]) +{ + memcpy(m_Index, val, sizeof( IndexValueType ) * VIndexDimension); +} + +template +void +Index::SetElement(const unsigned long element, const IndexValueType val) +{ + m_Index[element] = val; +} + +template +typename Index::IndexValueType +Index::GetElement(const unsigned long element) const +{ + return m_Index[element]; +} + +template +typename Index::Self +Index::GetBasisIndex(const unsigned int dim) +{ + Self ind; + + memset(ind.m_Index, 0, sizeof( IndexValueType ) * VIndexDimension); + ind.m_Index[dim] = 1; + return ind; +} + +template +void +Index::Fill(const IndexValueType value) +{ + for( unsigned int i = 0; i < VIndexDimension; ++i ) + { + m_Index[i] = value; + } +} + +namespace Functor +{ +template +bool +IndexLexicographicCompare +::operator()(Index const & l, + Index const & r) const +{ + for( unsigned int i = 0; i < VIndexDimension; ++i ) + { + if( l.m_Index[i] < r.m_Index[i] ) + { + return true; + } + else if( l.m_Index[i] > r.m_Index[i] ) + { + return false; + } + } + return false; +} + +} // End namepace Functor +} // End namespace itk diff --git a/Modules/Core/Common/src/CMakeLists.txt b/Modules/Core/Common/src/CMakeLists.txt index d21ca17fa2c..f2f57f94224 100644 --- a/Modules/Core/Common/src/CMakeLists.txt +++ b/Modules/Core/Common/src/CMakeLists.txt @@ -5,6 +5,7 @@ itkNumericTraits.cxx itkMutexLock.cxx itkHexahedronCellTopology.cxx itkIndent.cxx +itkIndex.cxx itkEventObject.cxx itkFileOutputWindow.cxx itkSimpleFilterWatcher.cxx diff --git a/Modules/Core/Common/src/itkIndex.cxx b/Modules/Core/Common/src/itkIndex.cxx new file mode 100644 index 00000000000..a61df7a0e5d --- /dev/null +++ b/Modules/Core/Common/src/itkIndex.cxx @@ -0,0 +1,14 @@ +// This class is simply to for explicit +// instantiation of the most common +// index types into a class that can +// be compiled independant of the main +// body of code +#include "itkIndex.h" + +template class itk::Index<2u>; +template class itk::Index<3u>; +template class itk::Index<4u>; + +template class itk::Functor::IndexLexicographicCompare<2u>; +template class itk::Functor::IndexLexicographicCompare<3u>; +template class itk::Functor::IndexLexicographicCompare<4u>; From b5fdfddaf618e0d97b13c0f6278caeec0f6fba4e Mon Sep 17 00:00:00 2001 From: Jessica Forbes Date: Mon, 29 Oct 2012 12:10:14 -0500 Subject: [PATCH 2/7] ENH: Moved definition to .hxx. Change-Id: I624425a0e0edb77405c36166ec99f0fd78a8c2f2 --- .../Core/Common/include/itkAnnulusOperator.h | 98 ++--- .../Common/include/itkAnnulusOperator.hxx | 215 ++++++++++ Modules/Core/Common/include/itkArray.h | 20 +- Modules/Core/Common/include/itkArray.hxx | 56 +++ Modules/Core/Common/include/itkArray2D.h | 4 +- Modules/Core/Common/include/itkArray2D.hxx | 14 + .../itkAutoPointerDataObjectDecorator.h | 4 +- .../itkAutoPointerDataObjectDecorator.hxx | 18 + .../include/itkBackwardDifferenceOperator.h | 5 +- .../include/itkBackwardDifferenceOperator.hxx | 17 + .../Core/Common/include/itkBresenhamLine.h | 4 +- .../Core/Common/include/itkBresenhamLine.hxx | 14 + Modules/Core/Common/include/itkByteSwapper.h | 4 +- .../Core/Common/include/itkByteSwapper.hxx | 16 + .../Core/Common/include/itkCellInterface.h | 20 +- .../Core/Common/include/itkCellInterface.hxx | 142 +++++++ .../Common/include/itkChildTreeIterator.h | 10 +- .../Common/include/itkChildTreeIterator.hxx | 15 + .../include/itkConditionalConstIterator.h | 13 +- .../include/itkConditionalConstIterator.hxx | 31 +- ...onicShellInteriorExteriorSpatialFunction.h | 2 +- ...icShellInteriorExteriorSpatialFunction.hxx | 9 + .../include/itkConstNeighborhoodIterator.h | 148 ++----- .../include/itkConstNeighborhoodIterator.hxx | 393 +++++++++++++++++- Modules/Core/Common/include/itkImage.h | 40 ++ Modules/Core/Common/include/itkImageBase.h | 3 + Modules/Core/Common/include/itkIndex.hxx | 21 + .../include/itkLevelOrderTreeIterator.h | 9 +- .../include/itkLevelOrderTreeIterator.hxx | 14 + .../Common/include/itkVariableSizeMatrix.h | 60 +-- .../Common/include/itkVariableSizeMatrix.hxx | 94 +++++ .../itkVectorNeighborhoodInnerProduct.h | 8 +- .../itkVectorNeighborhoodInnerProduct.hxx | 9 + Modules/Core/Common/include/itkVersor.h | 8 +- Modules/Core/Common/include/itkVersor.hxx | 36 ++ Modules/Core/Common/src/CMakeLists.txt | 8 +- .../src/itkCommonExplicitInstantiation.cxx | 60 +++ Modules/Core/Common/src/itkIndex.cxx | 14 - 38 files changed, 1326 insertions(+), 330 deletions(-) create mode 100644 Modules/Core/Common/src/itkCommonExplicitInstantiation.cxx delete mode 100644 Modules/Core/Common/src/itkIndex.cxx diff --git a/Modules/Core/Common/include/itkAnnulusOperator.h b/Modules/Core/Common/include/itkAnnulusOperator.h index 8bc59a976d0..4517fac0cf4 100644 --- a/Modules/Core/Common/include/itkAnnulusOperator.h +++ b/Modules/Core/Common/include/itkAnnulusOperator.h @@ -80,6 +80,11 @@ class ITK_EXPORT AnnulusOperator: typedef typename Superclass::OffsetType OffsetType; typedef Vector< double, TDimension > SpacingType; + /** Typedef support for coefficient vector type. Necessary to + * work around compiler bug on VC++. */ + typedef typename Superclass::CoefficientVector CoefficientVector; + typedef typename Superclass::PixelType PixelType; + itkTypeMacro(AnnulusOperator, NeighborhoodOperator); AnnulusOperator(): @@ -109,102 +114,53 @@ class ITK_EXPORT AnnulusOperator: /** Set/Get the inner radius of the annulus. Radius is specified in * physical units (mm). */ - void SetInnerRadius(double r) - { m_InnerRadius = r; } - double GetInnerRadius() const - { return m_InnerRadius; } + void SetInnerRadius(double r); + double GetInnerRadius() const; /** Set/Get the thickness of the annulus. The outer radius of the * annulus is defined as r = InnerRadius + Thickness. Thickness is * specified in physical units (mm). */ - void SetThickness(double t) - { m_Thickness = t; } - double GetThickness() const - { return m_Thickness; } + void SetThickness(double t); + double GetThickness() const; /** Set/Get the pixel spacings. Setting these ensures the annulus * is round in physical space. Defaults to 1. */ - void SetSpacing(SpacingType & s) - { m_Spacing = s; } - const SpacingType & GetSpacing() const - { return m_Spacing; } + void SetSpacing(SpacingType & s); + const SpacingType & GetSpacing() const; /** Set/Get whether kernel values are computed automatically or * specified manually */ - void SetNormalize(bool b) - { m_Normalize = b; } - bool GetNormalize() const - { return m_Normalize; } - void NormalizeOn() - { this->SetNormalize(true); } - void NormalizeOff() - { this->SetNormalize(false); } + void SetNormalize(bool b); + bool GetNormalize() const; + void NormalizeOn(); + void NormalizeOff(); /** If Normalize is on, you define the annulus to have a bright * center or a dark center. */ - void SetBrightCenter(bool b) - { m_BrightCenter = b; } - bool GetBrightCenter() const - { return m_BrightCenter; } - void BrightCenterOn() - { this->SetBrightCenter(true); } - void BrightCenterOff() - { this->SetBrightCenter(false); } + void SetBrightCenter(bool b); + bool GetBrightCenter() const; + void BrightCenterOn(); + void BrightCenterOff(); /** If Normalize is off, the interior to annulus, the * annulus (region between the two circles), and the region exterior to the * annulus to be defined manually. Defauls are 0, 1, 0 * respectively. */ - void SetInteriorValue(TPixel v) - { m_InteriorValue = v; } - TPixel GetInteriorValue() const - { return m_InteriorValue; } - void SetAnnulusValue(TPixel v) - { m_AnnulusValue = v; } - TPixel GetAnnulusValue() const - { return m_AnnulusValue; } - void SetExteriorValue(TPixel v) - { m_ExteriorValue = v; } - TPixel GetExteriorValue() const - { return m_ExteriorValue; } + void SetInteriorValue(TPixel v); + PixelType GetInteriorValue() const; + void SetAnnulusValue(TPixel v); + PixelType GetAnnulusValue() const; + void SetExteriorValue(TPixel v); + PixelType GetExteriorValue() const; /** Assignment operator */ - Self & operator=(const Self & other) - { - Superclass::operator=(other); - m_InnerRadius = other.m_InnerRadius; - m_Thickness = other.m_Thickness; - m_Spacing = other.m_Spacing; - m_InteriorValue = other.m_InteriorValue; - m_AnnulusValue = other.m_AnnulusValue; - m_ExteriorValue = other.m_ExteriorValue; - m_Normalize = other.m_Normalize; - m_BrightCenter = other.m_BrightCenter; - return *this; - } + Self & operator=(const Self & other); /** Prints some debugging information */ - virtual void PrintSelf(std::ostream & os, Indent i) const - { - os << i << "AnnulusOperator { this=" << this - << ", m_InnerRadius = " << m_InnerRadius - << ", m_Thickness = " << m_Thickness - << ", m_Spacing = " << m_Spacing - << ", m_Normalize = " << m_Normalize - << ", m_BrightCenter = " << m_BrightCenter - << ", m_InteriorValue = " << m_InteriorValue - << ", m_ExteriorValue = " << m_ExteriorValue - << "}" << std::endl; - Superclass::PrintSelf( os, i.GetNextIndent() ); - } + virtual void PrintSelf(std::ostream & os, Indent i) const; protected: - /** Typedef support for coefficient vector type. Necessary to - * work around compiler bug on VC++. */ - typedef typename Superclass::CoefficientVector CoefficientVector; - typedef typename Superclass::PixelType PixelType; - /** Calculates operator coefficients. */ CoefficientVector GenerateCoefficients(); diff --git a/Modules/Core/Common/include/itkAnnulusOperator.hxx b/Modules/Core/Common/include/itkAnnulusOperator.hxx index 937b2a41ba9..08c02f51c44 100644 --- a/Modules/Core/Common/include/itkAnnulusOperator.hxx +++ b/Modules/Core/Common/include/itkAnnulusOperator.hxx @@ -37,6 +37,221 @@ AnnulusOperator< TPixel, TDimension, TAllocator > this->Fill(coefficients); } +/** Set/Get the inner radius of the annulus. Radius is specified in +* physical units (mm). */ +template< class TPixel, unsigned int TDimension, class TAllocator > +void +AnnulusOperator< TPixel, TDimension, TAllocator > +::SetInnerRadius(double r) +{ + m_InnerRadius = r; +} + +template< class TPixel, unsigned int TDimension, class TAllocator > +double +AnnulusOperator< TPixel, TDimension, TAllocator > +::GetInnerRadius() const +{ + return m_InnerRadius; +} + +/** Set/Get the thickness of the annulus. The outer radius of the + * annulus is defined as r = InnerRadius + Thickness. Thickness is + * specified in physical units (mm). */ +template< class TPixel, unsigned int TDimension, class TAllocator > +void +AnnulusOperator< TPixel, TDimension, TAllocator > +::SetThickness(double t) +{ + m_Thickness = t; +} + +template< class TPixel, unsigned int TDimension, class TAllocator > +double +AnnulusOperator< TPixel, TDimension, TAllocator > +::GetThickness() const +{ + return m_Thickness; +} + +/** Set/Get the pixel spacings. Setting these ensures the annulus + * is round in physical space. Defaults to 1. */ +template< class TPixel, unsigned int TDimension, class TAllocator > +void +AnnulusOperator< TPixel, TDimension, TAllocator > +::SetSpacing(SpacingType & s) +{ + m_Spacing = s; +} + +/** Set/Get the pixel spacings. Setting these ensures the annulus + * is round in physical space. Defaults to 1. */ +template< class TPixel, unsigned int TDimension, class TAllocator > +const typename AnnulusOperator< TPixel, TDimension, TAllocator >::SpacingType & +AnnulusOperator< TPixel, TDimension, TAllocator > +::GetSpacing() const +{ + return m_Spacing; +} + +/** Set/Get whether kernel values are computed automatically or + * specified manually */ +template< class TPixel, unsigned int TDimension, class TAllocator > +void +AnnulusOperator< TPixel, TDimension, TAllocator > +::SetNormalize(bool b) +{ + m_Normalize = b; +} + +template< class TPixel, unsigned int TDimension, class TAllocator > +bool +AnnulusOperator< TPixel, TDimension, TAllocator > +::GetNormalize() const +{ + return m_Normalize; +} + +template< class TPixel, unsigned int TDimension, class TAllocator > +void +AnnulusOperator< TPixel, TDimension, TAllocator > +::NormalizeOn() +{ + this->SetNormalize(true); +} + +template< class TPixel, unsigned int TDimension, class TAllocator > +void +AnnulusOperator< TPixel, TDimension, TAllocator > +::NormalizeOff() +{ + this->SetNormalize(false); +} + +/** If Normalize is on, you define the annulus to have a bright + * center or a dark center. */ +template< class TPixel, unsigned int TDimension, class TAllocator > +void +AnnulusOperator< TPixel, TDimension, TAllocator > +::SetBrightCenter(bool b) +{ + m_BrightCenter = b; +} + +template< class TPixel, unsigned int TDimension, class TAllocator > +bool +AnnulusOperator< TPixel, TDimension, TAllocator > +::GetBrightCenter() const +{ + return m_BrightCenter; +} + +template< class TPixel, unsigned int TDimension, class TAllocator > +void +AnnulusOperator< TPixel, TDimension, TAllocator > +::BrightCenterOn() +{ + this->SetBrightCenter(true); +} + +template< class TPixel, unsigned int TDimension, class TAllocator > +void +AnnulusOperator< TPixel, TDimension, TAllocator > +::BrightCenterOff() +{ + this->SetBrightCenter(false); +} + +/** If Normalize is off, the interior to annulus, the + * annulus (region between the two circles), and the region exterior to the + * annulus to be defined manually. Defauls are 0, 1, 0 + * respectively. */ +template< class TPixel, unsigned int TDimension, class TAllocator > +void +AnnulusOperator< TPixel, TDimension, TAllocator > +::SetInteriorValue(TPixel v) +{ + m_InteriorValue = v; +} + +template< class TPixel, unsigned int TDimension, class TAllocator > +typename AnnulusOperator< TPixel, TDimension, TAllocator >::PixelType +AnnulusOperator< TPixel, TDimension, TAllocator > +::GetInteriorValue() const +{ + return m_InteriorValue; +} + +template< class TPixel, unsigned int TDimension, class TAllocator > +void +AnnulusOperator< TPixel, TDimension, TAllocator > +::SetAnnulusValue(TPixel v) +{ + m_AnnulusValue = v; +} + +template< class TPixel, unsigned int TDimension, class TAllocator > +typename AnnulusOperator< TPixel, TDimension, TAllocator > +::PixelType +AnnulusOperator< TPixel, TDimension, TAllocator > +::GetAnnulusValue() const +{ + return m_AnnulusValue; +} + +template< class TPixel, unsigned int TDimension, class TAllocator > +void +AnnulusOperator< TPixel, TDimension, TAllocator > +::SetExteriorValue(TPixel v) +{ + m_ExteriorValue = v; +} + +template< class TPixel, unsigned int TDimension, class TAllocator > +typename AnnulusOperator< TPixel, TDimension, TAllocator > +::PixelType +AnnulusOperator< TPixel, TDimension, TAllocator > +::GetExteriorValue() const +{ + return m_ExteriorValue; +} + +/** Assignment operator */ +template< class TPixel, unsigned int TDimension, class TAllocator > +AnnulusOperator< TPixel, TDimension, TAllocator > & +AnnulusOperator< TPixel, TDimension, TAllocator > +::operator=(const Self & other) +{ + Superclass::operator=(other); + m_InnerRadius = other.m_InnerRadius; + m_Thickness = other.m_Thickness; + m_Spacing = other.m_Spacing; + m_InteriorValue = other.m_InteriorValue; + m_AnnulusValue = other.m_AnnulusValue; + m_ExteriorValue = other.m_ExteriorValue; + m_Normalize = other.m_Normalize; + m_BrightCenter = other.m_BrightCenter; + return *this; +} + +/** Prints some debugging information */ +template< class TPixel, unsigned int TDimension, class TAllocator > +void +AnnulusOperator< TPixel, TDimension, TAllocator > +::PrintSelf(std::ostream & os, Indent i) const +{ + os << i << "AnnulusOperator { this=" << this + << ", m_InnerRadius = " << m_InnerRadius + << ", m_Thickness = " << m_Thickness + << ", m_Spacing = " << m_Spacing + << ", m_Normalize = " << m_Normalize + << ", m_BrightCenter = " << m_BrightCenter + << ", m_InteriorValue = " << m_InteriorValue + << ", m_ExteriorValue = " << m_ExteriorValue + << "}" << std::endl; + Superclass::PrintSelf( os, i.GetNextIndent() ); +} + /** This function fills the coefficients into the corresponding * neighborhood. */ template< class TPixel, unsigned int TDimension, class TAllocator > diff --git a/Modules/Core/Common/include/itkArray.h b/Modules/Core/Common/include/itkArray.h index eab9766bf3e..f128fe2f705 100644 --- a/Modules/Core/Common/include/itkArray.h +++ b/Modules/Core/Common/include/itkArray.h @@ -100,10 +100,7 @@ class Array : public vnl_vector< TValueType > } /** Set the all the elements of the array to the specified value */ - void Fill(TValueType const & v) - { - this->fill(v); - } + void Fill(TValueType const & v); /** Copy opertor */ const Self & operator=(const Self & rhs); @@ -111,24 +108,19 @@ class Array : public vnl_vector< TValueType > const Self & operator=(const VnlVectorType & rhs); /** Return the number of elements in the Array */ - SizeValueType Size(void) const - { return static_cast( this->size() ); } - unsigned int GetNumberOfElements(void) const - { return static_cast( this->size() ); } + SizeValueType Size(void) const; + unsigned int GetNumberOfElements(void) const; /** Get one element */ - const TValueType & GetElement(SizeValueType i) const - { return this->operator[](i); } + const ValueType & GetElement(SizeValueType i) const; /** Set one element */ - void SetElement(SizeValueType i, const TValueType & value) - { this->operator[](i) = value; } + void SetElement(SizeValueType i, const TValueType & value); /** Destructively set the size to that given. Will lose data. */ void SetSize(SizeValueType sz); - SizeValueType GetSize(void) const - { return static_cast< SizeValueType >( this->size() ); } + SizeValueType GetSize(void) const; /** Set the pointer from which the data is imported. * If "LetArrayManageMemory" is false, then the application retains diff --git a/Modules/Core/Common/include/itkArray.hxx b/Modules/Core/Common/include/itkArray.hxx index 1e96d3f8988..fbbddd78bfe 100644 --- a/Modules/Core/Common/include/itkArray.hxx +++ b/Modules/Core/Common/include/itkArray.hxx @@ -82,6 +82,41 @@ Array< TValueType > } } +/** Return the number of elements in the Array */ +template< typename TValueType > +typename Array< TValueType >::SizeValueType +Array< TValueType > +::Size(void) const +{ + return static_cast( this->size() ); +} + +/** Return the number of elements in the Array */ +template< typename TValueType > +unsigned int +Array< TValueType > +::GetNumberOfElements(void) const +{ + return static_cast( this->size() ); +} + +/** Get one element */ +template< typename TValueType > +const typename Array< TValueType >::ValueType & +Array< TValueType > +::GetElement(SizeValueType i) const +{ + return this->operator[](i); +} + +template< typename TValueType > +typename Array< TValueType >::SizeValueType +Array< TValueType > +::GetSize(void) const +{ + return static_cast< SizeValueType >( this->size() ); +} + /** Set the pointer from which the data is imported. * If "LetArrayManageMemory" is false, then the application retains * the responsibility of freeing the memory for this data. If @@ -184,6 +219,27 @@ Array< TValueType > return *this; } + +/** Set the all the elements of the array to the specified value */ +template< typename TValueType > +void +Array< TValueType > +::Fill(TValueType const & v) +{ + this->fill(v); +} + +/** Set one element */ +template< typename TValueType > +void +Array< TValueType > +::SetElement(SizeValueType i, const TValueType & value) +{ + this->operator[](i) = value; +} + + + } // namespace itk #endif diff --git a/Modules/Core/Common/include/itkArray2D.h b/Modules/Core/Common/include/itkArray2D.h index 617e8a261f1..2c16e6874d0 100644 --- a/Modules/Core/Common/include/itkArray2D.h +++ b/Modules/Core/Common/include/itkArray2D.h @@ -61,14 +61,14 @@ class Array2D:public vnl_matrix< TValueType > const Self & operator=(const VnlMatrixType & matrix); - void Fill(TValueType const & v) { this->fill(v); } + void Fill(TValueType const & v); /** Destructively set the size to that given. Will lose data. */ void SetSize(unsigned int m, unsigned int n); /** This destructor is not virtual for performance reasons. However, this * means that subclasses cannot allocate memory. */ - ~Array2D() {} + ~Array2D(); }; template< typename TValueType > diff --git a/Modules/Core/Common/include/itkArray2D.hxx b/Modules/Core/Common/include/itkArray2D.hxx index dde69c98a34..415a0f36059 100644 --- a/Modules/Core/Common/include/itkArray2D.hxx +++ b/Modules/Core/Common/include/itkArray2D.hxx @@ -28,6 +28,13 @@ Array2D< TValueType > ::Array2D():vnl_matrix< TValueType >() {} +template< typename TValueType > +Array2D< TValueType > +::~Array2D() +{ + +} + /** Constructor with number of rows and columns as arguments */ template< typename TValueType > Array2D< TValueType > @@ -67,6 +74,13 @@ Array2D< TValueType > return *this; } +template< typename TValueType > +void Array2D< TValueType > +::Fill(TValueType const & v) +{ + this->fill(v); +} + /** Set the size of the array */ template< typename TValueType > void Array2D< TValueType > diff --git a/Modules/Core/Common/include/itkAutoPointerDataObjectDecorator.h b/Modules/Core/Common/include/itkAutoPointerDataObjectDecorator.h index 98190b12148..b93ec3f333c 100644 --- a/Modules/Core/Common/include/itkAutoPointerDataObjectDecorator.h +++ b/Modules/Core/Common/include/itkAutoPointerDataObjectDecorator.h @@ -81,8 +81,8 @@ class ITK_EXPORT AutoPointerDataObjectDecorator:public DataObject virtual void Set(T *val); /** Get the contained object */ - virtual T * Get() { return m_Component.get(); } - virtual const T * Get() const { return m_Component.get(); } + virtual T * Get(); + virtual const T * Get() const; protected: AutoPointerDataObjectDecorator(); diff --git a/Modules/Core/Common/include/itkAutoPointerDataObjectDecorator.hxx b/Modules/Core/Common/include/itkAutoPointerDataObjectDecorator.hxx index 49044f14f7d..5875abe5935 100644 --- a/Modules/Core/Common/include/itkAutoPointerDataObjectDecorator.hxx +++ b/Modules/Core/Common/include/itkAutoPointerDataObjectDecorator.hxx @@ -59,6 +59,24 @@ AutoPointerDataObjectDecorator< T > } } +/** Get the contained object */ +template< class T > +T * +AutoPointerDataObjectDecorator< T > +::Get() +{ + return m_Component.get(); +} + +/** Get the contained object */ +template< class T > +const T * +AutoPointerDataObjectDecorator< T > +::Get() const +{ + return m_Component.get(); +} + /** PrintSelf method */ template< class T > void diff --git a/Modules/Core/Common/include/itkBackwardDifferenceOperator.h b/Modules/Core/Common/include/itkBackwardDifferenceOperator.h index 4c31f47c61e..b70b30d31d2 100644 --- a/Modules/Core/Common/include/itkBackwardDifferenceOperator.h +++ b/Modules/Core/Common/include/itkBackwardDifferenceOperator.h @@ -55,7 +55,7 @@ class ITK_EXPORT BackwardDifferenceOperator: typedef typename Superclass::PixelType PixelType; /** Constructor. */ - BackwardDifferenceOperator() {} + BackwardDifferenceOperator(); protected: /** Necessary to work around a compiler bug in VC++. */ @@ -65,8 +65,7 @@ class ITK_EXPORT BackwardDifferenceOperator: CoefficientVector GenerateCoefficients(); /** Arranges coefficients spatially in the memory buffer. */ - void Fill(const CoefficientVector & coeff) - { this->FillCenteredDirectional(coeff); } + void Fill(const CoefficientVector & coeff); private: BackwardDifferenceOperator(const Self & other); //purposely not implemented diff --git a/Modules/Core/Common/include/itkBackwardDifferenceOperator.hxx b/Modules/Core/Common/include/itkBackwardDifferenceOperator.hxx index 61e0f364d4c..80e5ca29929 100644 --- a/Modules/Core/Common/include/itkBackwardDifferenceOperator.hxx +++ b/Modules/Core/Common/include/itkBackwardDifferenceOperator.hxx @@ -36,6 +36,23 @@ BackwardDifferenceOperator< TPixel, TDimension, TAllocator > return coeff; } + +template< class TPixel, unsigned int TDimension, class TAllocator > +void +BackwardDifferenceOperator< TPixel, TDimension, TAllocator > +::Fill(const CoefficientVector & coeff) +{ + this->FillCenteredDirectional(coeff); +} + +/** Constructor. */ +template< class TPixel, unsigned int TDimension, class TAllocator > +BackwardDifferenceOperator< TPixel, TDimension, TAllocator > +::BackwardDifferenceOperator() +{ + +} + } // namespace itk #endif diff --git a/Modules/Core/Common/include/itkBresenhamLine.h b/Modules/Core/Common/include/itkBresenhamLine.h index 3dbb6ce9491..e3a21f57c4d 100644 --- a/Modules/Core/Common/include/itkBresenhamLine.h +++ b/Modules/Core/Common/include/itkBresenhamLine.h @@ -41,8 +41,8 @@ class ITK_EXPORT BresenhamLine typedef std::vector< IndexType > IndexArray; // constructurs - BresenhamLine(){} - ~BresenhamLine(){} + BresenhamLine(); + ~BresenhamLine(); /** Build a line in a specified Direction. */ OffsetArray BuildLine(LType Direction, unsigned int length); diff --git a/Modules/Core/Common/include/itkBresenhamLine.hxx b/Modules/Core/Common/include/itkBresenhamLine.hxx index dbb087fa59e..a4e8bc4c46b 100644 --- a/Modules/Core/Common/include/itkBresenhamLine.hxx +++ b/Modules/Core/Common/include/itkBresenhamLine.hxx @@ -135,6 +135,20 @@ typename BresenhamLine< VDimension >::IndexArray BresenhamLine< VDimension > return indices; } +template< unsigned int VDimension > +BresenhamLine< VDimension > +::BresenhamLine() +{ + +} + +template< unsigned int VDimension > +BresenhamLine< VDimension > +::~BresenhamLine() +{ + +} + } // namespace itk #endif diff --git a/Modules/Core/Common/include/itkByteSwapper.h b/Modules/Core/Common/include/itkByteSwapper.h index c3353f42c1f..64fca0d12db 100644 --- a/Modules/Core/Common/include/itkByteSwapper.h +++ b/Modules/Core/Common/include/itkByteSwapper.h @@ -65,10 +65,10 @@ class ITK_EXPORT ByteSwapper:public Object /** Query the machine Endian-ness. */ static bool SystemIsBigEndian(); - static bool SystemIsBE() { return SystemIsBigEndian(); } + static bool SystemIsBE(); static bool SystemIsLittleEndian(); - static bool SystemIsLE() { return SystemIsLittleEndian(); } + static bool SystemIsLE(); /** Generic swap method handles type T. The swapping is * done in-place. 2, 4 and 8 byte swapping diff --git a/Modules/Core/Common/include/itkByteSwapper.hxx b/Modules/Core/Common/include/itkByteSwapper.hxx index fcf5d63f32d..c51252b7b6c 100644 --- a/Modules/Core/Common/include/itkByteSwapper.hxx +++ b/Modules/Core/Common/include/itkByteSwapper.hxx @@ -48,6 +48,22 @@ template< class T > bool ByteSwapper< T >::SystemIsLittleEndian() { return true; } #endif +template< class T > +bool +ByteSwapper< T > +::SystemIsBE() +{ + return SystemIsBigEndian(); +} + +template< class T > +bool +ByteSwapper< T > +::SystemIsLE() +{ + return SystemIsLittleEndian(); +} + //------Big Endian methods---------------------------------------------- // Use different swap methods based on type diff --git a/Modules/Core/Common/include/itkCellInterface.h b/Modules/Core/Common/include/itkCellInterface.h index 5fb2fea7f4a..8599dbf509e 100644 --- a/Modules/Core/Common/include/itkCellInterface.h +++ b/Modules/Core/Common/include/itkCellInterface.h @@ -302,8 +302,7 @@ class CellInterface * (pCoords[CellDimension]), get the closest cell boundary feature of * topological dimension CellDimension-1. If the "inside" pointer is not * NULL, the flag is set to indicate whether the point is inside the cell. */ - virtual bool GetClosestBoundary(CoordRepType[], bool *, CellAutoPointer &) - { return false; } + virtual bool GetClosestBoundary(CoordRepType[], bool *, CellAutoPointer &); /** Given the geometric coordinates of a point (coord[PointDimension]), * return whether it is inside the cell. Also perform the following @@ -326,15 +325,14 @@ class CellInterface CoordRepType *, CoordRepType[], double *, - InterpolationWeightType *) - { return bool(); } + InterpolationWeightType *); /** Given the parametric coordinates of a point in the cell * determine the value of its Shape Functions * returned through an itkArray). */ virtual void EvaluateShapeFunctions( const ParametricCoordArrayType &, - ShapeFunctionsArrayType &) const {} + ShapeFunctionsArrayType &) const; /** Intersect the cell with a line given by an origin (origin[PointDimension]) * and direction (direction[PointDimension]). The intersection point @@ -356,16 +354,16 @@ class CellInterface CoordRepType, CoordRepType[PointDimension], CoordRepType *, - CoordRepType[]) { return bool(); } + CoordRepType[]); /** Compute cell bounding box and store in the user-provided array. * Array is ordered (xmin, xmax, ymin, ymax, ....). A pointer to the * array is returned for convenience. This allows code like: * "CoordRep* bounds = cell->GetBoundingBox(new CoordRep[6]);". */ - CoordRepType * GetBoundingBox(CoordRepType[PointDimension * 2]) { return NULL; } + CoordRepType * GetBoundingBox(CoordRepType[PointDimension * 2]); /** Compute the square of the diagonal length of the bounding box. */ - CoordRepType GetBoundingBoxDiagonalLength2(void) { return NULL; } + CoordRepType GetBoundingBoxDiagonalLength2(void); /** Intersect the given bounding box (bounds[PointDimension*2]) with a line * given by an origin (origin[PointDimension]) and direction @@ -383,7 +381,7 @@ class CellInterface CoordRepType[PointDimension], CoordRepType[PointDimension], CoordRepType[PointDimension], - CoordRepType *) { return bool(); } + CoordRepType *); /** Interface to the boundary form of the cell to set/get UsingCells. * See the boundary wrapper source for more information. */ @@ -432,8 +430,8 @@ class CellInterface itkTypeMacro(CellInterface, LightObject); public: - CellInterface() {} - virtual ~CellInterface() {} + CellInterface(); + virtual ~CellInterface(); /** Cell internal utility routines. */ /** Get the geometric position of a point. */ diff --git a/Modules/Core/Common/include/itkCellInterface.hxx b/Modules/Core/Common/include/itkCellInterface.hxx index 7d9343633c8..93397a66b96 100644 --- a/Modules/Core/Common/include/itkCellInterface.hxx +++ b/Modules/Core/Common/include/itkCellInterface.hxx @@ -22,6 +22,134 @@ namespace itk { +/** Given the parametric coordinates of a point in the cell + * (pCoords[CellDimension]), get the closest cell boundary feature of + * topological dimension CellDimension-1. If the "inside" pointer is not + * NULL, the flag is set to indicate whether the point is inside the cell. */ +template< typename TPixelType, typename TCellTraits > +bool +CellInterface< TPixelType, TCellTraits > +::GetClosestBoundary(CoordRepType[], bool *, CellAutoPointer &) +{ + return false; +} + +/** Given the geometric coordinates of a point (coord[PointDimension]), + * return whether it is inside the cell. Also perform the following + * calculations, if the corresponding result pointers are not NULL: + * + * - Find the closest point in or on the cell to the given point + * (Returns through pointer to array: closestPoint[PointDimension]). + * + * - Get the cell's parametric coordinates for the given point + * (Returns through pointer to array: pCoords[CellDimension]). + * + * - Get the square of the distance between the point and the cell + * (this is the distance from the point to the closest point, + * returned through "dist2" pointer). + * + * + * - Get the interpolation weights for the cell + * (Returns through pointer to array: weights[NumberOfPoints]). */ +template< typename TPixelType, typename TCellTraits > +bool +CellInterface< TPixelType, TCellTraits > +::EvaluatePosition(CoordRepType *, + PointsContainer *, + CoordRepType *, + CoordRepType[], + double *, + InterpolationWeightType *) +{ + return bool(); +} + +/** Given the parametric coordinates of a point in the cell + * determine the value of its Shape Functions + * returned through an itkArray). */ +template< typename TPixelType, typename TCellTraits > +void +CellInterface< TPixelType, TCellTraits > +::EvaluateShapeFunctions( + const ParametricCoordArrayType &, + ShapeFunctionsArrayType &) const +{ + +} + +/** Intersect the cell with a line given by an origin (origin[PointDimension]) + * and direction (direction[PointDimension]). The intersection point + * found will be within the given tolerance of the real intersection. + * Get the following results if the corresponding pointers are not NULL: + * + * - The intersection point's geometric coordinates (returned through + * pointer to array: coords[PointDimension]). + * + * - The line's parametric coordinate of the intersection point + * (returned through "t" pointer). + * + * - The cell's parametric coordinates of the intersection point + * (returned through pointer to array: pCoords[CellDimension]). + * + * Returns whether an intersection exists within the given tolerance. */ +template< typename TPixelType, typename TCellTraits > +bool +CellInterface< TPixelType, TCellTraits > +::IntersectWithLine(CoordRepType[PointDimension], + CoordRepType[PointDimension], + CoordRepType, + CoordRepType[PointDimension], + CoordRepType *, + CoordRepType[]) +{ + return bool(); +} + +/** Compute cell bounding box and store in the user-provided array. + * Array is ordered (xmin, xmax, ymin, ymax, ....). A pointer to the + * array is returned for convenience. This allows code like: + * "CoordRep* bounds = cell->GetBoundingBox(new CoordRep[6]);". */ +template< typename TPixelType, typename TCellTraits > +typename CellInterface< TPixelType, TCellTraits >::CoordRepType * +CellInterface< TPixelType, TCellTraits > +::GetBoundingBox(CoordRepType[PointDimension * 2]) +{ + return NULL; +} + +/** Compute the square of the diagonal length of the bounding box. */ +template< typename TPixelType, typename TCellTraits > +typename CellInterface< TPixelType, TCellTraits >::CoordRepType +CellInterface< TPixelType, TCellTraits > +::GetBoundingBoxDiagonalLength2(void) +{ + return NULL; +} + +/** Intersect the given bounding box (bounds[PointDimension*2]) with a line + * given by an origin (origin[PointDimension]) and direction + * (direction[PointDimension]). Get the following results if the + * corresponding pointers are not NULL: + * + * - The intersection point's geometric coordinates (returned through + * pointer to array: coords[PointDimension]). + * + * - The line's parametric coordinate of the intersection point + * (returned through "t" pointer). + * + * Returns whether an intersection exists. */ +template< typename TPixelType, typename TCellTraits > +bool +CellInterface< TPixelType, TCellTraits > +::IntersectBoundingBoxWithLine(CoordRepType[PointDimension * 2], + CoordRepType[PointDimension], + CoordRepType[PointDimension], + CoordRepType[PointDimension], + CoordRepType *) +{ + return bool(); +} + /** * Get the interpolation order of the cell. Usually linear. */ @@ -163,6 +291,20 @@ CellInterface< TPixelType, TCellTraits > return m_UsingCells.end(); } +template< typename TPixelType, typename TCellTraits > +CellInterface< TPixelType, TCellTraits > +::CellInterface() +{ + +} + +template< typename TPixelType, typename TCellTraits > +CellInterface< TPixelType, TCellTraits > +::~CellInterface() +{ + +} + #endif } // end namespace itk diff --git a/Modules/Core/Common/include/itkChildTreeIterator.h b/Modules/Core/Common/include/itkChildTreeIterator.h index a2e8d09bb5a..6bcd0f40f94 100644 --- a/Modules/Core/Common/include/itkChildTreeIterator.h +++ b/Modules/Core/Common/include/itkChildTreeIterator.h @@ -55,15 +55,7 @@ class ChildTreeIterator:public TreeIteratorBase< TTreeType > TreeIteratorBase< TTreeType > * Clone(); /** operator = */ - Self & operator=(Superclass & iterator) - { - Superclass::operator=(iterator); - ChildTreeIterator< TTreeType > & it = - static_cast< ChildTreeIterator< TTreeType > & >( iterator ); - m_ListPosition = it.m_ListPosition; - m_ParentNode = it.m_ParentNode; - return *this; - } + Self & operator=(Superclass & iterator); protected: diff --git a/Modules/Core/Common/include/itkChildTreeIterator.hxx b/Modules/Core/Common/include/itkChildTreeIterator.hxx index 09600934000..30902a3c544 100644 --- a/Modules/Core/Common/include/itkChildTreeIterator.hxx +++ b/Modules/Core/Common/include/itkChildTreeIterator.hxx @@ -123,6 +123,21 @@ TreeIteratorBase< TTreeType > *ChildTreeIterator< TTreeType >::Clone() *clone = *this; return clone; } + +/** operator = */ +template< class TTreeType > +ChildTreeIterator< TTreeType > & +ChildTreeIterator< TTreeType > +::operator=(Superclass & iterator) +{ + Superclass::operator=(iterator); + ChildTreeIterator< TTreeType > & it = + static_cast< ChildTreeIterator< TTreeType > & >( iterator ); + m_ListPosition = it.m_ListPosition; + m_ParentNode = it.m_ParentNode; + return *this; +} + } // namespace #endif diff --git a/Modules/Core/Common/include/itkConditionalConstIterator.h b/Modules/Core/Common/include/itkConditionalConstIterator.h index ae4cbd9585f..af0d96ecfdb 100644 --- a/Modules/Core/Common/include/itkConditionalConstIterator.h +++ b/Modules/Core/Common/include/itkConditionalConstIterator.h @@ -70,19 +70,10 @@ class ConditionalConstIterator /** operator= is provided to make sure the handle to the image is properly * reference counted. */ - Self & operator=(const Self & it) - { - m_IsAtEnd = it.m_IsAtEnd; // copy the end flag - m_Image = it.m_Image; // copy the smart pointer - m_Region = it.m_Region; // copy the region - return *this; - } + Self & operator=(const Self & it); /** Get the dimension (size) of the index. */ - static unsigned int GetIteratorDimension(void) - { - return Self::NDimension; - } + static unsigned int GetIteratorDimension(void); /** Get the index at the current iterator location. */ virtual const IndexType GetIndex() = 0; diff --git a/Modules/Core/Common/include/itkConditionalConstIterator.hxx b/Modules/Core/Common/include/itkConditionalConstIterator.hxx index dcc85fe467d..db916ae1ac5 100644 --- a/Modules/Core/Common/include/itkConditionalConstIterator.hxx +++ b/Modules/Core/Common/include/itkConditionalConstIterator.hxx @@ -22,15 +22,42 @@ namespace itk { + +/** operator= is provided to make sure the handle to the image is properly +* reference counted. */ +template< typename TImageType > +ConditionalConstIterator< TImageType > & +ConditionalConstIterator< TImageType > +::operator=(const Self & it) +{ + m_IsAtEnd = it.m_IsAtEnd; // copy the end flag + m_Image = it.m_Image; // copy the smart pointer + m_Region = it.m_Region; // copy the region + return *this; +} + +/** Get the dimension (size) of the index. */ +template< typename TImageType > +unsigned int +ConditionalConstIterator< TImageType > +::GetIteratorDimension(void) +{ + return Self::NDimension; +} + template< typename TImageType > ConditionalConstIterator< TImageType > ::ConditionalConstIterator() -{} +{ + +} template< typename TImageType > ConditionalConstIterator< TImageType > ::~ConditionalConstIterator() -{} +{ + +} } // end namespace itk #endif diff --git a/Modules/Core/Common/include/itkConicShellInteriorExteriorSpatialFunction.h b/Modules/Core/Common/include/itkConicShellInteriorExteriorSpatialFunction.h index dd643924954..718f6113d32 100644 --- a/Modules/Core/Common/include/itkConicShellInteriorExteriorSpatialFunction.h +++ b/Modules/Core/Common/include/itkConicShellInteriorExteriorSpatialFunction.h @@ -92,7 +92,7 @@ class ITK_EXPORT ConicShellInteriorExteriorSpatialFunction: itkSetMacro(Origin, InputType); /** Set/Get the gradient at the origin of the function. */ - GradientType GetOriginGradient() { return m_OriginGradient; } + GradientType GetOriginGradient(); void SetOriginGradient(GradientType grad); /** Set/Get the minimum search distance. */ diff --git a/Modules/Core/Common/include/itkConicShellInteriorExteriorSpatialFunction.hxx b/Modules/Core/Common/include/itkConicShellInteriorExteriorSpatialFunction.hxx index b8152131ac6..a1841d31022 100644 --- a/Modules/Core/Common/include/itkConicShellInteriorExteriorSpatialFunction.hxx +++ b/Modules/Core/Common/include/itkConicShellInteriorExteriorSpatialFunction.hxx @@ -127,6 +127,15 @@ ConicShellInteriorExteriorSpatialFunction< VDimension, TInput > return result; } +/** Set/Get the gradient at the origin of the function. */ +template< unsigned int VDimension, typename TInput > +typename ConicShellInteriorExteriorSpatialFunction< VDimension, TInput >::GradientType +ConicShellInteriorExteriorSpatialFunction< VDimension, TInput > +::GetOriginGradient() +{ + return m_OriginGradient; +} + template< unsigned int VDimension, typename TInput > void ConicShellInteriorExteriorSpatialFunction< VDimension, TInput > diff --git a/Modules/Core/Common/include/itkConstNeighborhoodIterator.h b/Modules/Core/Common/include/itkConstNeighborhoodIterator.h index 06f96011d19..ed8770ec0dd 100644 --- a/Modules/Core/Common/include/itkConstNeighborhoodIterator.h +++ b/Modules/Core/Common/include/itkConstNeighborhoodIterator.h @@ -103,7 +103,7 @@ class ITK_EXPORT ConstNeighborhoodIterator: ConstNeighborhoodIterator(); /** Virtual destructor */ - virtual ~ConstNeighborhoodIterator() {} + virtual ~ConstNeighborhoodIterator(); /** Copy constructor */ ConstNeighborhoodIterator(const ConstNeighborhoodIterator &); @@ -112,15 +112,7 @@ class ITK_EXPORT ConstNeighborhoodIterator: * over which to walk. */ ConstNeighborhoodIterator(const SizeType & radius, const ImageType *ptr, - const RegionType & region) - { - this->Initialize(radius, ptr, region); - for ( unsigned int i = 0; i < Dimension; i++ ) - { m_InBounds[i] = false; } - this->ResetBoundaryCondition(); - m_NeighborhoodAccessorFunctor = ptr->GetNeighborhoodAccessor(); - m_NeighborhoodAccessorFunctor.SetBegin( ptr->GetBufferPointer() ); - } + const RegionType & region); /** Assignment operator */ Self & operator=(const Self & orig); @@ -133,46 +125,34 @@ class ITK_EXPORT ConstNeighborhoodIterator: OffsetType ComputeInternalIndex(NeighborIndexType n) const; /** Returns the array of upper loop bounds used during iteration. */ - IndexType GetBound() const - { return m_Bound; } + IndexType GetBound() const; /** Returns the loop bound used to define the edge of a single * dimension in the itk::Image region. */ + //IndexValueType GetBound(NeighborIndexType n) const; IndexValueType GetBound(NeighborIndexType n) const { return m_Bound[n]; } /** Returns the pointer to the center pixel of the neighborhood. */ - const InternalPixelType * GetCenterPointer() const - { return ( this->operator[]( ( this->Size() ) >> 1 ) ); } + const InternalPixelType * GetCenterPointer() const; /** Returns the pixel referenced at the center of the * ConstNeighborhoodIterator. */ - PixelType GetCenterPixel() const - { return m_NeighborhoodAccessorFunctor.Get( this->GetCenterPointer() ); } + PixelType GetCenterPixel() const; /** Returns a smartpointer to the image on which this iterator operates. */ - const ImageType * GetImagePointer(void) const - { return m_ConstImage; } + const ImageType * GetImagePointer(void) const; /** Returns the N-dimensional index of the iterator's position in * the image. */ - virtual IndexType GetIndex(void) const - { return m_Loop; } + virtual IndexType GetIndex(void) const; /** Virtual function that "dereferences" a ConstNeighborhoodIterator, * returning a Neighborhood of pixel values. */ virtual NeighborhoodType GetNeighborhood() const; /** Returns the pixel value located at a linear array location i. */ - virtual PixelType GetPixel(NeighborIndexType i) const - { - if ( !m_NeedToUseBoundaryCondition ) - { - return ( m_NeighborhoodAccessorFunctor.Get( this->operator[](i) ) ); - } - bool inbounds; - return this->GetPixel(i, inbounds); - } + virtual PixelType GetPixel(NeighborIndexType i) const; /** Return the pixel value located at a linear array location i. * Sets "IsInBounds" to true if the location is inside the @@ -183,84 +163,56 @@ class ITK_EXPORT ConstNeighborhoodIterator: /** Returns the pixel value located at the itk::Offset o from the center of the neighborhood. */ - virtual PixelType GetPixel(const OffsetType & o) const - { - bool inbounds; - - return ( this->GetPixel(this->GetNeighborhoodIndex(o), inbounds) ); - } + virtual PixelType GetPixel(const OffsetType & o) const; /** Returns the pixel value located at the itk::Offset o from the center of * the neighborhood. Sets "IsInBounds" to true if the offset is inside the * image and the pixel value returned is an actual pixel in the * image. Sets "IsInBounds" to false if the offset is outside the * image and the pixel value returned is a boundary condition. */ - virtual PixelType GetPixel(const OffsetType & o, - bool & IsInBounds) const - { return ( this->GetPixel(this->GetNeighborhoodIndex(o), IsInBounds) ); } + virtual PixelType GetPixel(const OffsetType & o, bool & IsInBounds) const; /** Returns the pixel value located i pixels distant from the neighborhood * center in the positive specified ``axis'' direction. No bounds checking * is done on the size of the neighborhood. */ - virtual PixelType GetNext(const unsigned axis, NeighborIndexType i) const - { - return ( this->GetPixel( this->GetCenterNeighborhoodIndex() - + ( i * this->GetStride(axis) ) ) ); - } + virtual PixelType GetNext(const unsigned axis, NeighborIndexType i) const; /** Returns the pixel value located one pixel distant from the neighborhood * center in the specifed positive axis direction. No bounds checking is * done on the size of the neighborhood. */ - virtual PixelType GetNext(const unsigned axis) const - { - return ( this->GetPixel( this->GetCenterNeighborhoodIndex() - + this->GetStride(axis) ) ); - } + virtual PixelType GetNext(const unsigned axis) const; /** Returns the pixel value located i pixels distant from the neighborhood * center in the negative specified ``axis'' direction. No bounds checking * is done on the size of the neighborhood. */ - virtual PixelType GetPrevious(const unsigned axis, NeighborIndexType i) const - { - return ( this->GetPixel( this->GetCenterNeighborhoodIndex() - - ( i * this->GetStride(axis) ) ) ); - } + virtual PixelType GetPrevious(const unsigned axis, NeighborIndexType i) const; /** Returns the pixel value located one pixel distant from the neighborhood * center in the specifed negative axis direction. No bounds checking is * done on the size of the neighborhood. */ - virtual PixelType GetPrevious(const unsigned axis) const - { - return ( this->GetPixel( this->GetCenterNeighborhoodIndex() - - this->GetStride(axis) ) ); - } + virtual PixelType GetPrevious(const unsigned axis) const; /** Returns the image index for neighbor pixel at offset o from the center of the neighborhood. */ - virtual IndexType GetIndex(const OffsetType & o) const - { return ( this->GetIndex() + o ); } + virtual IndexType GetIndex(const OffsetType & o) const; /** Returns the image index for neighbor pixel at index i in the neighborhood. */ - virtual IndexType GetIndex(NeighborIndexType i) const - { return ( this->GetIndex() + this->GetOffset(i) ); } + virtual IndexType GetIndex(NeighborIndexType i) const; /** Returns the region of iteration. */ - RegionType GetRegion() const - { return m_Region; } + RegionType GetRegion() const; /** Returns the N-dimensional starting index of the iterator's position on * the image. */ - IndexType GetBeginIndex() const - { return m_BeginIndex; } + IndexType GetBeginIndex() const; /** Returns a bounding box for the region spanned by this neighborhood represented by an itk::ImageRegion */ RegionType GetBoundingBoxAsImageRegion() const; /** Returns the offsets used to wrap across dimensional boundaries. */ - OffsetType GetWrapOffset() const - { return m_WrapOffset; } + OffsetType GetWrapOffset() const; /** Returns the internal offset associated with wrapping around a single * dimension's region boundary in the itk::Image. An offset for each @@ -269,6 +221,7 @@ class ITK_EXPORT ConstNeighborhoodIterator: * buffer. */ OffsetValueType GetWrapOffset(NeighborIndexType n) const { return m_WrapOffset[n]; } + //OffsetValueType GetWrapOffset(NeighborIndexType n) const; /** Virtual method for rewinding the iterator to its beginning pixel. * This is useful for writing functions which take neighborhood iterators @@ -286,26 +239,11 @@ class ITK_EXPORT ConstNeighborhoodIterator: /** Virtual method for determining whether the iterator is at the * beginning of its iteration region. */ - virtual bool IsAtBegin() const - { return ( this->GetCenterPointer() == m_Begin ); } + virtual bool IsAtBegin() const; /** Virtual method for determining whether the iterator has reached the * end of its iteration region. */ - virtual bool IsAtEnd() const - { - if ( this->GetCenterPointer() > m_End ) - { - ExceptionObject e(__FILE__, __LINE__); - std::ostringstream msg; - msg << "In method IsAtEnd, CenterPointer = " << this->GetCenterPointer() - << " is greater than End = " << m_End - << std::endl - << " " << *this; - e.SetDescription( msg.str().c_str() ); - throw e; - } - return ( this->GetCenterPointer() == m_End ); - } + virtual bool IsAtEnd() const; /** Increments the pointers in the ConstNeighborhoodIterator, * wraps across boundaries automatically, accounting for @@ -322,48 +260,38 @@ class ITK_EXPORT ConstNeighborhoodIterator: /** Returns a boolean == comparison of the memory addresses of the center * elements of two ConstNeighborhoodIterators of like pixel type and * dimensionality. The radii of the iterators are ignored. */ - bool operator==(const Self & it) const - { return it.GetCenterPointer() == this->GetCenterPointer(); } + bool operator==(const Self & it) const; /** Returns a boolean != comparison of the memory addresses of the center * elements of two ConstNeighborhoodIterators of like pixel type and * dimensionality. The radii of the iterators are ignored. */ - bool operator!=(const Self & it) const - { return it.GetCenterPointer() != this->GetCenterPointer(); } + bool operator!=(const Self & it) const; /** Returns a boolean < comparison of the memory addresses of the center * elements of two ConstNeighborhoodIterators of like pixel type and * dimensionality. The radii of the iterators are ignored. */ - bool operator<(const Self & it) const - { return this->GetCenterPointer() < it.GetCenterPointer(); } + bool operator<(const Self & it) const; /** Returns a boolean < comparison of the memory addresses of the center * elements of two ConstNeighborhoodIterators of like pixel type and * dimensionality. The radii of the iterators are ignored. */ - bool operator<=(const Self & it) const - { return this->GetCenterPointer() <= it.GetCenterPointer(); } + bool operator<=(const Self & it) const; /** Returns a boolean > comparison of the memory addresses of the center * elements of two ConstNeighborhoodIterators of like pixel type and * dimensionality. The radii of the iterators are ignored. */ - bool operator>(const Self & it) const - { return this->GetCenterPointer() > it.GetCenterPointer(); } + bool operator>(const Self & it) const; /** Returns a boolean >= comparison of the memory addresses of the center * elements of two ConstNeighborhoodIterators of like pixel type and * dimensionality. The radii of the iterators are ignored. */ - bool operator>=(const Self & it) const - { return this->GetCenterPointer() >= it.GetCenterPointer(); } + bool operator>=(const Self & it) const; /** This method positions the iterator at an indexed location in the * image. SetLocation should _NOT_ be used to update the position of the * iterator during iteration, only for initializing it to a position * prior to iteration. This method is not optimized for speed. */ - void SetLocation(const IndexType & position) - { - this->SetLoop(position); - this->SetPixelPointers(position); - } + void SetLocation(const IndexType & position); /** Addition of an itk::Offset. Note that this method does not do any bounds * checking. Adding an offset that moves the iterator out of its assigned @@ -376,8 +304,7 @@ class ITK_EXPORT ConstNeighborhoodIterator: Self & operator-=(const OffsetType &); /** Distance between two iterators */ - OffsetType operator-(const Self & b) - { return m_Loop - b.m_Loop; } + OffsetType operator-(const Self & b); /** Returns false if the iterator overlaps region boundaries, true * otherwise. Also updates an internal boolean array indicating @@ -402,22 +329,17 @@ class ITK_EXPORT ConstNeighborhoodIterator: * object during the time it is referenced. The overriding condition * can be of a different type than the default type as long as it is * a subclass of ImageBoundaryCondition. */ - virtual void OverrideBoundaryCondition(const - ImageBoundaryConditionPointerType i) - { m_BoundaryCondition = i; } + virtual void OverrideBoundaryCondition(const ImageBoundaryConditionPointerType i); /** Resets the boundary condition to the internal, default conditions * specified by the template parameter. */ - virtual void ResetBoundaryCondition() - { m_BoundaryCondition = &m_InternalBoundaryCondition; } + virtual void ResetBoundaryCondition(); /** Sets the internal, default boundary condition. */ - void SetBoundaryCondition(const TBoundaryCondition & c) - { m_InternalBoundaryCondition = c; } + void SetBoundaryCondition(const TBoundaryCondition & c); /** */ - ImageBoundaryConditionPointerType GetBoundaryCondition() const - { return m_BoundaryCondition; } + ImageBoundaryConditionPointerType GetBoundaryCondition() const; /** */ void NeedToUseBoundaryConditionOn() diff --git a/Modules/Core/Common/include/itkConstNeighborhoodIterator.hxx b/Modules/Core/Common/include/itkConstNeighborhoodIterator.hxx index 31ee868c35d..3451d949d81 100644 --- a/Modules/Core/Common/include/itkConstNeighborhoodIterator.hxx +++ b/Modules/Core/Common/include/itkConstNeighborhoodIterator.hxx @@ -104,6 +104,47 @@ ConstNeighborhoodIterator< TImage, TBoundaryCondition > } } +/** Allows a user to override the internal boundary condition. Care should + * be taken to ensure that the overriding boundary condition is a persistent + * object during the time it is referenced. The overriding condition + * can be of a different type than the default type as long as it is + * a subclass of ImageBoundaryCondition. */ +template< class TImage, class TBoundaryCondition > +void +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::OverrideBoundaryCondition(const ImageBoundaryConditionPointerType i) +{ + m_BoundaryCondition = i; +} + +/** Resets the boundary condition to the internal, default conditions + * specified by the template parameter. */ +template< class TImage, class TBoundaryCondition > +void +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::ResetBoundaryCondition() +{ + m_BoundaryCondition = &m_InternalBoundaryCondition; +} + +/** Sets the internal, default boundary condition. */ +template< class TImage, class TBoundaryCondition > +void +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::SetBoundaryCondition(const TBoundaryCondition & c) +{ + m_InternalBoundaryCondition = c; +} + +/** */ +template< class TImage, class TBoundaryCondition > +typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::ImageBoundaryConditionPointerType +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::GetBoundaryCondition() const +{ + return m_BoundaryCondition; +} + template< class TImage, class TBoundaryCondition > typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::PixelType ConstNeighborhoodIterator< TImage, TBoundaryCondition > @@ -161,6 +202,189 @@ ConstNeighborhoodIterator< TImage, TBoundaryCondition > return ans; } +/** Returns the array of upper loop bounds used during iteration. */ +template< class TImage, class TBoundaryCondition > +typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::IndexType +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::GetBound() const +{ + return m_Bound; +} + +///** Returns the loop bound used to define the edge of a single +// * dimension in the itk::Image region. */ +//template< class TImage, class TBoundaryCondition > +//typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::IndexValueType +//ConstNeighborhoodIterator< TImage, TBoundaryCondition > +//::GetBound(NeighborIndexType n) const +//{ +// return m_Bound[n]; +//} + +/** Returns the pointer to the center pixel of the neighborhood. */ +template< class TImage, class TBoundaryCondition > +const typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::InternalPixelType * +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::GetCenterPointer() const +{ + return ( this->operator[]( ( this->Size() ) >> 1 ) ); +} + +/** Returns the pixel referenced at the center of the +* ConstNeighborhoodIterator. */ +template< class TImage, class TBoundaryCondition > +typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::PixelType +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::GetCenterPixel() const +{ + return m_NeighborhoodAccessorFunctor.Get( this->GetCenterPointer() ); +} + +/** Returns a smartpointer to the image on which this iterator operates. */ +template< class TImage, class TBoundaryCondition > +const typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::ImageType * +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::GetImagePointer(void) const +{ + return m_ConstImage; +} + +/** Returns the N-dimensional index of the iterator's position in + * the image. */ +template< class TImage, class TBoundaryCondition > +typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::IndexType +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::GetIndex(void) const +{ + return m_Loop; +} + +/** Returns the pixel value located at a linear array location i. */ +template< class TImage, class TBoundaryCondition > +typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::PixelType +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::GetPixel(NeighborIndexType i) const +{ + if ( !m_NeedToUseBoundaryCondition ) + { + return ( m_NeighborhoodAccessorFunctor.Get( this->operator[](i) ) ); + } + bool inbounds; + return this->GetPixel(i, inbounds); +} + +/** Returns the pixel value located at the itk::Offset o from the center of + the neighborhood. */ +template< class TImage, class TBoundaryCondition > +typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::PixelType +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::GetPixel(const OffsetType & o) const +{ + bool inbounds; + + return ( this->GetPixel(this->GetNeighborhoodIndex(o), inbounds) ); +} + +/** Returns the pixel value located at the itk::Offset o from the center of + * the neighborhood. Sets "IsInBounds" to true if the offset is inside the + * image and the pixel value returned is an actual pixel in the + * image. Sets "IsInBounds" to false if the offset is outside the + * image and the pixel value returned is a boundary condition. */ +template< class TImage, class TBoundaryCondition > +typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::PixelType +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::GetPixel(const OffsetType & o, bool & IsInBounds) const +{ + return ( this->GetPixel(this->GetNeighborhoodIndex(o), IsInBounds) ); +} + +/** Returns the pixel value located i pixels distant from the neighborhood + * center in the positive specified ``axis'' direction. No bounds checking + * is done on the size of the neighborhood. */ +template< class TImage, class TBoundaryCondition > +typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::PixelType +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::GetNext(const unsigned axis, NeighborIndexType i) const +{ + return ( this->GetPixel( this->GetCenterNeighborhoodIndex() + + ( i * this->GetStride(axis) ) ) ); +} + +/** Returns the pixel value located one pixel distant from the neighborhood + * center in the specifed positive axis direction. No bounds checking is + * done on the size of the neighborhood. */ +template< class TImage, class TBoundaryCondition > +typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::PixelType +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::GetNext(const unsigned axis) const +{ + return ( this->GetPixel( this->GetCenterNeighborhoodIndex() + + this->GetStride(axis) ) ); +} + +/** Returns the pixel value located i pixels distant from the neighborhood + * center in the negative specified ``axis'' direction. No bounds checking + * is done on the size of the neighborhood. */ +template< class TImage, class TBoundaryCondition > +typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::PixelType +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::GetPrevious(const unsigned axis, NeighborIndexType i) const +{ + return ( this->GetPixel( this->GetCenterNeighborhoodIndex() + - ( i * this->GetStride(axis) ) ) ); +} + +/** Returns the pixel value located one pixel distant from the neighborhood + * center in the specifed negative axis direction. No bounds checking is + * done on the size of the neighborhood. */ +template< class TImage, class TBoundaryCondition > +typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::PixelType +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::GetPrevious(const unsigned axis) const +{ + return ( this->GetPixel( this->GetCenterNeighborhoodIndex() + - this->GetStride(axis) ) ); +} + +/** Returns the image index for neighbor pixel at offset o from the center of + the neighborhood. */ +template< class TImage, class TBoundaryCondition > +typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::IndexType +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::GetIndex(const OffsetType & o) const +{ + return ( this->GetIndex() + o ); +} + +/** Returns the image index for neighbor pixel at index i in the + neighborhood. */ +template< class TImage, class TBoundaryCondition > +typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::IndexType +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::GetIndex(NeighborIndexType i) const +{ + return ( this->GetIndex() + this->GetOffset(i) ); +} + +/** Returns the region of iteration. */ +template< class TImage, class TBoundaryCondition > +typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::RegionType +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::GetRegion() const +{ + return m_Region; +} + +/** Returns the N-dimensional starting index of the iterator's position on + * the image. */ +template< class TImage, class TBoundaryCondition > +typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::IndexType +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::GetBeginIndex() const +{ + return m_BeginIndex; +} + template< class TImage, class TBoundaryCondition > typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::RegionType ConstNeighborhoodIterator< TImage, TBoundaryCondition > @@ -175,6 +399,28 @@ ConstNeighborhoodIterator< TImage, TBoundaryCondition > return ans; } +/** Returns the offsets used to wrap across dimensional boundaries. */ +template< class TImage, class TBoundaryCondition > +typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::OffsetType +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::GetWrapOffset() const +{ + return m_WrapOffset; +} + +///** Returns the internal offset associated with wrapping around a single +// * dimension's region boundary in the itk::Image. An offset for each +// * dimension is necessary to shift pointers when wrapping around region +// * edges because region memory is not necessarily contiguous within the +// * buffer. */ +//template< class TImage, class TBoundaryCondition > +//typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::OffsetValueType +//ConstNeighborhoodIterator< TImage, TBoundaryCondition > +//::GetWrapOffset(NeighborIndexType n) const +//{ +// return m_WrapOffset[n]; +//} + template< class TImage, class TBoundaryCondition > ConstNeighborhoodIterator< TImage, TBoundaryCondition > ::ConstNeighborhoodIterator() @@ -208,6 +454,29 @@ ConstNeighborhoodIterator< TImage, TBoundaryCondition > m_BoundaryCondition = &m_InternalBoundaryCondition; } +template< class TImage, class TBoundaryCondition > +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::~ConstNeighborhoodIterator() +{ + +} + +/** Constructor which establishes the region size, neighborhood, and image + * over which to walk. */ +template< class TImage, class TBoundaryCondition > +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::ConstNeighborhoodIterator(const SizeType & radius, + const ImageType *ptr, + const RegionType & region) +{ + this->Initialize(radius, ptr, region); + for ( unsigned int i = 0; i < Dimension; i++ ) + { m_InBounds[i] = false; } + this->ResetBoundaryCondition(); + m_NeighborhoodAccessorFunctor = ptr->GetNeighborhoodAccessor(); + m_NeighborhoodAccessorFunctor.SetBegin( ptr->GetBufferPointer() ); +} + template< class TImage, class TBoundaryCondition > ConstNeighborhoodIterator< TImage, TBoundaryCondition > ::ConstNeighborhoodIterator(const Self & orig): @@ -427,8 +696,11 @@ ConstNeighborhoodIterator< TImage, TBoundaryCondition > } } +/** Initializes the iterator to walk a particular image and a particular + * region of that image. */ template< class TImage, class TBoundaryCondition > -void ConstNeighborhoodIterator< TImage, TBoundaryCondition > +void +ConstNeighborhoodIterator< TImage, TBoundaryCondition > ::Initialize(const SizeType & radius, const ImageType *ptr, const RegionType & region) { @@ -442,6 +714,125 @@ void ConstNeighborhoodIterator< TImage, TBoundaryCondition > m_IsInBounds = false; } +/** Virtual method for determining whether the iterator is at the + * beginning of its iteration region. */ +template< class TImage, class TBoundaryCondition > +bool +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::IsAtBegin() const +{ + return ( this->GetCenterPointer() == m_Begin ); +} + +/** Virtual method for determining whether the iterator has reached the + * end of its iteration region. */ +template< class TImage, class TBoundaryCondition > +bool +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::IsAtEnd() const +{ + if ( this->GetCenterPointer() > m_End ) + { + ExceptionObject e(__FILE__, __LINE__); + std::ostringstream msg; + msg << "In method IsAtEnd, CenterPointer = " << this->GetCenterPointer() + << " is greater than End = " << m_End + << std::endl + << " " << *this; + e.SetDescription( msg.str().c_str() ); + throw e; + } + return ( this->GetCenterPointer() == m_End ); +} + +/** Returns a boolean == comparison of the memory addresses of the center + * elements of two ConstNeighborhoodIterators of like pixel type and + * dimensionality. The radii of the iterators are ignored. */ +template< class TImage, class TBoundaryCondition > +bool +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::operator==(const Self & it) const +{ + return it.GetCenterPointer() == this->GetCenterPointer(); +} + +/** Returns a boolean != comparison of the memory addresses of the center + * elements of two ConstNeighborhoodIterators of like pixel type and + * dimensionality. The radii of the iterators are ignored. */ +template< class TImage, class TBoundaryCondition > +bool +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::operator!=(const Self & it) const +{ + return it.GetCenterPointer() != this->GetCenterPointer(); +} + +/** Returns a boolean < comparison of the memory addresses of the center + * elements of two ConstNeighborhoodIterators of like pixel type and + * dimensionality. The radii of the iterators are ignored. */ +template< class TImage, class TBoundaryCondition > +bool +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::operator<(const Self & it) const +{ + return this->GetCenterPointer() < it.GetCenterPointer(); +} + +/** Returns a boolean < comparison of the memory addresses of the center + * elements of two ConstNeighborhoodIterators of like pixel type and + * dimensionality. The radii of the iterators are ignored. */ +template< class TImage, class TBoundaryCondition > +bool +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::operator<=(const Self & it) const +{ + return this->GetCenterPointer() <= it.GetCenterPointer(); +} + +/** Returns a boolean > comparison of the memory addresses of the center + * elements of two ConstNeighborhoodIterators of like pixel type and + * dimensionality. The radii of the iterators are ignored. */ +template< class TImage, class TBoundaryCondition > +bool +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::operator>(const Self & it) const +{ + return this->GetCenterPointer() > it.GetCenterPointer(); +} + +/** Returns a boolean >= comparison of the memory addresses of the center + * elements of two ConstNeighborhoodIterators of like pixel type and + * dimensionality. The radii of the iterators are ignored. */ +template< class TImage, class TBoundaryCondition > +bool +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::operator>=(const Self & it) const +{ + return this->GetCenterPointer() >= it.GetCenterPointer(); +} + +/** This method positions the iterator at an indexed location in the + * image. SetLocation should _NOT_ be used to update the position of the + * iterator during iteration, only for initializing it to a position + * prior to iteration. This method is not optimized for speed. */ +template< class TImage, class TBoundaryCondition > +void +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::SetLocation(const IndexType & position) +{ + this->SetLoop(position); + this->SetPixelPointers(position); +} + +/** Distance between two iterators */ +template< class TImage, class TBoundaryCondition > +typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::OffsetType +ConstNeighborhoodIterator< TImage, TBoundaryCondition > +::operator-(const Self & b) +{ + return m_Loop - b.m_Loop; +} + template< class TImage, class TBoundaryCondition > ConstNeighborhoodIterator< TImage, TBoundaryCondition > & ConstNeighborhoodIterator< TImage, TBoundaryCondition > diff --git a/Modules/Core/Common/include/itkImage.h b/Modules/Core/Common/include/itkImage.h index 688594ed034..7506de156c8 100644 --- a/Modules/Core/Common/include/itkImage.h +++ b/Modules/Core/Common/include/itkImage.h @@ -299,6 +299,46 @@ class ITK_EXPORT Image:public ImageBase< VImageDimension > }; } // end namespace itk +extern template class itk::Image; +extern template class itk::Image; +extern template class itk::Image; + +extern template class itk::Image; +extern template class itk::Image; +extern template class itk::Image; + +extern template class itk::Image; +extern template class itk::Image; +extern template class itk::Image; + +extern template class itk::Image; +extern template class itk::Image; +extern template class itk::Image; + +extern template class itk::Image; +extern template class itk::Image; +extern template class itk::Image; + +extern template class itk::Image; +extern template class itk::Image; +extern template class itk::Image; + +extern template class itk::Image; +extern template class itk::Image; +extern template class itk::Image; + +extern template class itk::Image; +extern template class itk::Image; +extern template class itk::Image; + +extern template class itk::Image; +extern template class itk::Image; +extern template class itk::Image; + +extern template class itk::Image; +extern template class itk::Image; +extern template class itk::Image; + #ifndef ITK_MANUAL_INSTANTIATION #include "itkImage.hxx" #endif diff --git a/Modules/Core/Common/include/itkImageBase.h b/Modules/Core/Common/include/itkImageBase.h index 4e498883ef0..96ebb7ca031 100644 --- a/Modules/Core/Common/include/itkImageBase.h +++ b/Modules/Core/Common/include/itkImageBase.h @@ -715,6 +715,9 @@ class ITK_EXPORT ImageBase:public DataObject RegionType m_RequestedRegion; RegionType m_BufferedRegion; }; +extern template class itk::ImageBase<2u>; +extern template class itk::ImageBase<3u>; +extern template class itk::ImageBase<4u>; } // end namespace itk #ifndef ITK_MANUAL_INSTANTIATION diff --git a/Modules/Core/Common/include/itkIndex.hxx b/Modules/Core/Common/include/itkIndex.hxx index 0c14e0f319c..6edc2162797 100644 --- a/Modules/Core/Common/include/itkIndex.hxx +++ b/Modules/Core/Common/include/itkIndex.hxx @@ -1,3 +1,23 @@ +/*========================================================================= + * + * Copyright Insight Software Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0.txt + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + *=========================================================================*/ +#ifndef __itkIndex_hxx +#define __itkIndex_hxx + #include "itkIndex.h" namespace itk @@ -261,3 +281,4 @@ IndexLexicographicCompare } // End namepace Functor } // End namespace itk +#endif // __itkIndex_hxx diff --git a/Modules/Core/Common/include/itkLevelOrderTreeIterator.h b/Modules/Core/Common/include/itkLevelOrderTreeIterator.h index afa95856bd0..f6e1a7a5f27 100644 --- a/Modules/Core/Common/include/itkLevelOrderTreeIterator.h +++ b/Modules/Core/Common/include/itkLevelOrderTreeIterator.h @@ -67,14 +67,7 @@ class LevelOrderTreeIterator:public TreeIteratorBase< TTreeType > TreeIteratorBase< TTreeType > * Clone(); /** operator = */ - const Self & operator=(const Self & iterator) - { - this->Superclass::operator=(iterator); - m_StartLevel = iterator.m_StartLevel; - m_EndLevel = iterator.m_EndLevel; - m_Queue = iterator.m_Queue; - return *this; - } + const Self & operator=(const Self & iterator); protected: diff --git a/Modules/Core/Common/include/itkLevelOrderTreeIterator.hxx b/Modules/Core/Common/include/itkLevelOrderTreeIterator.hxx index dea5c95501f..307620958b2 100644 --- a/Modules/Core/Common/include/itkLevelOrderTreeIterator.hxx +++ b/Modules/Core/Common/include/itkLevelOrderTreeIterator.hxx @@ -160,6 +160,19 @@ LevelOrderTreeIterator< TTreeType >::GetLevel() const return level; } +/** operator = */ +template< class TTreeType > +const LevelOrderTreeIterator< TTreeType > & +LevelOrderTreeIterator< TTreeType > +::operator=(const Self & iterator) +{ + this->Superclass::operator=(iterator); + m_StartLevel = iterator.m_StartLevel; + m_EndLevel = iterator.m_EndLevel; + m_Queue = iterator.m_Queue; + return *this; +} + /** Return the level given a node */ template< class TTreeType > int @@ -225,6 +238,7 @@ TreeIteratorBase< TTreeType > *LevelOrderTreeIterator< TTreeType >::Clone() *clone = *this; return clone; } + } // end namespace itk #endif diff --git a/Modules/Core/Common/include/itkVariableSizeMatrix.h b/Modules/Core/Common/include/itkVariableSizeMatrix.h index 4814e527543..a519c50c1f1 100644 --- a/Modules/Core/Common/include/itkVariableSizeMatrix.h +++ b/Modules/Core/Common/include/itkVariableSizeMatrix.h @@ -85,28 +85,16 @@ class VariableSizeMatrix vnl_vector< T > operator *(const vnl_vector< T > & matrix) const; /** Matrix by scalar multiplication. */ - void operator*=(const T & value) { m_Matrix *= value; } + void operator*=(const T & value); /** Matrix by scalar multiplication. */ - Self operator*(const T & value) - { - Self result(*this); - - result *= value; - return result; - } + Self operator*(const T & value); /** Matrix by scalar division. */ - void operator/=(const T & value) { m_Matrix /= value; } + void operator/=(const T & value); /** Matrix by scalar division. */ - Self operator/(const T & value) - { - Self result(*this); - - result /= value; - return result; - } + Self operator/(const T & value); /** Return an element of the matrix. */ inline T & operator()(unsigned int row, unsigned int col) @@ -192,12 +180,12 @@ class VariableSizeMatrix } /** Default constructor. */ - VariableSizeMatrix():m_Matrix() {} + VariableSizeMatrix(); VariableSizeMatrix(unsigned int rows, unsigned int cols); /** Copy constructor. */ - VariableSizeMatrix(const Self & matrix):m_Matrix(matrix.m_Matrix) {} + VariableSizeMatrix(const Self & matrix); /** Return number of rows in the matrix */ inline unsigned int Rows() const { return m_Matrix.rows(); } @@ -212,42 +200,6 @@ class VariableSizeMatrix InternalMatrixType m_Matrix; }; -template< class T > -ITK_EXPORT std::ostream & operator<<(std::ostream & os, - const VariableSizeMatrix< T > & v) -{ - os << v.GetVnlMatrix(); return os; -} - -/** - * Comparison - */ -template< class T > -inline -bool -VariableSizeMatrix< T > -::operator==(const Self & matrix) const -{ - if ( ( matrix.Rows() != this->Rows() ) - || ( matrix.Cols() != this->Cols() ) ) - { - return false; - } - bool equal = true; - - for ( unsigned int r = 0; r < this->Rows(); r++ ) - { - for ( unsigned int c = 0; c < this->Cols(); c++ ) - { - if ( m_Matrix(r, c) != matrix.m_Matrix(r, c) ) - { - equal = false; - break; - } - } - } - return equal; -} } // end namespace itk #ifndef ITK_MANUAL_INSTANTIATION diff --git a/Modules/Core/Common/include/itkVariableSizeMatrix.hxx b/Modules/Core/Common/include/itkVariableSizeMatrix.hxx index d3af5fb8aab..3b2ae787d21 100644 --- a/Modules/Core/Common/include/itkVariableSizeMatrix.hxx +++ b/Modules/Core/Common/include/itkVariableSizeMatrix.hxx @@ -185,6 +185,27 @@ VariableSizeMatrix< T > return *this; } +/** Matrix by scalar division. */ +template< class T > +void +VariableSizeMatrix< T > +::operator/=(const T & value) +{ + m_Matrix /= value; +} + +/** Matrix by scalar division. */ +template< class T > +VariableSizeMatrix< T > +VariableSizeMatrix< T > +::operator/(const T & value) +{ + Self result(*this); + + result /= value; + return result; +} + template< class T > VariableSizeMatrix< T > & VariableSizeMatrix< T > @@ -243,6 +264,79 @@ VariableSizeMatrix< T > { return m_Matrix * vc; } + +template< class T > +void +VariableSizeMatrix< T > +::operator*=(const T & value) +{ + m_Matrix *= value; +} + +/** Matrix by scalar multiplication. */ +template< class T > +VariableSizeMatrix< T > +VariableSizeMatrix< T > +::operator*(const T & value) +{ + Self result(*this); + + result *= value; + return result; +} + +/** + * Comparison + */ +template< class T > +bool +VariableSizeMatrix< T > +::operator==(const Self & matrix) const +{ + if ( ( matrix.Rows() != this->Rows() ) + || ( matrix.Cols() != this->Cols() ) ) + { + return false; + } + bool equal = true; + + for ( unsigned int r = 0; r < this->Rows(); r++ ) + { + for ( unsigned int c = 0; c < this->Cols(); c++ ) + { + if ( m_Matrix(r, c) != matrix.m_Matrix(r, c) ) + { + equal = false; + break; + } + } + } + return equal; +} + +template< class T > +VariableSizeMatrix< T > +::VariableSizeMatrix() +:m_Matrix() +{ + +} + +template< class T > +VariableSizeMatrix< T > +::VariableSizeMatrix(const Self & matrix) +:m_Matrix(matrix.m_Matrix) +{ + +} + +template< class T > +ITK_EXPORT std::ostream & operator<<(std::ostream & os, + const VariableSizeMatrix< T > & v) +{ + os << v.GetVnlMatrix(); return os; +} + } // end namespace itk #endif diff --git a/Modules/Core/Common/include/itkVectorNeighborhoodInnerProduct.h b/Modules/Core/Common/include/itkVectorNeighborhoodInnerProduct.h index e00eb7a6363..eb46c5b6a43 100644 --- a/Modules/Core/Common/include/itkVectorNeighborhoodInnerProduct.h +++ b/Modules/Core/Common/include/itkVectorNeighborhoodInnerProduct.h @@ -73,12 +73,10 @@ class ITK_EXPORT VectorNeighborhoodInnerProduct /** Conversion operator. */ PixelType operator()(const ConstNeighborhoodIterator< TImage > & it, - const OperatorType & op) const - { - return this->operator()(std::slice(0, it.Size(), 1), it, op); - } + const OperatorType & op) const; - PixelType operator()(const std::slice & s, const NeighborhoodType & N, + PixelType operator()(const std::slice & s, + const NeighborhoodType & N, const OperatorType & op) const; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkVectorNeighborhoodInnerProduct.hxx b/Modules/Core/Common/include/itkVectorNeighborhoodInnerProduct.hxx index c8ae04ddfa3..812d6269720 100644 --- a/Modules/Core/Common/include/itkVectorNeighborhoodInnerProduct.hxx +++ b/Modules/Core/Common/include/itkVectorNeighborhoodInnerProduct.hxx @@ -54,6 +54,15 @@ VectorNeighborhoodInnerProduct< TImage > return sum; } +template< class TImage > +typename VectorNeighborhoodInnerProduct< TImage >::PixelType +VectorNeighborhoodInnerProduct< TImage > +::operator()(const ConstNeighborhoodIterator< TImage > & it, + const OperatorType & op) const +{ + return this->operator()(std::slice(0, it.Size(), 1), it, op); +} + template< class TImage > typename VectorNeighborhoodInnerProduct< TImage >::PixelType VectorNeighborhoodInnerProduct< TImage > diff --git a/Modules/Core/Common/include/itkVersor.h b/Modules/Core/Common/include/itkVersor.h index 599480b1105..dc11dd330a7 100644 --- a/Modules/Core/Common/include/itkVersor.h +++ b/Modules/Core/Common/include/itkVersor.h @@ -165,16 +165,16 @@ class Versor ValueType GetScalar(void) const; /** Returns the X component. */ - ValueType GetX(void) const { return m_X; } + ValueType GetX(void) const; /** Returns the Y component. */ - ValueType GetY(void) const { return m_Y; } + ValueType GetY(void) const; /** Returns the Z component. */ - ValueType GetZ(void) const { return m_Z; } + ValueType GetZ(void) const; /** Returns the W component. */ - ValueType GetW(void) const { return m_W; } + ValueType GetW(void) const; /** Returns the rotation angle in radians. */ ValueType GetAngle(void) const; diff --git a/Modules/Core/Common/include/itkVersor.hxx b/Modules/Core/Common/include/itkVersor.hxx index 3cdbe3ebc87..5cf3609aab2 100644 --- a/Modules/Core/Common/include/itkVersor.hxx +++ b/Modules/Core/Common/include/itkVersor.hxx @@ -303,6 +303,42 @@ Versor< T > return m_W; } +/** Get the X component. */ +template< class T > +typename Versor< T >::ValueType +Versor< T > +::GetX(void) const +{ + return m_X; +} + +/** Get the Y component. */ +template< class T > +typename Versor< T >::ValueType +Versor< T > +::GetY(void) const +{ + return m_Y; +} + +/** Get the Z component. */ +template< class T > +typename Versor< T >::ValueType +Versor< T > +::GetZ(void) const +{ + return m_Z; +} + +/** Get the W component. */ +template< class T > +typename Versor< T >::ValueType +Versor< T > +::GetW(void) const +{ + return m_W; +} + /** Get Angle (in radians) */ template< class T > typename Versor< T >::ValueType diff --git a/Modules/Core/Common/src/CMakeLists.txt b/Modules/Core/Common/src/CMakeLists.txt index f2f57f94224..20c546b075a 100644 --- a/Modules/Core/Common/src/CMakeLists.txt +++ b/Modules/Core/Common/src/CMakeLists.txt @@ -1,11 +1,11 @@ set(ITKCommon_SRCS +itkCommonExplicitInstantiation.cxx itkLoggerOutput.cxx itkProgressAccumulator.cxx itkNumericTraits.cxx itkMutexLock.cxx itkHexahedronCellTopology.cxx itkIndent.cxx -itkIndex.cxx itkEventObject.cxx itkFileOutputWindow.cxx itkSimpleFilterWatcher.cxx @@ -93,6 +93,12 @@ elseif( CMAKE_COMPILER_IS_GNUCXX ) else() set_source_files_properties( itkCompensatedSummation.cxx PROPERTIES COMPILE_FLAGS -fno-unsafe-math-optimizations ) endif() + CHECK_CXX_COMPILER_FLAG( -fno-implicit-templates gcc_has_no_implicit_templates ) + if ( gcc_has_no_implicit_templates ) + set_source_files_properties ( itkIndent.cxx PROPERTIES COMPILE_FLAGS "-fno-implicit-templates" ) + #set_source_files_properties ( ${ITKCommon_SRCS} PROPERTIES COMPILE_FLAGS "-fno-implicit-templates" ) + endif() + elseif( MSVC ) set_source_files_properties( itkCompensatedSummation.cxx PROPERTIES COMPILE_FLAGS -fp:precise ) endif() diff --git a/Modules/Core/Common/src/itkCommonExplicitInstantiation.cxx b/Modules/Core/Common/src/itkCommonExplicitInstantiation.cxx new file mode 100644 index 00000000000..abdd6a8251f --- /dev/null +++ b/Modules/Core/Common/src/itkCommonExplicitInstantiation.cxx @@ -0,0 +1,60 @@ +// This class is simply to for explicit +// instantiation of the most common +// index types into a class that can +// be compiled independant of the main +// body of code +#include "itkIndex.h" + +template class itk::Index<2u>; +template class itk::Index<3u>; +template class itk::Index<4u>; + +template class itk::Functor::IndexLexicographicCompare<2u>; +template class itk::Functor::IndexLexicographicCompare<3u>; +template class itk::Functor::IndexLexicographicCompare<4u>; + +#include "itkImageBase.h" +template class itk::ImageBase<2u>; +template class itk::ImageBase<3u>; +template class itk::ImageBase<4u>; + +#include "itkImage.h" +template class itk::Image; +template class itk::Image; +template class itk::Image; + +template class itk::Image; +template class itk::Image; +template class itk::Image; + +template class itk::Image; +template class itk::Image; +template class itk::Image; + +template class itk::Image; +template class itk::Image; +template class itk::Image; + +template class itk::Image; +template class itk::Image; +template class itk::Image; + +template class itk::Image; +template class itk::Image; +template class itk::Image; + +template class itk::Image; +template class itk::Image; +template class itk::Image; + +template class itk::Image; +template class itk::Image; +template class itk::Image; + +template class itk::Image; +template class itk::Image; +template class itk::Image; + +template class itk::Image; +template class itk::Image; +template class itk::Image; diff --git a/Modules/Core/Common/src/itkIndex.cxx b/Modules/Core/Common/src/itkIndex.cxx deleted file mode 100644 index a61df7a0e5d..00000000000 --- a/Modules/Core/Common/src/itkIndex.cxx +++ /dev/null @@ -1,14 +0,0 @@ -// This class is simply to for explicit -// instantiation of the most common -// index types into a class that can -// be compiled independant of the main -// body of code -#include "itkIndex.h" - -template class itk::Index<2u>; -template class itk::Index<3u>; -template class itk::Index<4u>; - -template class itk::Functor::IndexLexicographicCompare<2u>; -template class itk::Functor::IndexLexicographicCompare<3u>; -template class itk::Functor::IndexLexicographicCompare<4u>; From 112c7ebac8fe4e9166379610c504b2b2a2a47e5a Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Thu, 1 Nov 2012 17:56:04 +0000 Subject: [PATCH 3/7] ENH: Use more rigously defined types decarations In the ITK toolkit, promote a more consistent naming scheme for types by standardizing on the C99 stdint.h types. By using these more consistently named types, it will be easier uniquely define explicit instantiation and wrappping types. For example on most platforms char = unisgned char = uint8_t Which one of those should be wrapped? Change-Id: I4dfbfefe98fe06b4d0e7a3f0010d29385c101982 --- Examples/DataRepresentation/Image/Image1.cxx | 4 +- Examples/DataRepresentation/Image/Image2.cxx | 2 +- Examples/DataRepresentation/Image/Image3.cxx | 2 +- Examples/DataRepresentation/Image/Image4.cxx | 2 +- Examples/DataRepresentation/Image/Image5.cxx | 2 +- .../Image/ImageAdaptor1.cxx | 8 +- .../Image/ImageAdaptor2.cxx | 2 +- .../Image/ImageAdaptor3.cxx | 4 +- .../Image/ImageAdaptor4.cxx | 4 +- .../DataRepresentation/Image/RGBImage.cxx | 2 +- .../Mesh/ImageToPointSet.cxx | 2 +- .../DataRepresentation/Mesh/PointSet1.cxx | 2 +- .../DataRepresentation/Mesh/PointSet2.cxx | 2 +- .../DataRepresentation/Mesh/PointSet3.cxx | 2 +- .../Path/PolyLineParametricPath1.cxx | 2 +- .../Filtering/AntiAliasBinaryImageFilter.cxx | 2 +- Examples/Filtering/BilateralImageFilter.cxx | 6 +- .../Filtering/BinaryMedianImageFilter.cxx | 4 +- .../BinaryMinMaxCurvatureFlowImageFilter.cxx | 2 +- .../Filtering/BinaryThresholdImageFilter.cxx | 4 +- .../Filtering/BinomialBlurImageFilter.cxx | 2 +- .../CannyEdgeDetectionImageFilter.cxx | 2 +- Examples/Filtering/CastingImageFilters.cxx | 2 +- ...rvatureAnisotropicDiffusionImageFilter.cxx | 2 +- .../Filtering/CurvatureFlowImageFilter.cxx | 2 +- .../DanielssonDistanceMapImageFilter.cxx | 4 +- Examples/Filtering/DerivativeImageFilter.cxx | 2 +- ...usionTensor3DReconstructionImageFilter.cxx | 4 +- .../DigitallyReconstructedRadiograph1.cxx | 2 +- .../Filtering/DiscreteGaussianImageFilter.cxx | 2 +- Examples/Filtering/FFTDirectInverse.cxx | 2 +- Examples/Filtering/FFTDirectInverse2.cxx | 4 +- Examples/Filtering/FFTImageFilter.cxx | 2 +- .../FFTImageFilterFourierDomainFiltering.cxx | 2 +- Examples/Filtering/FlipImageFilter.cxx | 2 +- ...radientAnisotropicDiffusionImageFilter.cxx | 2 +- .../GradientMagnitudeImageFilter.cxx | 2 +- ...tMagnitudeRecursiveGaussianImageFilter.cxx | 2 +- .../GrayscaleFunctionDilateImageFilter.cxx | 2 +- Examples/Filtering/LaplacianImageFilter.cxx | 2 +- ...LaplacianRecursiveGaussianImageFilter1.cxx | 2 +- ...LaplacianRecursiveGaussianImageFilter2.cxx | 2 +- .../LaplacianSharpeningImageFilter.cxx | 4 +- .../MathematicalMorphologyBinaryFilters.cxx | 4 +- ...MathematicalMorphologyGrayscaleFilters.cxx | 4 +- Examples/Filtering/MeanImageFilter.cxx | 4 +- Examples/Filtering/MedianImageFilter.cxx | 4 +- .../MinMaxCurvatureFlowImageFilter.cxx | 2 +- .../MorphologicalImageEnhancement.cxx | 4 +- .../OtsuMultipleThresholdImageFilter.cxx | 4 +- .../Filtering/OtsuThresholdImageFilter.cxx | 4 +- ...rvatureAnisotropicDiffusionImageFilter.cxx | 6 +- ...radientAnisotropicDiffusionImageFilter.cxx | 6 +- Examples/Filtering/RGBToGrayscale.cxx | 4 +- Examples/Filtering/ResampleImageFilter.cxx | 4 +- Examples/Filtering/ResampleImageFilter2.cxx | 4 +- Examples/Filtering/ResampleImageFilter3.cxx | 4 +- Examples/Filtering/ResampleImageFilter4.cxx | 4 +- Examples/Filtering/ResampleImageFilter5.cxx | 4 +- Examples/Filtering/ResampleImageFilter6.cxx | 2 +- Examples/Filtering/ResampleImageFilter7.cxx | 4 +- Examples/Filtering/ResampleImageFilter8.cxx | 4 +- Examples/Filtering/ResampleImageFilter9.cxx | 2 +- .../Filtering/ResampleOrientedImageFilter.cxx | 4 +- .../ResampleVolumesToBeIsotropic.cxx | 4 +- Examples/Filtering/SigmoidImageFilter.cxx | 4 +- ...SignedDanielssonDistanceMapImageFilter.cxx | 4 +- .../SmoothingRecursiveGaussianImageFilter.cxx | 2 +- ...SmoothingRecursiveGaussianImageFilter2.cxx | 2 +- Examples/Filtering/SpatialObjectToImage1.cxx | 2 +- Examples/Filtering/SpatialObjectToImage2.cxx | 2 +- Examples/Filtering/SpatialObjectToImage3.cxx | 2 +- Examples/Filtering/SubsampleVolume.cxx | 4 +- Examples/Filtering/SurfaceExtraction.cxx | 2 +- Examples/Filtering/ThresholdImageFilter.cxx | 2 +- ...rvatureAnisotropicDiffusionImageFilter.cxx | 2 +- ...radientAnisotropicDiffusionImageFilter.cxx | 2 +- Examples/Filtering/VectorIndexSelection.cxx | 4 +- .../VotingBinaryHoleFillingImageFilter.cxx | 4 +- ...gBinaryIterativeHoleFillingImageFilter.cxx | 2 +- Examples/Filtering/WarpImageFilter1.cxx | 2 +- ...oCrossingBasedEdgeDetectionImageFilter.cxx | 2 +- .../CovariantVectorImageExtractComponent.cxx | 4 +- Examples/IO/CovariantVectorImageRead.cxx | 4 +- Examples/IO/CovariantVectorImageWrite.cxx | 4 +- .../IO/DicomImageReadChangeHeaderWrite.cxx | 2 +- Examples/IO/DicomImageReadPrintTags.cxx | 2 +- Examples/IO/DicomImageReadWrite.cxx | 8 +- Examples/IO/DicomPrintPatientInformation.cxx | 2 +- .../IO/DicomSeriesReadGaussianImageWrite.cxx | 2 +- Examples/IO/DicomSeriesReadImageWrite2.cxx | 4 +- Examples/IO/DicomSeriesReadPrintTags.cxx | 2 +- Examples/IO/DicomSeriesReadSeriesWrite.cxx | 4 +- Examples/IO/ImageReadCastWrite.cxx | 2 +- Examples/IO/ImageReadDicomSeriesWrite.cxx | 4 +- Examples/IO/ImageReadExportVTK.cxx | 2 +- .../IO/ImageReadExtractFilterInsertWrite.cxx | 6 +- Examples/IO/ImageReadExtractWrite.cxx | 4 +- Examples/IO/ImageReadImageSeriesWrite.cxx | 4 +- .../IO/ImageReadRegionOfInterestWrite.cxx | 4 +- Examples/IO/ImageSeriesReadWrite.cxx | 2 +- Examples/IO/ImageSeriesReadWrite2.cxx | 2 +- Examples/IO/RGBImageReadWrite.cxx | 2 +- Examples/IO/RGBImageSeriesReadWrite.cxx | 2 +- Examples/IO/VisibleHumanPasteWrite.cxx | 4 +- Examples/IO/VisibleHumanStreamReadWrite.cxx | 4 +- Examples/Installation/HelloWorld.cxx | 2 +- .../ImageLinearIteratorWithIndex.cxx | 2 +- .../ImageLinearIteratorWithIndex2.cxx | 2 +- .../ImageRandomConstIteratorWithIndex.cxx | 2 +- Examples/Iterators/ImageRegionIterator.cxx | 2 +- .../ImageRegionIteratorWithIndex.cxx | 2 +- .../Iterators/ImageSliceIteratorWithIndex.cxx | 6 +- Examples/Iterators/NeighborhoodIterators1.cxx | 4 +- Examples/Iterators/NeighborhoodIterators2.cxx | 2 +- Examples/Iterators/NeighborhoodIterators3.cxx | 2 +- Examples/Iterators/NeighborhoodIterators4.cxx | 2 +- Examples/Iterators/NeighborhoodIterators5.cxx | 2 +- Examples/Iterators/NeighborhoodIterators6.cxx | 2 +- .../ShapedNeighborhoodIterators1.cxx | 2 +- .../ShapedNeighborhoodIterators2.cxx | 4 +- Examples/Registration/BSplineWarping1.cxx | 2 +- Examples/Registration/BSplineWarping2.cxx | 2 +- .../ChangeInformationImageFilter.cxx | 2 +- .../Registration/DeformableRegistration1.cxx | 4 +- .../Registration/DeformableRegistration10.cxx | 2 +- .../Registration/DeformableRegistration11.cxx | 2 +- .../Registration/DeformableRegistration12.cxx | 4 +- .../Registration/DeformableRegistration13.cxx | 4 +- .../Registration/DeformableRegistration14.cxx | 4 +- .../Registration/DeformableRegistration15.cxx | 4 +- .../Registration/DeformableRegistration2.cxx | 4 +- .../Registration/DeformableRegistration3.cxx | 4 +- .../Registration/DeformableRegistration4.cxx | 2 +- .../Registration/DeformableRegistration5.cxx | 4 +- .../Registration/DeformableRegistration6.cxx | 2 +- .../Registration/DeformableRegistration7.cxx | 2 +- .../Registration/DeformableRegistration8.cxx | 4 +- .../Registration/DeformableRegistration9.cxx | 2 +- .../DisplacementFieldInitialization.cxx | 2 +- Examples/Registration/ImageRegistration1.cxx | 2 +- Examples/Registration/ImageRegistration10.cxx | 2 +- Examples/Registration/ImageRegistration11.cxx | 4 +- Examples/Registration/ImageRegistration12.cxx | 6 +- Examples/Registration/ImageRegistration13.cxx | 2 +- Examples/Registration/ImageRegistration14.cxx | 2 +- Examples/Registration/ImageRegistration15.cxx | 2 +- Examples/Registration/ImageRegistration16.cxx | 2 +- Examples/Registration/ImageRegistration17.cxx | 2 +- Examples/Registration/ImageRegistration18.cxx | 4 +- Examples/Registration/ImageRegistration19.cxx | 2 +- Examples/Registration/ImageRegistration2.cxx | 4 +- Examples/Registration/ImageRegistration20.cxx | 2 +- Examples/Registration/ImageRegistration3.cxx | 4 +- Examples/Registration/ImageRegistration4.cxx | 4 +- Examples/Registration/ImageRegistration5.cxx | 4 +- Examples/Registration/ImageRegistration6.cxx | 4 +- Examples/Registration/ImageRegistration7.cxx | 2 +- Examples/Registration/ImageRegistration8.cxx | 2 +- Examples/Registration/ImageRegistration9.cxx | 2 +- .../ImageRegistrationHistogramPlotter.cxx | 8 +- .../Registration/IterativeClosestPoint3.cxx | 4 +- Examples/Registration/LandmarkWarping2.cxx | 2 +- .../Registration/MeanSquaresImageMetric1.cxx | 2 +- .../ModelToImageRegistration2.cxx | 6 +- .../MultiResImageRegistration1.cxx | 4 +- .../MultiResImageRegistration2.cxx | 4 +- .../MultiResImageRegistration3.cxx | 4 +- Examples/Registration/ThinPlateSplineWarp.cxx | 2 +- .../CannySegmentationLevelSetImageFilter.cxx | 2 +- Examples/Segmentation/ConfidenceConnected.cxx | 2 +- .../Segmentation/ConfidenceConnected3D.cxx | 2 +- .../ConnectedThresholdImageFilter.cxx | 2 +- .../CurvesLevelSetImageFilter.cxx | 2 +- .../Segmentation/FastMarchingImageFilter.cxx | 2 +- .../GeodesicActiveContourImageFilter.cxx | 2 +- ...veContourShapePriorLevelSetImageFilter.cxx | 2 +- .../Segmentation/GibbsPriorImageFilter1.cxx | 10 +- .../HoughTransform2DCirclesImageFilter.cxx | 4 +- .../HoughTransform2DLinesImageFilter.cxx | 8 +- .../IsolatedConnectedImageFilter.cxx | 2 +- ...placianSegmentationLevelSetImageFilter.cxx | 2 +- .../NeighborhoodConnectedImageFilter.cxx | 2 +- .../RelabelComponentImageFilter.cxx | 4 +- .../ShapeDetectionLevelSetFilter.cxx | 2 +- ...resholdSegmentationLevelSetImageFilter.cxx | 2 +- .../VectorConfidenceConnected.cxx | 4 +- .../Segmentation/WatershedSegmentation1.cxx | 2 +- .../Segmentation/WatershedSegmentation2.cxx | 2 +- .../SpatialObjects/ImageMaskSpatialObject.cxx | 2 +- Examples/SpatialObjects/MeshSpatialObject.cxx | 2 +- ...atialObjectToImageStatisticsCalculator.cxx | 2 +- Examples/Statistics/BayesianClassifier.cxx | 6 +- .../BayesianClassifierInitializer.cxx | 4 +- Examples/Statistics/ImageEntropy1.cxx | 2 +- Examples/Statistics/ImageHistogram1.cxx | 2 +- Examples/Statistics/ImageHistogram2.cxx | 2 +- Examples/Statistics/ImageHistogram3.cxx | 2 +- Examples/Statistics/ImageHistogram4.cxx | 2 +- .../Statistics/ImageMutualInformation1.cxx | 2 +- .../ScalarImageKmeansClassifier.cxx | 2 +- .../ScalarImageKmeansModelEstimator.cxx | 2 +- .../ScalarImageMarkovRandomField1.cxx | 8 +- .../Bridge/VTK/include/itkVTKImageExport.h | 2 +- .../Bridge/VTK/include/itkVTKImageExport.hxx | 12 +- .../Bridge/VTK/include/itkVTKImageImport.h | 4 +- .../Bridge/VTK/include/itkVTKImageImport.hxx | 12 +- Modules/Bridge/VtkGlue/include/QuickView.h | 4 +- Modules/Bridge/VtkGlue/src/QuickView.cxx | 10 +- Modules/Bridge/VtkGlue/test/QuickViewTest.cxx | 14 +- .../Deprecated/include/itkAnalyzeDbh.h | 10 +- .../Deprecated/include/itkAnalyzeImageIO.h | 4 +- .../include/itkBalloonForceFilter.h | 4 +- .../include/itkBalloonForceFilter.hxx | 6 +- .../Deprecated/include/itkDICOMImageIO2.h | 6 +- .../include/itkDeformableMesh3DFilter.h | 22 +- .../include/itkDeformableMesh3DFilter.hxx | 2 +- .../Deprecated/src/itkAnalyzeImageIO.cxx | 20 +- .../Deprecated/src/itkDICOMImageIO2.cxx | 2 +- .../Deprecated/test/BigEndian_hdr.h | 2 +- .../Deprecated/test/BigEndian_img.h | 2 +- .../Deprecated/test/ConvertAnalyzeFile.cxx | 12 +- .../Deprecated/test/DeformableModel1.cxx | 2 +- .../Deprecated/test/ImageCompare.cxx | 8 +- .../Deprecated/test/ImageCompareCommand.cxx | 8 +- .../Deprecated/test/ImageCopy.cxx | 6 +- .../Deprecated/test/LittleEndian_hdr.h | 2 +- .../Deprecated/test/LittleEndian_img.h | 2 +- .../Deprecated/test/itk2DDeformableTest.cxx | 2 +- .../test/itkAnalyzeImageIOBadHeader.cxx | 2 +- .../test/itkAnalyzeImageIODirectionsTest.cxx | 2 +- .../test/itkAnalyzeImageIORGBImageTest.cxx | 2 +- .../Deprecated/test/itkAnalyzeImageIOTest.cxx | 20 +- .../Deprecated/test/itkAnalyzeImageIOTest.h | 8 +- .../test/itkAnalyzeImageIOTest2.cxx | 2 +- .../Deprecated/test/itkDICOMImageIO2Test.cxx | 2 +- .../test/itkDICOMImageSeriesTest.cxx | 2 +- .../test/itkDICOMImageSeriesTest2.cxx | 2 +- .../Deprecated/test/itkDeformableTest.cxx | 2 +- .../test/itkDeprecatedPrintTest.cxx | 6 +- .../test/itkDicomImageIODirection2DTest.cxx | 2 +- .../Deprecated/test/itkDicomImageIOTest.cxx | 2 +- .../test/itkImageReadDICOMSeriesWriteTest.cxx | 4 +- .../test/itkReflectImageFilterTest.cxx | 2 +- .../Deprecated/test/itkVOLImageIOTest.cxx | 2 +- .../include/itkDefaultConvertPixelTraits.h | 6 +- Modules/Core/Common/include/itkFixedArray.h | 8 +- ...odFilledFunctionConditionalConstIterator.h | 2 +- ...dSpatialFunctionConditionalConstIterator.h | 2 +- ...itkMersenneTwisterRandomVariateGenerator.h | 4 +- .../Core/Common/include/itkNumericTraits.h | 102 +++---- Modules/Core/Common/include/itkPixelTraits.h | 116 ++++---- Modules/Core/Common/include/itkRGBAPixel.h | 2 +- Modules/Core/Common/include/itkRGBPixel.h | 2 +- ...odFilledFunctionConditionalConstIterator.h | 2 +- Modules/Core/Common/include/itkSparseImage.h | 4 +- .../Common/src/itkFloatingPointExceptions.cxx | 2 +- Modules/Core/Common/src/itkNumericTraits.cxx | 12 +- .../itkNumericTraitsCovariantVectorPixel.cxx | 6 +- ...itkNumericTraitsDiffusionTensor3DPixel.cxx | 4 +- .../src/itkNumericTraitsFixedArrayPixel.cxx | 6 +- .../Common/src/itkNumericTraitsPointPixel.cxx | 6 +- .../Common/src/itkNumericTraitsRGBAPixel.cxx | 6 +- .../Common/src/itkNumericTraitsRGBPixel.cxx | 6 +- .../src/itkNumericTraitsTensorPixel.cxx | 6 +- .../src/itkNumericTraitsVectorPixel.cxx | 6 +- Modules/Core/Common/test/itkByteSwapTest.cxx | 24 +- .../Core/Common/test/itkColorTableTest.cxx | 8 +- .../Common/test/itkExtractImage3Dto2DTest.cxx | 4 +- .../Core/Common/test/itkFactoryTestLib.cxx | 6 +- .../Core/Common/test/itkFixedArrayTest.cxx | 4 +- .../Common/test/itkImageDuplicatorTest.cxx | 12 +- .../Common/test/itkImageFillBufferTest.cxx | 2 +- .../Core/Common/test/itkImageIteratorTest.cxx | 22 +- .../test/itkImageIteratorWithIndexTest.cxx | 16 +- .../itkImageIteratorsForwardBackwardTest.cxx | 2 +- ...geRegionExclusionIteratorWithIndexTest.cxx | 6 +- .../test/itkImageRegionIteratorTest.cxx | 38 +-- .../test/itkImageReverseIteratorTest.cxx | 6 +- Modules/Core/Common/test/itkIteratorTests.cxx | 8 +- .../Core/Common/test/itkLineIteratorTest.cxx | 2 +- .../test/itkMathCastWithRangeCheckTest.cxx | 26 +- .../Core/Common/test/itkMathRoundTest2.cxx | 2 +- .../Core/Common/test/itkNumericTraitsTest.cxx | 264 +++++++++--------- .../Common/test/itkObjectFactoryTest2.cxx | 6 +- .../Core/Common/test/itkPixelAccessTest.cxx | 20 +- Modules/Core/Common/test/itkRGBPixelTest.cxx | 6 +- .../test/itkStreamingImageFilterTest3.cxx | 2 +- .../test/itkSymmetricSecondRankTensorTest.cxx | 6 +- Modules/Core/GPUCommon/include/itkGPUImage.h | 12 +- Modules/Core/GPUCommon/src/itkOpenCLUtil.cxx | 14 +- .../test/itkCovarianceImageFunctionTest.cxx | 2 +- ...ageAdaptorInterpolateImageFunctionTest.cxx | 2 +- .../ImageFunction/test/itkInterpolateTest.cxx | 2 +- ...geGaussianInterpolateImageFunctionTest.cxx | 2 +- ...obisDistanceThresholdImageFunctionTest.cxx | 2 +- .../test/itkMeanImageFunctionTest.cxx | 2 +- .../test/itkMedianImageFunctionTest.cxx | 4 +- ...stNeighborExtrapolateImageFunctionTest.cxx | 4 +- .../itkRGBInterpolateImageFunctionTest.cxx | 4 +- ...itkRayCastInterpolateImageFunctionTest.cxx | 2 +- .../itkScatterMatrixImageFunctionTest.cxx | 2 +- .../test/itkVarianceImageFunctionTest.cxx | 2 +- .../itkVectorInterpolateImageFunctionTest.cxx | 4 +- ...stNeighborExtrapolateImageFunctionTest.cxx | 4 +- .../test/itkVectorMeanImageFunctionTest.cxx | 2 +- ...ndowedSincInterpolateImageFunctionTest.cxx | 4 +- .../Mesh/include/itkBinaryMask3DMeshSource.h | 38 +-- .../include/itkBinaryMask3DMeshSource.hxx | 42 +-- .../itkSimplexMeshAdaptTopologyFilter.hxx | 2 +- .../test/itkBinaryMask3DMeshSourceTest.cxx | 52 ++-- ...naryMaskToNarrowBandPointSetFilterTest.cxx | 2 +- ...itkTriangleMeshToBinaryImageFilterTest.cxx | 2 +- ...tkTriangleMeshToBinaryImageFilterTest2.cxx | 2 +- ...tkTriangleMeshToBinaryImageFilterTest3.cxx | 2 +- .../Mesh/test/itkVTKPolyDataWriterTest01.cxx | 2 +- .../include/itkQuadEdgeCellTraitsInfo.h | 2 +- .../include/itkQuadEdgeMeshTraits.h | 2 +- .../include/itkImageMaskSpatialObject.h | 2 +- .../include/itkImageSpatialObject.h | 10 +- .../include/itkMetaImageConverter.h | 2 +- .../include/itkMetaImageMaskConverter.h | 4 +- .../include/itkMetaMeshConverter.h | 2 +- .../include/itkMetaSceneConverter.h | 2 +- .../include/itkSpatialObject.hxx | 4 +- ...atialObjectToImageStatisticsCalculator.hxx | 2 +- .../include/itkTubeSpatialObjectPoint.h | 4 +- .../include/itkTubeSpatialObjectPoint.hxx | 2 +- .../test/itkBoxSpatialObjectTest.cxx | 2 +- .../test/itkImageMaskSpatialObjectTest.cxx | 2 +- .../test/itkImageMaskSpatialObjectTest2.cxx | 2 +- .../test/itkImageMaskSpatialObjectTest3.cxx | 2 +- .../test/itkImageSpatialObjectTest.cxx | 4 +- .../test/itkNewMetaObjectTypeTest.cxx | 2 +- ...lObjectToImageStatisticsCalculatorTest.cxx | 2 +- .../test/itkTubeSpatialObjectTest.cxx | 2 +- .../TestKernel/include/itkTestDriverInclude.h | 18 +- .../include/itkTestingHashImageFilter.hxx | 2 +- .../itkBSplineDeformableTransformTest2.cxx | 2 +- .../itkBSplineDeformableTransformTest3.cxx | 2 +- .../itkBSplineTransformInitializerTest1.cxx | 2 +- .../itkBSplineTransformInitializerTest2.cxx | 2 +- .../test/itkBSplineTransformTest2.cxx | 2 +- .../test/itkBSplineTransformTest3.cxx | 2 +- .../test/itkCenteredAffineTransformTest.cxx | 4 +- ...kLandmarkBasedTransformInitializerTest.cxx | 6 +- ...ntAnisotropicDiffusionImageFilterTest2.cxx | 2 +- .../itkN4BiasFieldCorrectionImageFilter.h | 2 +- ...tkN4BiasFieldCorrectionImageFilterTest.cxx | 2 +- .../include/itkBinaryDilateImageFilter.hxx | 10 +- .../include/itkBinaryErodeImageFilter.hxx | 12 +- ...ClosingByReconstructionImageFilterTest.cxx | 2 +- .../test/itkBinaryDilateImageFilterTest.cxx | 10 +- .../test/itkBinaryDilateImageFilterTest2.cxx | 10 +- .../test/itkBinaryDilateImageFilterTest3.cxx | 2 +- .../test/itkBinaryErodeImageFilterTest.cxx | 10 +- .../test/itkBinaryErodeImageFilterTest3.cxx | 2 +- ...aryMorphologicalClosingImageFilterTest.cxx | 4 +- ...aryMorphologicalOpeningImageFilterTest.cxx | 4 +- ...OpeningByReconstructionImageFilterTest.cxx | 2 +- .../test/itkBinaryThinningImageFilterTest.cxx | 2 +- .../itkScalarToRGBColormapImageFilterTest.cxx | 4 +- ...onvolutionImageFilterDeltaFunctionTest.cxx | 2 +- .../test/itkConvolutionImageFilterTestInt.cxx | 2 +- ...onvolutionImageFilterDeltaFunctionTest.cxx | 2 +- .../itkFFTConvolutionImageFilterTestInt.cxx | 2 +- ...FTNormalizedCorrelationImageFilterTest.cxx | 4 +- ...FTNormalizedCorrelationImageFilterTest.cxx | 6 +- ...tkNormalizedCorrelationImageFilterTest.cxx | 2 +- .../itkPatchBasedDenoisingImageFilter.h | 2 +- ...ffusionTensor3DReconstructionImageFilter.h | 2 +- .../test/itkDiffusionTensor3DTest.cxx | 6 +- ...splacementFieldJacobianDeterminantFilter.h | 2 +- ...ximateSignedDistanceMapImageFilterTest.cxx | 2 +- ...tkDanielssonDistanceMapImageFilterTest.cxx | 2 +- ...kDanielssonDistanceMapImageFilterTest1.cxx | 2 +- ...kDanielssonDistanceMapImageFilterTest2.cxx | 4 +- .../itkIsoContourDistanceImageFilterTest.cxx | 2 +- ...edDanielssonDistanceMapImageFilterTest.cxx | 2 +- ...dDanielssonDistanceMapImageFilterTest1.cxx | 2 +- ...dDanielssonDistanceMapImageFilterTest2.cxx | 4 +- .../FFT/test/itkFFTShiftImageFilterTest.cxx | 2 +- .../include/itkFastMarchingBase.h | 2 +- .../include/itkFastMarchingImageFilter.h | 2 +- .../include/itkFastMarchingImageFilter.hxx | 2 +- .../include/itkFastMarchingImageFilterBase.h | 12 +- .../itkFastMarchingImageFilterBase.hxx | 4 +- .../itkFastMarchingQuadEdgeMeshFilterBase.h | 2 +- .../itkFastMarchingQuadEdgeMeshFilterBase.hxx | 2 +- .../test/itkFastMarchingBaseTest.cxx | 2 +- ...tkFastMarchingExtensionImageFilterTest.cxx | 2 +- .../itkFastMarchingImageTopologicalTest.cxx | 2 +- ...UGradientAnisotropicDiffusionImageFilter.h | 6 +- ...GradientNDAnisotropicDiffusionFunction.hxx | 8 +- .../include/itkGPUMeanImageFilter.h | 6 +- .../test/itkGPUMeanImageFilterTest.cxx | 4 +- .../itkGPUBinaryThresholdImageFilter.h | 8 +- .../itkGPUBinaryThresholdImageFilter.hxx | 14 +- .../itkGPUBinaryThresholdImageFilterTest.cxx | 4 +- .../test/itkGPUImageFilterTest.cxx | 4 +- ...strainedValueDifferenceImageFilterTest.cxx | 2 +- .../test/itkSTAPLEImageFilterTest.cxx | 12 +- .../itkSimilarityIndexImageFilterTest.cxx | 2 +- .../itkTestingComparisonImageFilterTest.cxx | 4 +- .../ImageCompose/include/itkJoinImageFilter.h | 4 +- ...ompose2DCovariantVectorImageFilterTest.cxx | 2 +- .../itkCompose2DVectorImageFilterTest.cxx | 2 +- ...ompose3DCovariantVectorImageFilterTest.cxx | 2 +- .../itkCompose3DVectorImageFilterTest.cxx | 2 +- .../test/itkComposeRGBAImageFilterTest.cxx | 2 +- .../test/itkComposeRGBImageFilterTest.cxx | 4 +- .../test/itkImageToVectorImageFilterTest.cxx | 2 +- .../test/itkJoinImageFilterTest.cxx | 8 +- .../itkJoinSeriesImageFilterStreamingTest.cxx | 4 +- .../test/itkJoinSeriesImageFilterTest.cxx | 2 +- .../itkMaskFeaturePointSelectionFilter.hxx | 2 +- .../test/itkBilateralImageFilterTest2.cxx | 2 +- .../test/itkBilateralImageFilterTest3.cxx | 2 +- .../itkCannyEdgeDetectionImageFilterTest.cxx | 2 +- .../itkCannyEdgeDetectionImageFilterTest2.cxx | 2 +- .../test/itkDerivativeImageFilterTest.cxx | 4 +- .../itkHoughTransform2DCirclesImageTest.cxx | 6 +- .../itkHoughTransform2DLinesImageTest.cxx | 6 +- ...lacianRecursiveGaussianImageFilterTest.cxx | 2 +- ...itkMaskFeaturePointSelectionFilterTest.cxx | 2 +- ...kSimpleContourExtractorImageFilterTest.cxx | 2 +- .../test/itkCastImageFilterTest.cxx | 18 +- .../test/itkClampImageFilterTest.cxx | 8 +- .../test/itkImageToImageFilterTest.cxx | 4 +- ...askNeighborhoodOperatorImageFilterTest.cxx | 4 +- .../include/itkLabelMapToRGBImageFilter.h | 2 +- .../include/itkLabelToRGBFunctor.h | 2 +- .../include/itkScalarToRGBPixelFunctor.h | 2 +- .../include/itkScalarToRGBPixelFunctor.hxx | 4 +- ...LabelMapContourOverlayImageFilterTest1.cxx | 4 +- ...LabelMapContourOverlayImageFilterTest2.cxx | 6 +- .../itkLabelMapOverlayImageFilterTest1.cxx | 4 +- .../itkLabelMapOverlayImageFilterTest2.cxx | 4 +- .../test/itkLabelMapToRGBImageFilterTest1.cxx | 4 +- .../test/itkLabelMapToRGBImageFilterTest2.cxx | 4 +- .../test/itkLabelOverlayImageFilterTest.cxx | 4 +- .../test/itkLabelToRGBImageFilterTest.cxx | 4 +- .../test/itkScalarToRGBPixelFunctorTest.cxx | 8 +- .../itkVectorGradientMagnitudeImageFilter.h | 2 +- .../itkDifferenceOfGaussiansGradientTest.cxx | 4 +- .../test/itkGradientImageFilterTest.cxx | 2 +- ...ectorGradientMagnitudeImageFilterTest1.cxx | 4 +- ...ectorGradientMagnitudeImageFilterTest2.cxx | 6 +- ...ectorGradientMagnitudeImageFilterTest3.cxx | 2 +- .../itkCoxDeBoorBSplineKernelFunction.h | 2 +- .../itkCoxDeBoorBSplineKernelFunction.hxx | 6 +- .../ImageGrid/include/itkOrientImageFilter.h | 4 +- .../itkBSplineDownsampleImageFilterTest.cxx | 2 +- .../itkBSplineUpsampleImageFilterTest.cxx | 2 +- .../test/itkCropImageFilter3DTest.cxx | 4 +- .../test/itkCyclicShiftImageFilterTest.cxx | 2 +- .../ImageGrid/test/itkFlipImageFilterTest.cxx | 2 +- .../ImageGrid/test/itkOrientedImage2DTest.cxx | 2 +- .../ImageGrid/test/itkOrientedImage3DTest.cxx | 2 +- .../test/itkOrientedImageProfileTest1.cxx | 2 +- .../test/itkOrientedImageProfileTest2.cxx | 2 +- .../test/itkOrientedImageProfileTest3.cxx | 2 +- .../test/itkPasteImageFilterTest.cxx | 2 +- .../test/itkPermuteAxesImageFilterTest.cxx | 2 +- .../test/itkPushPopTileImageFilterTest.cxx | 6 +- .../ImageGrid/test/itkResampleImageTest2.cxx | 2 +- .../ImageGrid/test/itkResampleImageTest3.cxx | 2 +- .../ImageGrid/test/itkResampleImageTest5.cxx | 4 +- .../ImageGrid/test/itkResampleImageTest6.cxx | 2 +- ...nkImagePreserveObjectPhysicalLocations.cxx | 6 +- .../test/itkSliceBySliceImageFilterTest.cxx | 4 +- .../ImageGrid/test/itkTileImageFilterTest.cxx | 6 +- .../test/itkVectorResampleImageFilterTest.cxx | 2 +- .../test/itkAndImageFilterTest.cxx | 2 +- ...onstrainedValueAdditionImageFilterTest.cxx | 2 +- .../itkInvertIntensityImageFilterTest.cxx | 2 +- .../test/itkMaskImageFilterTest.cxx | 2 +- .../test/itkMaskNegatedImageFilterTest.cxx | 2 +- ...itkMatrixIndexSelectionImageFilterTest.cxx | 4 +- .../test/itkModulusImageFilterTest.cxx | 2 +- .../test/itkOrImageFilterTest.cxx | 2 +- .../test/itkPolylineMask2DImageFilterTest.cxx | 2 +- .../test/itkPolylineMaskImageFilterTest.cxx | 4 +- .../test/itkPromoteDimensionImageTest.cxx | 2 +- .../test/itkShiftScaleImageFilterTest.cxx | 2 +- ...ectorIndexSelectionCastImageFilterTest.cxx | 4 +- .../test/itkXorImageFilterTest.cxx | 2 +- .../test/itkBinaryContourImageFilterTest.cxx | 2 +- .../test/itkChangeLabelImageFilterTest.cxx | 4 +- .../test/itkLabelContourImageFilterTest.cxx | 2 +- .../test/itkGaussianImageSourceTest.cxx | 2 +- .../test/itkAccumulateImageFilterTest.cxx | 2 +- ...veHistogramEqualizationImageFilterTest.cxx | 2 +- .../itkBinaryProjectionImageFilterTest.cxx | 2 +- .../itkGetAverageSliceImageFilterTest.cxx | 2 +- .../itkHistogramToEntropyImageFilterTest1.cxx | 2 +- .../itkHistogramToEntropyImageFilterTest2.cxx | 2 +- ...tkHistogramToIntensityImageFilterTest1.cxx | 2 +- ...tkHistogramToIntensityImageFilterTest2.cxx | 2 +- ...togramToLogProbabilityImageFilterTest1.cxx | 2 +- ...togramToLogProbabilityImageFilterTest2.cxx | 2 +- ...HistogramToProbabilityImageFilterTest1.cxx | 2 +- ...HistogramToProbabilityImageFilterTest2.cxx | 2 +- .../test/itkImageMomentsTest.cxx | 4 +- .../test/itkImageToHistogramFilterTest.cxx | 2 +- .../test/itkImageToHistogramFilterTest2.cxx | 2 +- .../test/itkImageToHistogramFilterTest3.cxx | 2 +- .../itkLabelStatisticsImageFilterTest.cxx | 2 +- .../itkMaximumProjectionImageFilterTest.cxx | 2 +- .../itkMaximumProjectionImageFilterTest2.cxx | 2 +- .../itkMaximumProjectionImageFilterTest3.cxx | 2 +- .../test/itkMeanProjectionImageFilterTest.cxx | 2 +- .../itkMedianProjectionImageFilterTest.cxx | 2 +- .../itkMinimumProjectionImageFilterTest.cxx | 2 +- .../test/itkProjectionImageFilterTest.cxx | 2 +- ...dardDeviationProjectionImageFilterTest.cxx | 2 +- .../test/itkSumProjectionImageFilterTest.cxx | 4 +- .../include/itkObjectByObjectLabelMapFilter.h | 4 +- .../test/itkAggregateLabelMapFilterTest.cxx | 4 +- ...tributeKeepNObjectsLabelMapFilterTest1.cxx | 2 +- .../itkAttributeLabelObjectAccessorsTest1.cxx | 2 +- ...itkAttributeOpeningLabelMapFilterTest1.cxx | 2 +- ...tkAttributePositionLabelMapFilterTest1.cxx | 2 +- ...itkAttributeRelabelLabelMapFilterTest1.cxx | 2 +- .../itkAttributeUniqueLabelMapFilterTest1.cxx | 4 +- .../test/itkAutoCropLabelMapFilterTest1.cxx | 2 +- .../test/itkAutoCropLabelMapFilterTest2.cxx | 2 +- .../itkBinaryFillholeImageFilterTest1.cxx | 2 +- .../itkBinaryGrindPeakImageFilterTest1.cxx | 2 +- .../itkBinaryImageToLabelMapFilterTest.cxx | 4 +- ...kBinaryImageToShapeLabelMapFilterTest1.cxx | 4 +- ...ryImageToStatisticsLabelMapFilterTest1.cxx | 2 +- ...econstructionByDilationImageFilterTest.cxx | 2 +- ...ReconstructionByErosionImageFilterTest.cxx | 2 +- ...BinaryReconstructionLabelMapFilterTest.cxx | 2 +- ...inaryShapeKeepNObjectsImageFilterTest1.cxx | 2 +- .../itkBinaryShapeOpeningImageFilterTest1.cxx | 2 +- ...StatisticsKeepNObjectsImageFilterTest1.cxx | 2 +- ...inaryStatisticsOpeningImageFilterTest1.cxx | 2 +- .../test/itkChangeLabelLabelMapFilterTest.cxx | 4 +- .../itkChangeRegionLabelMapFilterTest1.cxx | 4 +- .../test/itkConvertLabelMapFilterTest1.cxx | 2 +- .../test/itkCropLabelMapFilterTest1.cxx | 4 +- .../itkLabelImageToLabelMapFilterTest.cxx | 2 +- ...tkLabelImageToShapeLabelMapFilterTest1.cxx | 2 +- ...elImageToStatisticsLabelMapFilterTest1.cxx | 2 +- .../LabelMap/test/itkLabelMapFilterTest.cxx | 2 +- .../test/itkLabelMapMaskImageFilterTest.cxx | 4 +- ...itkLabelMapToAttributeImageFilterTest1.cxx | 2 +- .../itkLabelMapToBinaryImageFilterTest.cxx | 4 +- .../itkLabelMapToLabelImageFilterTest.cxx | 4 +- .../itkLabelSelectionLabelMapFilterTest.cxx | 4 +- ...LabelShapeKeepNObjectsImageFilterTest1.cxx | 2 +- .../itkLabelShapeOpeningImageFilterTest1.cxx | 2 +- ...StatisticsKeepNObjectsImageFilterTest1.cxx | 2 +- ...LabelStatisticsOpeningImageFilterTest1.cxx | 2 +- .../itkLabelUniqueLabelMapFilterTest1.cxx | 4 +- .../test/itkMergeLabelMapFilterTest1.cxx | 2 +- .../itkObjectByObjectLabelMapFilterTest.cxx | 4 +- .../test/itkPadLabelMapFilterTest1.cxx | 4 +- ...RegionFromReferenceLabelMapFilterTest1.cxx | 4 +- .../test/itkRelabelLabelMapFilterTest1.cxx | 4 +- ...tkShapeKeepNObjectsLabelMapFilterTest1.cxx | 2 +- .../itkShapeLabelObjectAccessorsTest1.cxx | 2 +- .../itkShapeOpeningLabelMapFilterTest1.cxx | 2 +- .../itkShapePositionLabelMapFilterTest1.cxx | 2 +- .../test/itkShapeRelabelImageFilterTest1.cxx | 2 +- .../itkShapeRelabelLabelMapFilterTest1.cxx | 2 +- .../itkShapeUniqueLabelMapFilterTest1.cxx | 2 +- .../LabelMap/test/itkShiftLabelObjectTest.cxx | 2 +- .../test/itkShiftScaleLabelMapFilterTest1.cxx | 4 +- ...tisticsKeepNObjectsLabelMapFilterTest1.cxx | 2 +- ...tkStatisticsOpeningLabelMapFilterTest1.cxx | 2 +- ...kStatisticsPositionLabelMapFilterTest1.cxx | 2 +- .../itkStatisticsRelabelImageFilterTest1.cxx | 2 +- ...tkStatisticsRelabelLabelMapFilterTest1.cxx | 2 +- ...itkStatisticsUniqueLabelMapFilterTest1.cxx | 2 +- .../include/itkAnchorErodeDilateLine.h | 8 +- .../include/itkMorphologyHistogram.h | 8 +- ...istogramMorphologicalGradientImageFilter.h | 8 +- ...ClosingByReconstructionImageFilterTest.cxx | 2 +- .../itkDoubleThresholdImageFilterTest.cxx | 6 +- ...ayscaleConnectedClosingImageFilterTest.cxx | 6 +- ...ayscaleConnectedOpeningImageFilterTest.cxx | 6 +- .../itkGrayscaleDilateImageFilterTest.cxx | 2 +- .../test/itkGrayscaleErodeImageFilterTest.cxx | 2 +- .../itkGrayscaleFillholeImageFilterTest.cxx | 2 +- ...GrayscaleFunctionDilateImageFilterTest.cxx | 8 +- ...kGrayscaleFunctionErodeImageFilterTest.cxx | 8 +- ...caleGeodesicErodeDilateImageFilterTest.cxx | 2 +- ...aleMorphologicalClosingImageFilterTest.cxx | 2 +- ...leMorphologicalClosingImageFilterTest2.cxx | 2 +- ...aleMorphologicalOpeningImageFilterTest.cxx | 2 +- ...leMorphologicalOpeningImageFilterTest2.cxx | 2 +- .../test/itkHConvexConcaveImageFilterTest.cxx | 2 +- .../test/itkHMaximaMinimaImageFilterTest.cxx | 6 +- .../itkMapGrayscaleDilateImageFilterTest.cxx | 2 +- .../itkMapGrayscaleErodeImageFilterTest.cxx | 2 +- ...aleMorphologicalClosingImageFilterTest.cxx | 2 +- ...aleMorphologicalOpeningImageFilterTest.cxx | 2 +- ...tkMorphologicalGradientImageFilterTest.cxx | 2 +- .../itkObjectMorphologyImageFilterTest.cxx | 8 +- ...OpeningByReconstructionImageFilterTest.cxx | 2 +- .../test/itkRemoveBoundaryObjectsTest.cxx | 6 +- .../test/itkRemoveBoundaryObjectsTest2.cxx | 6 +- .../test/itkTopHatImageFilterTest.cxx | 2 +- ...xtractOrthogonalSwath2DImageFilterTest.cxx | 2 +- .../itkOrthogonalSwath2DPathFilterTest.cxx | 2 +- .../itkBinaryMask3DQuadEdgeMeshSourceTest.cxx | 2 +- ...patialFunctionImageEvaluatorFilterTest.cxx | 2 +- .../itkHistogramThresholdImageFilter.hxx | 2 +- .../itkBinaryThresholdImageFilterTest.cxx | 2 +- .../itkBinaryThresholdImageFilterTest2.cxx | 2 +- ...naryThresholdProjectionImageFilterTest.cxx | 2 +- .../itkBinaryThresholdSpatialFunctionTest.cxx | 2 +- ...itkHuangMaskedThresholdImageFilterTest.cxx | 2 +- .../test/itkHuangThresholdImageFilterTest.cxx | 2 +- ...termodesMaskedThresholdImageFilterTest.cxx | 2 +- .../itkIntermodesThresholdImageFilterTest.cxx | 2 +- ...kIsoDataMaskedThresholdImageFilterTest.cxx | 2 +- .../itkIsoDataThresholdImageFilterTest.cxx | 2 +- ...ingworthMaskedThresholdImageFilterTest.cxx | 2 +- ...lerIllingworthThresholdImageFilterTest.cxx | 2 +- .../itkLiMaskedThresholdImageFilterTest.cxx | 2 +- .../test/itkLiThresholdImageFilterTest.cxx | 2 +- ...mEntropyMaskedThresholdImageFilterTest.cxx | 2 +- ...MaximumEntropyThresholdImageFilterTest.cxx | 2 +- ...kMomentsMaskedThresholdImageFilterTest.cxx | 2 +- .../itkMomentsThresholdImageFilterTest.cxx | 2 +- .../itkOtsuMaskedThresholdImageFilterTest.cxx | 2 +- ...kOtsuMultipleThresholdsImageFilterTest.cxx | 4 +- .../test/itkOtsuThresholdImageFilterTest.cxx | 2 +- ...iEntropyMaskedThresholdImageFilterTest.cxx | 2 +- ...tkRenyiEntropyThresholdImageFilterTest.cxx | 2 +- ...ShanbhagMaskedThresholdImageFilterTest.cxx | 2 +- .../itkShanbhagThresholdImageFilterTest.cxx | 2 +- ...TriangleMaskedThresholdImageFilterTest.cxx | 2 +- .../itkTriangleThresholdImageFilterTest.cxx | 2 +- .../itkYenMaskedThresholdImageFilterTest.cxx | 2 +- .../test/itkYenThresholdImageFilterTest.cxx | 2 +- Modules/IO/BMP/include/itkBMPImageIO.h | 6 +- Modules/IO/BMP/src/itkBMPImageIO.cxx | 36 +-- Modules/IO/BMP/test/itkBMPImageIOTest.cxx | 2 +- Modules/IO/BMP/test/itkBMPImageIOTest2.cxx | 2 +- Modules/IO/BioRad/src/itkBioRadImageIO.cxx | 52 ++-- .../IO/BioRad/test/itkBioRadImageIOTest.cxx | 2 +- Modules/IO/GDCM/src/itkGDCMImageIO.cxx | 18 +- Modules/IO/GDCM/test/itkGDCMImageIOTest.cxx | 2 +- Modules/IO/GDCM/test/itkGDCMImageIOTest2.cxx | 2 +- .../GDCM/test/itkGDCMSeriesReadImageWrite.cxx | 10 +- .../itkGDCMSeriesStreamReadImageWrite.cxx | 2 +- Modules/IO/GE/include/Ge5xHdr.h | 2 +- Modules/IO/GE/include/itkGE4ImageIO.h | 2 +- Modules/IO/GE/include/itkGE5ImageIO.h | 2 +- Modules/IO/GE/include/itkGEAdwImageIO.h | 6 +- Modules/IO/GE/src/itkGE5ImageIO.cxx | 2 +- Modules/IO/GE/test/itkGEImageIOTest.cxx | 2 +- Modules/IO/GIPL/src/itkGiplImageIO.cxx | 62 ++-- Modules/IO/GIPL/test/itkGiplImageIOTest.cxx | 2 +- Modules/IO/HDF5/src/itkHDF5ImageIO.cxx | 14 +- .../itkHDF5ImageIOStreamingReadWriteTest.cxx | 4 +- Modules/IO/HDF5/test/itkHDF5ImageIOTest.cxx | 20 +- Modules/IO/IPL/include/itkIPLCommonImageIO.h | 10 +- .../IO/ImageBase/include/itkIOTestHelper.h | 4 +- .../ImageBase/include/itkImageFileReader.hxx | 8 +- Modules/IO/ImageBase/include/itkImageIOBase.h | 8 +- Modules/IO/ImageBase/src/itkIOCommon.cxx | 8 +- Modules/IO/ImageBase/src/itkImageIOBase.cxx | 16 +- .../IO/ImageBase/test/itkFileFreeImageIO.cxx | 2 +- .../IO/ImageBase/test/itkIOCommonTest2.cxx | 14 +- Modules/IO/ImageBase/test/itkIOPluginTest.cxx | 2 +- .../test/itkImageFileReaderStreamingTest.cxx | 2 +- .../test/itkImageFileReaderStreamingTest2.cxx | 2 +- .../test/itkImageFileWriterPastingTest1.cxx | 2 +- .../test/itkImageFileWriterPastingTest2.cxx | 2 +- .../test/itkImageFileWriterPastingTest3.cxx | 2 +- ...WriterStreamingPastingCompressingTest1.cxx | 4 +- .../test/itkImageFileWriterStreamingTest1.cxx | 2 +- .../test/itkImageFileWriterStreamingTest2.cxx | 2 +- .../test/itkImageFileWriterTest2.cxx | 2 +- ...eWriterUpdateLargestPossibleRegionTest.cxx | 2 +- .../test/itkImageIODirection2DTest.cxx | 2 +- .../test/itkImageIODirection3DTest.cxx | 2 +- .../test/itkImageSeriesReaderVectorTest.cxx | 4 +- .../test/itkImageSeriesWriterTest.cxx | 2 +- .../itkLargeImageWriteConvertReadTest.cxx | 4 +- .../test/itkLargeImageWriteReadTest.cxx | 4 +- .../test/itkNoiseImageFilterTest.cxx | 4 +- .../itkReadWriteImageWithDictionaryTest.cxx | 2 +- Modules/IO/JPEG/src/itkJPEGImageIO.cxx | 4 +- Modules/IO/JPEG/test/itkJPEGImageIOTest.cxx | 2 +- Modules/IO/LSM/src/itkLSMImageIO.cxx | 16 +- Modules/IO/LSM/test/itkLSMImageIOTest.cxx | 2 +- .../Mesh/include/itkMeshConvertPixelTraits.h | 28 +- Modules/IO/Mesh/include/itkMeshFileReader.hxx | 24 +- Modules/IO/Mesh/include/itkMeshIOBase.h | 4 +- .../IO/Mesh/include/itkVTKPolyDataMeshIO.h | 4 +- Modules/IO/Mesh/src/itkBYUMeshIO.cxx | 10 +- .../IO/Mesh/src/itkFreeSurferAsciiMeshIO.cxx | 10 +- .../IO/Mesh/src/itkFreeSurferBinaryMeshIO.cxx | 14 +- Modules/IO/Mesh/src/itkGiftiMeshIO.cxx | 32 +-- Modules/IO/Mesh/src/itkMeshIOBase.cxx | 4 +- Modules/IO/Mesh/src/itkOBJMeshIO.cxx | 14 +- Modules/IO/Mesh/src/itkOFFMeshIO.cxx | 18 +- Modules/IO/Mesh/src/itkVTKPolyDataMeshIO.cxx | 64 ++--- Modules/IO/Meta/src/itkMetaImageIO.cxx | 8 +- .../test/itkLargeMetaImageWriteReadTest.cxx | 4 +- Modules/IO/Meta/test/itkMetaImageIOGzTest.cxx | 6 +- .../Meta/test/itkMetaImageIOMetaDataTest.cxx | 6 +- Modules/IO/Meta/test/itkMetaImageIOTest.cxx | 2 +- Modules/IO/Meta/test/itkMetaImageIOTest2.cxx | 2 +- .../Meta/test/itkMetaImageStreamingIOTest.cxx | 4 +- .../itkMetaImageStreamingWriterIOTest.cxx | 2 +- Modules/IO/Meta/test/testMetaObject.cxx | 4 +- Modules/IO/Meta/test/testMetaUtils.cxx | 2 +- Modules/IO/NIFTI/include/itkNiftiImageIO.h | 9 +- Modules/IO/NIFTI/src/itkNiftiImageIO.cxx | 12 +- Modules/IO/NIFTI/test/BigEndian_hdr.h | 2 +- Modules/IO/NIFTI/test/BigEndian_img.h | 2 +- Modules/IO/NIFTI/test/LittleEndian_hdr.h | 2 +- Modules/IO/NIFTI/test/LittleEndian_img.h | 2 +- Modules/IO/NIFTI/test/itkNiftiImageIOTest.cxx | 12 +- Modules/IO/NIFTI/test/itkNiftiImageIOTest.h | 8 +- .../IO/NIFTI/test/itkNiftiImageIOTest10.cxx | 2 +- .../IO/NIFTI/test/itkNiftiImageIOTest2.cxx | 2 +- .../IO/NIFTI/test/itkNiftiImageIOTest4.cxx | 2 +- .../IO/NIFTI/test/itkNiftiImageIOTest5.cxx | 4 +- .../IO/NIFTI/test/itkNiftiImageIOTest9.cxx | 2 +- .../IO/NIFTI/test/itkNiftiReadAnalyzeTest.cxx | 6 +- Modules/IO/NRRD/test/itkNrrdImageIOTest.cxx | 24 +- .../test/itkNrrdRGBAImageReadWriteTest.cxx | 2 +- .../test/itkNrrdRGBImageReadWriteTest.cxx | 2 +- Modules/IO/PNG/src/itkPNGImageIO.cxx | 14 +- Modules/IO/PNG/test/itkPNGImageIOTest.cxx | 8 +- .../PhilipsREC/src/itkPhilipsRECImageIO.cxx | 16 +- .../test/itkPhilipsRECImageIOTest.cxx | 2 +- Modules/IO/RAW/include/itkRawImageIO.h | 6 +- Modules/IO/RAW/include/itkRawImageIO.hxx | 8 +- Modules/IO/RAW/test/itkRawImageIOTest.cxx | 6 +- Modules/IO/RAW/test/itkRawImageIOTest2.cxx | 2 +- Modules/IO/RAW/test/itkRawImageIOTest3.cxx | 2 +- Modules/IO/RAW/test/itkRawImageIOTest4.cxx | 2 +- Modules/IO/RAW/test/itkRawImageIOTest5.cxx | 26 +- .../Siemens/include/itkSiemensVisionImageIO.h | 2 +- .../include/itkSpatialObjectReader.h | 2 +- .../include/itkSpatialObjectWriter.h | 2 +- .../test/itkReadWriteSpatialObjectTest.cxx | 8 +- Modules/IO/TIFF/include/itkTIFFImageIO.h | 10 +- Modules/IO/TIFF/src/itkTIFFImageIO.cxx | 164 +++++------ .../test/itkLargeTIFFImageWriteReadTest.cxx | 4 +- Modules/IO/TIFF/test/itkTIFFImageIOTest.cxx | 20 +- Modules/IO/TIFF/test/itkTIFFImageIOTest2.cxx | 2 +- Modules/IO/VTK/test/itkVTKImageIO2Test.cxx | 112 ++++---- Modules/IO/VTK/test/itkVTKImageIOTest.cxx | 32 +-- Modules/IO/XML/test/itkDOMTest6.cxx | 4 +- Modules/IO/XML/test/itkDOMTest7.cxx | 4 +- .../test/itkAlgorithmsPrintTest.cxx | 4 +- .../test/itkAlgorithmsPrintTest2.cxx | 6 +- .../test/itkAlgorithmsPrintTest3.cxx | 4 +- .../test/itkAlgorithmsPrintTest4.cxx | 4 +- .../test/itkBasicFiltersPrintTest.cxx | 10 +- .../test/itkBasicFiltersPrintTest2.cxx | 6 +- .../test/itkBioRadImageIOTest.cxx | 2 +- .../test/itkCommonPrintTest.cxx | 4 +- .../IntegratedTest/test/itkIOPrintTest.cxx | 6 +- .../test/itkImageToHistogramFilterTest4.cxx | 12 +- .../test/itkImageToMeshFilterTest.cxx | 2 +- .../itkMaskedImageToHistogramFilterTest1.cxx | 4 +- .../test/itkSpatialObjectPrintTest.cxx | 2 +- .../test/itkStatisticsPrintTest.cxx | 2 +- .../itkContourExtractor2DImageFilter.hxx | 2 +- ...tFourierReconstructionImageToImageFilter.h | 36 +-- .../itkKappaSigmaThresholdImageFilter.h | 2 +- .../Review/include/itkMRCHeaderObject.h | 4 +- ...tiphaseSparseFiniteDifferenceImageFilter.h | 2 +- ...phaseSparseFiniteDifferenceImageFilter.hxx | 4 +- .../Nonunit/Review/include/itkRankHistogram.h | 8 +- ...itkStochasticFractalDimensionImageFilter.h | 2 +- .../Review/src/itkBruker2DSEQImageIO.cxx | 18 +- .../Nonunit/Review/src/itkJPEG2000ImageIO.cxx | 10 +- .../Nonunit/Review/src/itkMINC2ImageIO.cxx | 8 +- Modules/Nonunit/Review/src/itkMRCImageIO.cxx | 12 +- .../Nonunit/Review/src/itkVoxBoCUBImageIO.cxx | 18 +- .../test/itkAreaClosingImageFilterTest.cxx | 2 +- .../test/itkAreaOpeningImageFilterTest.cxx | 2 +- .../Review/test/itkBoxMeanImageFilterTest.cxx | 2 +- .../test/itkBoxSigmaImageFilterTest.cxx | 2 +- .../Review/test/itkBruker2DSEQImageIOTest.cxx | 2 +- .../itkContourExtractor2DImageFilterTest.cxx | 2 +- ...feomorphicDemonsRegistrationFilterTest.cxx | 2 +- ...creteGaussianDerivativeImageFilterTest.cxx | 106 ------- ...eteGaussianDerivativeImageFunctionTest.cxx | 2 +- ...ientMagnitudeGaussianImageFunctionTest.cxx | 2 +- ...screteHessianGaussianImageFunctionTest.cxx | 2 +- .../itkFastApproximateRankImageFilterTest.cxx | 2 +- ...tricForcesDemonsRegistrationFilterTest.cxx | 2 +- .../itkGridForwardWarpImageFilterTest.cxx | 2 +- ...sianToObjectnessMeasureImageFilterTest.cxx | 2 +- .../itkJPEG2000ImageIORegionOfInterest.cxx | 4 +- .../Review/test/itkJPEG2000ImageIOTest01.cxx | 4 +- .../Review/test/itkJPEG2000ImageIOTest02.cxx | 4 +- .../Review/test/itkJPEG2000ImageIOTest03.cxx | 2 +- .../Review/test/itkJPEG2000ImageIOTest04.cxx | 2 +- .../Review/test/itkJPEG2000ImageIOTest05.cxx | 2 +- .../Review/test/itkJPEG2000ImageIOTest06.cxx | 2 +- ...KappaSigmaThresholdImageCalculatorTest.cxx | 4 +- .../itkKappaSigmaThresholdImageFilterTest.cxx | 6 +- .../test/itkLabelGeometryImageFilterTest.cxx | 8 +- .../Review/test/itkMINC2ImageIOTest.cxx | 2 +- .../Nonunit/Review/test/itkMRCImageIOTest.cxx | 26 +- .../test/itkMapMaskedRankImageFilterTest.cxx | 2 +- .../Review/test/itkMapRankImageFilterTest.cxx | 2 +- .../test/itkMaskedRankImageFilterTest.cxx | 2 +- ...calWatershedFromMarkersImageFilterTest.cxx | 4 +- ...kMorphologicalWatershedImageFilterTest.cxx | 4 +- ...seDenseFiniteDifferenceImageFilterTest.cxx | 2 +- ...tiphaseFiniteDifferenceImageFilterTest.cxx | 2 +- ...eSparseFiniteDifferenceImageFilterTest.cxx | 2 +- ...ormationImageToImageMetricThreadsTest1.cxx | 2 +- .../Review/test/itkRankImageFilterTest.cxx | 2 +- .../test/itkRegionalMaximaImageFilterTest.cxx | 2 +- .../itkRegionalMaximaImageFilterTest2.cxx | 2 +- .../test/itkRegionalMinimaImageFilterTest.cxx | 2 +- .../itkRegionalMinimaImageFilterTest2.cxx | 2 +- .../Review/test/itkReviewPrintTest.cxx | 6 +- ...obustAutomaticThresholdImageFilterTest.cxx | 2 +- ...eFunctionConditionalConstIteratorTest1.cxx | 2 +- ...eFunctionConditionalConstIteratorTest2.cxx | 4 +- ...eFunctionConditionalConstIteratorTest3.cxx | 4 +- ...itkValuedRegionalMaximaImageFilterTest.cxx | 2 +- ...itkValuedRegionalMinimaImageFilterTest.cxx | 2 +- .../Review/test/itkVoxBoCUBImageIOTest.cxx | 2 +- .../itkWarpHarmonicEnergyCalculatorTest.cxx | 2 +- .../itkWarpJacobianDeterminantFilterTest.cxx | 2 +- .../FEM/include/itkFEMSpatialObjectReader.h | 2 +- .../FEM/include/itkFEMSpatialObjectWriter.h | 2 +- ...mageToRectilinearFEMObjectFilter2DTest.cxx | 2 +- ...mageToRectilinearFEMObjectFilter3DTest.cxx | 2 +- .../NarrowBand/include/itkNarrowBand.h | 2 +- .../include/itkNarrowBandImageFilterBase.h | 2 +- .../include/itkNarrowBandImageFilterBase.hxx | 2 +- .../test/itkNarrowBandImageFilterBaseTest.cxx | 2 +- .../test/itkObjectToObjectMetricBaseTest.cxx | 2 +- .../include/itkImageToHistogramFilter.hxx | 2 +- .../include/itkMeasurementVectorTraits.h | 16 +- ...itkScalarImageToCooccurrenceMatrixFilter.h | 2 +- .../itkScalarImageToRunLengthFeaturesFilter.h | 6 +- .../itkScalarImageToRunLengthMatrixFilter.h | 2 +- .../itkScalarImageToTextureFeaturesFilter.h | 6 +- .../test/itkCovarianceSampleFilterTest.cxx | 2 +- .../test/itkImageToListSampleAdaptorTest2.cxx | 2 +- .../test/itkImageToListSampleFilterTest.cxx | 8 +- .../test/itkImageToListSampleFilterTest2.cxx | 4 +- .../test/itkImageToListSampleFilterTest3.cxx | 4 +- .../test/itkSampleToHistogramFilterTest5.cxx | 2 +- ...larImageToCooccurrenceMatrixFilterTest.cxx | 2 +- ...arImageToCooccurrenceMatrixFilterTest2.cxx | 2 +- ...alarImageToRunLengthFeaturesFilterTest.cxx | 2 +- ...ScalarImageToRunLengthMatrixFilterTest.cxx | 2 +- ...ScalarImageToTextureFeaturesFilterTest.cxx | 2 +- ...dDeviationPerComponentSampleFilterTest.cxx | 2 +- .../Statistics/test/itkSubsampleTest.cxx | 2 +- .../include/itkEuclideanDistancePointMetric.h | 2 +- .../test/itkBlockMatchingImageFilterTest.cxx | 2 +- .../itkCenteredTransformInitializerTest.cxx | 8 +- ...CenteredVersorTransformInitializerTest.cxx | 4 +- .../itkImageRegistrationMethodTest_16.cxx | 8 +- ...tkKappaStatisticImageToImageMetricTest.cxx | 2 +- ...CompareHistogramImageToImageMetricTest.cxx | 16 +- ...MatchCardinalityImageToImageMetricTest.cxx | 2 +- ...utualInformationImageToImageMetricTest.cxx | 10 +- ...iprocalSquareDifferenceImageMetricTest.cxx | 2 +- ...esolutionImageRegistrationMethodTest_1.cxx | 4 +- ...esolutionImageRegistrationMethodTest_2.cxx | 2 +- ...kMultiResolutionPyramidImageFilterTest.cxx | 2 +- .../test/itkMutualInformationMetricTest.cxx | 8 +- .../itkPointSetToPointSetRegistrationTest.cxx | 4 +- ...eMultiResolutionPyramidImageFilterTest.cxx | 2 +- ...itkFEMFiniteDifferenceFunctionLoadTest.cxx | 2 +- .../test/itkFEMRegistrationFilter2DTest.cxx | 2 +- .../FEM/test/itkFEMRegistrationFilterTest.cxx | 2 +- .../test/itkFEMRegistrationFilterTest2.cxx | 2 +- .../include/itkGPUDemonsRegistrationFilter.h | 6 +- .../itkGPUDemonsRegistrationFilterTest.cxx | 8 +- .../itkGPUDemonsRegistrationFilterTest2.cxx | 2 +- .../include/itkImageToImageMetricv4.h | 2 +- ...orrelationImageToImageRegistrationTest.cxx | 2 +- ...nsImageToImageMetricv4RegistrationTest.cxx | 2 +- ...DistancePointSetMetricRegistrationTest.cxx | 2 +- ...itkEuclideanDistancePointSetMetricTest.cxx | 2 +- ...tkEuclideanDistancePointSetMetricTest2.cxx | 2 +- ...ionBasedPointSetMetricRegistrationTest.cxx | 2 +- .../itkExpectationBasedPointSetMetricTest.cxx | 2 +- ...HavrdaCharvatTsallisPointSetMetricTest.cxx | 2 +- ...nformationImageToImageRegistrationTest.cxx | 2 +- ...onImageToImageMetricv4RegistrationTest.cxx | 2 +- ...ualInformationImageToImageMetricv4Test.cxx | 6 +- ...esImageToImageMetricv4RegistrationTest.cxx | 2 +- ...ntImageToImageMetricv4RegistrationTest.cxx | 2 +- ...rtImageToImageMetricv4RegistrationTest.cxx | 2 +- .../itkCurvatureRegistrationFilterTest.cxx | 2 +- .../test/itkDemonsRegistrationFilterTest.cxx | 2 +- ...esolutionPDEDeformableRegistrationTest.cxx | 2 +- ...tricForcesDemonsRegistrationFilterTest.cxx | 2 +- ...QuasiNewtonOptimizerv4RegistrationTest.cxx | 4 +- .../itkBayesianClassifierImageFilter.h | 4 +- ...ianClassifierInitializationImageFilter.hxx | 4 +- .../include/itkScalarImageKmeansImageFilter.h | 4 +- .../itkBayesianClassifierImageFilterTest.cxx | 12 +- .../test/itkImageClassifierFilterTest.cxx | 2 +- .../itkScalarImageKmeansImageFilter3DTest.cxx | 16 +- .../itkScalarImageKmeansImageFilterTest.cxx | 2 +- .../test/itkSupervisedImageClassifierTest.cxx | 2 +- .../itkHardConnectedComponentImageFilter.h | 4 +- .../itkHardConnectedComponentImageFilter.hxx | 30 +- .../itkConnectedComponentImageFilterTest.cxx | 18 +- ...tkConnectedComponentImageFilterTestRGB.cxx | 18 +- ...ComponentImageFilterTooManyObjectsTest.cxx | 2 +- ...kHardConnectedComponentImageFilterTest.cxx | 2 +- ...kMaskConnectedComponentImageFilterTest.cxx | 18 +- .../itkRelabelComponentImageFilterTest.cxx | 4 +- ...calarConnectedComponentImageFilterTest.cxx | 18 +- ...imumConnectedComponentsImageFilterTest.cxx | 4 +- ...ectorConnectedComponentImageFilterTest.cxx | 2 +- .../itkDeformableSimplexMesh3DFilter.h | 2 +- .../test/itkRegionGrow2DTest.cxx | 10 +- .../test/itkBinaryMedianImageFilterTest.cxx | 2 +- ...VotingBinaryHoleFillingImageFilterTest.cxx | 2 +- ...aryIterativeHoleFillingImageFilterTest.cxx | 2 +- ...tkParallelSparseFieldLevelSetImageFilter.h | 2 +- ...ParallelSparseFieldLevelSetImageFilter.hxx | 2 +- .../itkSparseFieldLevelSetImageFilter.h | 2 +- .../itkCollidingFrontsImageFilterTest.cxx | 2 +- .../test/itkCurvesLevelSetImageFilterTest.cxx | 2 +- ...CurvesLevelSetImageFilterZeroSigmaTest.cxx | 2 +- ...icActiveContourLevelSetImageFilterTest.cxx | 2 +- ...ontourLevelSetImageFilterZeroSigmaTest.cxx | 2 +- ...ntourShapePriorLevelSetImageFilterTest.cxx | 2 +- ...ourShapePriorLevelSetImageFilterTest_2.cxx | 2 +- ...arrowBandCurvesLevelSetImageFilterTest.cxx | 2 +- ...kShapeDetectionLevelSetImageFilterTest.cxx | 2 +- ...ePriorSegmentationLevelSetFunctionTest.cxx | 2 +- ...oldSegmentationLevelSetImageFilterTest.cxx | 6 +- ...mageToMalcolmSparseLevelSetAdaptorTest.cxx | 2 +- ...aryImageToShiSparseLevelSetAdaptorTest.cxx | 2 +- ...ageToWhitakerSparseLevelSetAdaptorTest.cxx | 2 +- .../itkLevelSetDomainMapImageFilterTest.cxx | 2 +- ...SetEquationChanAndVeseExternalTermTest.cxx | 4 +- ...SetEquationChanAndVeseInternalTermTest.cxx | 4 +- .../itkLevelSetEquationCurvatureTermTest.cxx | 4 +- .../itkLevelSetEquationLaplacianTermTest.cxx | 4 +- ...itkLevelSetEquationPropagationTermTest.cxx | 4 +- .../itkLevelSetEquationTermContainerTest.cxx | 4 +- ...ltiLevelSetChanAndVeseInternalTermTest.cxx | 2 +- .../test/itkMultiLevelSetEvolutionTest.cxx | 2 +- ...ingleLevelSetDenseAdvectionImage2DTest.cxx | 2 +- .../itkSingleLevelSetDenseImage2DTest.cxx | 2 +- .../itkSingleLevelSetMalcolmImage2DTest.cxx | 2 +- .../test/itkSingleLevelSetShiImage2DTest.cxx | 2 +- .../itkSingleLevelSetWhitakerImage2DTest.cxx | 2 +- ...velSetWhitakerImage2DWithCurvatureTest.cxx | 2 +- ...velSetWhitakerImage2DWithLaplacianTest.cxx | 2 +- ...lSetWhitakerImage2DWithPropagationTest.cxx | 2 +- .../test/itkTwoLevelSetDenseImage2DTest.cxx | 2 +- .../test/itkTwoLevelSetMalcolmImage2DTest.cxx | 2 +- .../test/itkTwoLevelSetShiImage2DTest.cxx | 2 +- .../itkTwoLevelSetWhitakerImage2DTest.cxx | 2 +- .../include/itkImageToRGBVTKImageFilter.hxx | 2 +- .../test/itkImageToRGBVTKImageFilterTest.cxx | 2 +- ...tkVTKVisualize2DDenseImageLevelSetTest.cxx | 2 +- ...VisualizeLevelSetsInteractivePauseTest.cxx | 2 +- .../vtkVisualize2DCellsLevelSetLayersTest.cxx | 2 +- ...vtkVisualize2DCellsLevelSetSurfaceTest.cxx | 2 +- .../test/vtkVisualize2DCellsLevelSetTest.cxx | 2 +- ...tkVisualize2DMalcolmLevelSetLayersTest.cxx | 2 +- .../vtkVisualize2DMalcolmLevelSetTest.cxx | 2 +- .../vtkVisualize2DShiLevelSetLayersTest.cxx | 2 +- ...kVisualize2DWhitakerLevelSetLayersTest.cxx | 2 +- .../vtkVisualize2DWhitakerLevelSetTest.cxx | 2 +- .../include/itkRGBGibbsPriorFilter.h | 4 +- .../include/itkRGBGibbsPriorFilter.hxx | 6 +- .../test/itkGibbsTest.cxx | 12 +- .../test/itkMRFImageFilterTest.cxx | 2 +- .../itkConfidenceConnectedImageFilterTest.cxx | 2 +- .../itkConnectedThresholdImageFilterTest.cxx | 2 +- .../itkIsolatedConnectedImageFilterTest.cxx | 2 +- ...tkNeighborhoodConnectedImageFilterTest.cxx | 2 +- ...ctorConfidenceConnectedImageFilterTest.cxx | 4 +- .../include/itkVoronoiDiagram2DGenerator.h | 2 +- .../include/itkVoronoiDiagram2DGenerator.hxx | 10 +- .../itkVoronoiSegmentationImageFilter.h | 2 +- .../itkVoronoiSegmentationImageFilterBase.h | 12 +- .../itkVoronoiSegmentationImageFilterBase.hxx | 6 +- .../itkVoronoiSegmentationRGBImageFilter.hxx | 4 +- .../itkVoronoiPartitioningImageFilterTest.cxx | 6 +- .../itkVoronoiSegmentationImageFilterTest.cxx | 12 +- ...kVoronoiSegmentationRGBImageFilterTest.cxx | 30 +- .../include/itkWatershedBoundaryResolver.h | 6 +- .../itkIsolatedWatershedImageFilterTest.cxx | 2 +- .../test/itkTobogganImageFilterTest.cxx | 6 +- .../include/itkOpenCVImageBridge.hxx | 8 +- .../itkOpenCVImageBridgeGrayScaleTest.cxx | 18 +- .../test/itkOpenCVImageBridgeRGBTest.cxx | 14 +- .../test/itkOpenCVVideoCaptureTest.cxx | 4 +- .../BridgeVXL/include/vidl_itk_istream.hxx | 8 +- .../BridgeVXL/test/vidl_itk_istreamTest.cxx | 8 +- .../Video/Core/test/itkVideoSourceTest.cxx | 2 +- .../Video/Core/test/itkVideoStreamTest.cxx | 2 +- .../Core/test/itkVideoToVideoFilterTest.cxx | 2 +- .../test/itkDecimateFramesVideoFilterTest.cxx | 2 +- .../test/itkFrameAverageVideoFilterTest.cxx | 2 +- .../itkFrameDifferenceVideoFilterTest.cxx | 4 +- ...itkImageFilterToVideoFilterWrapperTest.cxx | 2 +- .../Video/IO/include/itkVideoFileReader.hxx | 8 +- .../IO/test/itkVideoFileReaderWriterTest.cxx | 2 +- Wrapping/CMakeLists.txt | 16 +- .../Wrapping/Python/Tests/CMakeLists.txt | 2 +- .../ExternalProjects/PyBuffer/itkPyBuffer.hxx | 6 +- Wrapping/Generators/Java/Tests/CMakeLists.txt | 2 +- .../Generators/Python/Tests/CMakeLists.txt | 4 +- Wrapping/Generators/Tcl/Tests/CMakeLists.txt | 2 +- .../Generators/Tcl/itkTkImageViewer2D.cxx | 4 +- Wrapping/Generators/Tcl/itkTkImageViewer2D.h | 4 +- 1023 files changed, 2627 insertions(+), 2732 deletions(-) diff --git a/Examples/DataRepresentation/Image/Image1.cxx b/Examples/DataRepresentation/Image/Image1.cxx index f46c18870f6..663abe9e251 100644 --- a/Examples/DataRepresentation/Image/Image1.cxx +++ b/Examples/DataRepresentation/Image/Image1.cxx @@ -41,12 +41,12 @@ int main(int, char *[]) // Then we must decide with what type to represent the pixels // and what the dimension of the image will be. With these two // parameters we can instantiate the image class. Here we create - // a 3D image with \code{unsigned short} pixel data. + // a 3D image with \code{uint16_t} pixel data. // // Software Guide : EndLatex // // Software Guide : BeginCodeSnippet - typedef itk::Image< unsigned short, 3 > ImageType; + typedef itk::Image< uint16_t, 3 > ImageType; // Software Guide : EndCodeSnippet diff --git a/Examples/DataRepresentation/Image/Image2.cxx b/Examples/DataRepresentation/Image/Image2.cxx index 25d37c677e3..a623108ff71 100644 --- a/Examples/DataRepresentation/Image/Image2.cxx +++ b/Examples/DataRepresentation/Image/Image2.cxx @@ -39,7 +39,7 @@ int main( int , char * argv[]) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Examples/DataRepresentation/Image/Image3.cxx b/Examples/DataRepresentation/Image/Image3.cxx index efb419b3782..e460936e374 100644 --- a/Examples/DataRepresentation/Image/Image3.cxx +++ b/Examples/DataRepresentation/Image/Image3.cxx @@ -36,7 +36,7 @@ int main(int, char *[]) { // First the image type should be declared - typedef itk::Image< unsigned short, 3 > ImageType; + typedef itk::Image< uint16_t, 3 > ImageType; // Then the image object can be created ImageType::Pointer image = ImageType::New(); diff --git a/Examples/DataRepresentation/Image/Image4.cxx b/Examples/DataRepresentation/Image/Image4.cxx index 818d95d539b..e3d75c4be2b 100644 --- a/Examples/DataRepresentation/Image/Image4.cxx +++ b/Examples/DataRepresentation/Image/Image4.cxx @@ -62,7 +62,7 @@ int main(int, char *[]) { - typedef itk::Image< unsigned short, 3 > ImageType; + typedef itk::Image< uint16_t, 3 > ImageType; ImageType::Pointer image = ImageType::New(); diff --git a/Examples/DataRepresentation/Image/Image5.cxx b/Examples/DataRepresentation/Image/Image5.cxx index a4c69992531..57ca85af8f2 100644 --- a/Examples/DataRepresentation/Image/Image5.cxx +++ b/Examples/DataRepresentation/Image/Image5.cxx @@ -65,7 +65,7 @@ int main(int argc, char * argv[]) // Software Guide : EndLatex // // Software Guide : BeginCodeSnippet - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > ImageType; // Software Guide : EndCodeSnippet diff --git a/Examples/DataRepresentation/Image/ImageAdaptor1.cxx b/Examples/DataRepresentation/Image/ImageAdaptor1.cxx index 382231392c8..cf53b422081 100644 --- a/Examples/DataRepresentation/Image/ImageAdaptor1.cxx +++ b/Examples/DataRepresentation/Image/ImageAdaptor1.cxx @@ -20,7 +20,7 @@ // //This example illustrates how the \doxygen{ImageAdaptor} can be used to cast // an image from one pixel type to another. In particular, we will -// \emph{adapt} an \code{unsigned char} image to make it appear as an image of +// \emph{adapt} an \code{uint8_t} image to make it appear as an image of // pixel type \code{float}. // // \index{itk::ImageAdaptor!Instantiation} @@ -48,7 +48,7 @@ // provide methods \code{Set()} and \code{Get()}, and define the types of // \code{InternalPixelType} and \code{ExternalPixelType}. The // \code{InternalPixelType} corresponds to the pixel type of the image to be -// adapted (\code{unsigned char} in this example). The \code{ExternalPixelType} +// adapted (\code{uint8_t} in this example). The \code{ExternalPixelType} // corresponds to the pixel type we wish to emulate with the ImageAdaptor // (\code{float} in this case). // @@ -59,7 +59,7 @@ class CastPixelAccessor { public: - typedef unsigned char InternalType; + typedef uint8_t InternalType; typedef float ExternalType; static void Set(InternalType & output, const ExternalType & input) @@ -102,7 +102,7 @@ int main( int argc, char *argv[] ) // Software Guide : BeginCodeSnippet - typedef unsigned char InputPixelType; + typedef uint8_t InputPixelType; const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > ImageType; diff --git a/Examples/DataRepresentation/Image/ImageAdaptor2.cxx b/Examples/DataRepresentation/Image/ImageAdaptor2.cxx index 3a808433ec8..8e8e458e899 100644 --- a/Examples/DataRepresentation/Image/ImageAdaptor2.cxx +++ b/Examples/DataRepresentation/Image/ImageAdaptor2.cxx @@ -144,7 +144,7 @@ int main( int argc, char *argv[] ) // Software Guide : BeginCodeSnippet - typedef itk::Image< unsigned char, Dimension > OutputImageType; + typedef itk::Image< uint8_t, Dimension > OutputImageType; typedef itk::RescaleIntensityImageFilter< ImageAdaptorType, OutputImageType > RescalerType; diff --git a/Examples/DataRepresentation/Image/ImageAdaptor3.cxx b/Examples/DataRepresentation/Image/ImageAdaptor3.cxx index 3b613da287e..08fa8b60f61 100644 --- a/Examples/DataRepresentation/Image/ImageAdaptor3.cxx +++ b/Examples/DataRepresentation/Image/ImageAdaptor3.cxx @@ -128,7 +128,7 @@ int main( int argc, char *argv[] ) // Software Guide : BeginCodeSnippet - typedef unsigned char InputPixelType; + typedef uint8_t InputPixelType; const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::CovariantVector< float, Dimension > VectorPixelType; @@ -205,7 +205,7 @@ int main( int argc, char *argv[] ) // Software Guide : EndCodeSnippet - typedef itk::Image< unsigned char, Dimension > OutputImageType; + typedef itk::Image< uint8_t, Dimension > OutputImageType; typedef itk::RescaleIntensityImageFilter< ImageAdaptorType, OutputImageType> RescalerType; RescalerType::Pointer rescaler = RescalerType::New(); diff --git a/Examples/DataRepresentation/Image/ImageAdaptor4.cxx b/Examples/DataRepresentation/Image/ImageAdaptor4.cxx index 41e8fe7dbec..5ea167d8dbc 100644 --- a/Examples/DataRepresentation/Image/ImageAdaptor4.cxx +++ b/Examples/DataRepresentation/Image/ImageAdaptor4.cxx @@ -61,8 +61,8 @@ class ThresholdingPixelAccessor { public: - typedef unsigned char InternalType; - typedef unsigned char ExternalType; + typedef uint8_t InternalType; + typedef uint8_t ExternalType; ThresholdingPixelAccessor() : m_Threshold(0) {}; diff --git a/Examples/DataRepresentation/Image/RGBImage.cxx b/Examples/DataRepresentation/Image/RGBImage.cxx index 784d86b0300..d6ba4f8f5e3 100644 --- a/Examples/DataRepresentation/Image/RGBImage.cxx +++ b/Examples/DataRepresentation/Image/RGBImage.cxx @@ -56,7 +56,7 @@ int main( int , char * argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef itk::RGBPixel< unsigned char > PixelType; + typedef itk::RGBPixel< uint8_t > PixelType; // Software Guide : EndCodeSnippet diff --git a/Examples/DataRepresentation/Mesh/ImageToPointSet.cxx b/Examples/DataRepresentation/Mesh/ImageToPointSet.cxx index baaaf533b4d..f60f237c765 100644 --- a/Examples/DataRepresentation/Mesh/ImageToPointSet.cxx +++ b/Examples/DataRepresentation/Mesh/ImageToPointSet.cxx @@ -43,7 +43,7 @@ int main( int argc, char * argv[] ) } - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 2; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Examples/DataRepresentation/Mesh/PointSet1.cxx b/Examples/DataRepresentation/Mesh/PointSet1.cxx index 8cc6dd1bc46..0f6369d7fc1 100644 --- a/Examples/DataRepresentation/Mesh/PointSet1.cxx +++ b/Examples/DataRepresentation/Mesh/PointSet1.cxx @@ -62,7 +62,7 @@ int main(int, char *[]) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef itk::PointSet< unsigned short, 3 > PointSetType; + typedef itk::PointSet< uint16_t, 3 > PointSetType; // Software Guide : EndCodeSnippet diff --git a/Examples/DataRepresentation/Mesh/PointSet2.cxx b/Examples/DataRepresentation/Mesh/PointSet2.cxx index a774e8cd48a..926bfd4520a 100644 --- a/Examples/DataRepresentation/Mesh/PointSet2.cxx +++ b/Examples/DataRepresentation/Mesh/PointSet2.cxx @@ -31,7 +31,7 @@ int main(int, char *[]) { - typedef itk::PointSet< unsigned short, 3 > PointSetType; + typedef itk::PointSet< uint16_t, 3 > PointSetType; // Software Guide : BeginLatex // diff --git a/Examples/DataRepresentation/Mesh/PointSet3.cxx b/Examples/DataRepresentation/Mesh/PointSet3.cxx index ebb0f826098..06bb147a627 100644 --- a/Examples/DataRepresentation/Mesh/PointSet3.cxx +++ b/Examples/DataRepresentation/Mesh/PointSet3.cxx @@ -44,7 +44,7 @@ int main(int, char *[]) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::PointSet< PixelType, 3 > PointSetType; // Software Guide : EndCodeSnippet diff --git a/Examples/DataRepresentation/Path/PolyLineParametricPath1.cxx b/Examples/DataRepresentation/Path/PolyLineParametricPath1.cxx index 6815df37083..f5767874147 100644 --- a/Examples/DataRepresentation/Path/PolyLineParametricPath1.cxx +++ b/Examples/DataRepresentation/Path/PolyLineParametricPath1.cxx @@ -55,7 +55,7 @@ int main(int argc, char * argv [] ) // Software Guide : BeginCodeSnippet const unsigned int Dimension = 2; - typedef itk::Image< unsigned char, Dimension > ImageType; + typedef itk::Image< uint8_t, Dimension > ImageType; typedef itk::PolyLineParametricPath< Dimension > PathType; // Software Guide : EndCodeSnippet diff --git a/Examples/Filtering/AntiAliasBinaryImageFilter.cxx b/Examples/Filtering/AntiAliasBinaryImageFilter.cxx index c8031bae563..8317fd2d768 100644 --- a/Examples/Filtering/AntiAliasBinaryImageFilter.cxx +++ b/Examples/Filtering/AntiAliasBinaryImageFilter.cxx @@ -77,7 +77,7 @@ int main(int argc, char* argv[]) } - typedef unsigned char CharPixelType; // IO + typedef uint8_t CharPixelType; // IO typedef double RealPixelType; // Operations const unsigned int Dimension = 3; diff --git a/Examples/Filtering/BilateralImageFilter.cxx b/Examples/Filtering/BilateralImageFilter.cxx index 256de26d808..f6ffd7cdc12 100644 --- a/Examples/Filtering/BilateralImageFilter.cxx +++ b/Examples/Filtering/BilateralImageFilter.cxx @@ -116,8 +116,8 @@ int main( int argc, char * argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; @@ -216,7 +216,7 @@ int main( int argc, char * argv[] ) // // Software Guide : EndLatex - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; typedef itk::RescaleIntensityImageFilter< OutputImageType, WriteImageType > RescaleFilterType; diff --git a/Examples/Filtering/BinaryMedianImageFilter.cxx b/Examples/Filtering/BinaryMedianImageFilter.cxx index 3bdbef21997..bddde16a83a 100644 --- a/Examples/Filtering/BinaryMedianImageFilter.cxx +++ b/Examples/Filtering/BinaryMedianImageFilter.cxx @@ -80,8 +80,8 @@ int main( int argc, char * argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Examples/Filtering/BinaryMinMaxCurvatureFlowImageFilter.cxx b/Examples/Filtering/BinaryMinMaxCurvatureFlowImageFilter.cxx index 82113601ae2..5db4a3a784b 100644 --- a/Examples/Filtering/BinaryMinMaxCurvatureFlowImageFilter.cxx +++ b/Examples/Filtering/BinaryMinMaxCurvatureFlowImageFilter.cxx @@ -194,7 +194,7 @@ int main( int argc, char * argv[] ) // // Software Guide : EndLatex - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; diff --git a/Examples/Filtering/BinaryThresholdImageFilter.cxx b/Examples/Filtering/BinaryThresholdImageFilter.cxx index 508a71ca669..97e32510736 100644 --- a/Examples/Filtering/BinaryThresholdImageFilter.cxx +++ b/Examples/Filtering/BinaryThresholdImageFilter.cxx @@ -79,8 +79,8 @@ int main( int argc, char * argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; // Software Guide : EndCodeSnippet diff --git a/Examples/Filtering/BinomialBlurImageFilter.cxx b/Examples/Filtering/BinomialBlurImageFilter.cxx index 4590735c079..aa030aaa5b1 100644 --- a/Examples/Filtering/BinomialBlurImageFilter.cxx +++ b/Examples/Filtering/BinomialBlurImageFilter.cxx @@ -127,7 +127,7 @@ int main( int argc, char * argv[] ) // This section connects the filter output to a writer // - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; typedef itk::RescaleIntensityImageFilter< OutputImageType, WriteImageType > RescaleFilterType; diff --git a/Examples/Filtering/CannyEdgeDetectionImageFilter.cxx b/Examples/Filtering/CannyEdgeDetectionImageFilter.cxx index 8b9ae5db06d..31098a1b203 100644 --- a/Examples/Filtering/CannyEdgeDetectionImageFilter.cxx +++ b/Examples/Filtering/CannyEdgeDetectionImageFilter.cxx @@ -82,7 +82,7 @@ int main(int argc, char* argv[]) std::cout << "UpperThreshold = " << upperThreshold << std::endl; std::cout << "LowerThreshold = " << lowerThreshold << std::endl; - typedef unsigned char CharPixelType; // IO + typedef uint8_t CharPixelType; // IO typedef double RealPixelType; // Operations const unsigned int Dimension = 2; diff --git a/Examples/Filtering/CastingImageFilters.cxx b/Examples/Filtering/CastingImageFilters.cxx index feaf4cfb632..69c61b1db66 100644 --- a/Examples/Filtering/CastingImageFilters.cxx +++ b/Examples/Filtering/CastingImageFilters.cxx @@ -112,7 +112,7 @@ int main( int argc, char * argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char InputPixelType; + typedef uint8_t InputPixelType; typedef float OutputPixelType; // Software Guide : EndCodeSnippet diff --git a/Examples/Filtering/CurvatureAnisotropicDiffusionImageFilter.cxx b/Examples/Filtering/CurvatureAnisotropicDiffusionImageFilter.cxx index f7cc793487c..a329d81a8f0 100644 --- a/Examples/Filtering/CurvatureAnisotropicDiffusionImageFilter.cxx +++ b/Examples/Filtering/CurvatureAnisotropicDiffusionImageFilter.cxx @@ -195,7 +195,7 @@ int main( int argc, char * argv[] ) // after the curvature flow filter. // - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; typedef itk::RescaleIntensityImageFilter< OutputImageType, WriteImageType > RescaleFilterType; diff --git a/Examples/Filtering/CurvatureFlowImageFilter.cxx b/Examples/Filtering/CurvatureFlowImageFilter.cxx index 42905900fa9..929e7157c55 100644 --- a/Examples/Filtering/CurvatureFlowImageFilter.cxx +++ b/Examples/Filtering/CurvatureFlowImageFilter.cxx @@ -201,7 +201,7 @@ int main( int argc, char * argv[] ) // // Software Guide : EndLatex - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; diff --git a/Examples/Filtering/DanielssonDistanceMapImageFilter.cxx b/Examples/Filtering/DanielssonDistanceMapImageFilter.cxx index 9720e71d5b1..fcc5207fdf8 100644 --- a/Examples/Filtering/DanielssonDistanceMapImageFilter.cxx +++ b/Examples/Filtering/DanielssonDistanceMapImageFilter.cxx @@ -76,8 +76,8 @@ int main( int argc, char * argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char InputPixelType; - typedef unsigned short OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint16_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; // Software Guide : EndCodeSnippet diff --git a/Examples/Filtering/DerivativeImageFilter.cxx b/Examples/Filtering/DerivativeImageFilter.cxx index b6b1d4d6819..f5fb0267839 100644 --- a/Examples/Filtering/DerivativeImageFilter.cxx +++ b/Examples/Filtering/DerivativeImageFilter.cxx @@ -168,7 +168,7 @@ int main( int argc, char * argv[] ) // Software Guide : EndLatex - typedef itk::Image< unsigned char, Dimension > WriteImageType; + typedef itk::Image< uint8_t, Dimension > WriteImageType; typedef itk::RescaleIntensityImageFilter< OutputImageType, diff --git a/Examples/Filtering/DiffusionTensor3DReconstructionImageFilter.cxx b/Examples/Filtering/DiffusionTensor3DReconstructionImageFilter.cxx index 0ca4ad8c8fc..24e4aa7893f 100644 --- a/Examples/Filtering/DiffusionTensor3DReconstructionImageFilter.cxx +++ b/Examples/Filtering/DiffusionTensor3DReconstructionImageFilter.cxx @@ -78,8 +78,8 @@ int main( int argc, char *argv[] ) bool readb0 = false; double b0 = 0; - typedef unsigned short PixelType; - typedef itk::VectorImage ImageType; + typedef uint16_t PixelType; + typedef itk::VectorImage ImageType; itk::ImageFileReader::Pointer reader = itk::ImageFileReader::New(); diff --git a/Examples/Filtering/DigitallyReconstructedRadiograph1.cxx b/Examples/Filtering/DigitallyReconstructedRadiograph1.cxx index 17615cf905f..a3218242eea 100644 --- a/Examples/Filtering/DigitallyReconstructedRadiograph1.cxx +++ b/Examples/Filtering/DigitallyReconstructedRadiograph1.cxx @@ -264,7 +264,7 @@ int main( int argc, char *argv[] ) // Software Guide : BeginCodeSnippet const unsigned int Dimension = 3; typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Filtering/DiscreteGaussianImageFilter.cxx b/Examples/Filtering/DiscreteGaussianImageFilter.cxx index 03a95f7e3c0..ba216a24c32 100644 --- a/Examples/Filtering/DiscreteGaussianImageFilter.cxx +++ b/Examples/Filtering/DiscreteGaussianImageFilter.cxx @@ -184,7 +184,7 @@ int main( int argc, char * argv[] ) // // Software Guide : EndLatex - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; typedef itk::RescaleIntensityImageFilter< OutputImageType, WriteImageType > RescaleFilterType; diff --git a/Examples/Filtering/FFTDirectInverse.cxx b/Examples/Filtering/FFTDirectInverse.cxx index b26ff8dade0..3ed65eedbf8 100644 --- a/Examples/Filtering/FFTDirectInverse.cxx +++ b/Examples/Filtering/FFTDirectInverse.cxx @@ -54,7 +54,7 @@ int main( int argc, char * argv[] ) // Software Guide : BeginCodeSnippet const unsigned int Dimension = 2; - typedef unsigned short IOPixelType; + typedef uint16_t IOPixelType; typedef float WorkPixelType; typedef itk::Image< IOPixelType, Dimension > IOImageType; diff --git a/Examples/Filtering/FFTDirectInverse2.cxx b/Examples/Filtering/FFTDirectInverse2.cxx index 5e20b7234c4..b657a39a40a 100644 --- a/Examples/Filtering/FFTDirectInverse2.cxx +++ b/Examples/Filtering/FFTDirectInverse2.cxx @@ -63,8 +63,8 @@ int main( int argc, char * argv[] ) // Software Guide : BeginCodeSnippet const unsigned int Dimension = 2; - // typedef unsigned char OutputPixelType; - typedef unsigned short OutputPixelType; + // typedef uint8_t OutputPixelType; + typedef uint16_t OutputPixelType; typedef float WorkPixelType; typedef itk::Image< WorkPixelType, Dimension > InputImageType; diff --git a/Examples/Filtering/FFTImageFilter.cxx b/Examples/Filtering/FFTImageFilter.cxx index 8e1bcf0a5eb..38543724fa0 100644 --- a/Examples/Filtering/FFTImageFilter.cxx +++ b/Examples/Filtering/FFTImageFilter.cxx @@ -205,7 +205,7 @@ int main( int argc, char * argv [] ) // Software Guide : EndCodeSnippet - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, Dimension > WriteImageType; diff --git a/Examples/Filtering/FFTImageFilterFourierDomainFiltering.cxx b/Examples/Filtering/FFTImageFilterFourierDomainFiltering.cxx index 81b8535e280..e7451a42a6d 100644 --- a/Examples/Filtering/FFTImageFilterFourierDomainFiltering.cxx +++ b/Examples/Filtering/FFTImageFilterFourierDomainFiltering.cxx @@ -90,7 +90,7 @@ int main( int argc, char * argv [] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char MaskPixelType; + typedef uint8_t MaskPixelType; typedef itk::Image< MaskPixelType, Dimension > MaskImageType; // Software Guide : EndCodeSnippet diff --git a/Examples/Filtering/FlipImageFilter.cxx b/Examples/Filtering/FlipImageFilter.cxx index 13c5d38dc9c..4854f2b7900 100644 --- a/Examples/Filtering/FlipImageFilter.cxx +++ b/Examples/Filtering/FlipImageFilter.cxx @@ -78,7 +78,7 @@ int main( int argc, char * argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, 2 > ImageType; // Software Guide : EndCodeSnippet diff --git a/Examples/Filtering/GradientAnisotropicDiffusionImageFilter.cxx b/Examples/Filtering/GradientAnisotropicDiffusionImageFilter.cxx index b47eccd67f2..f4bf02c0ba0 100644 --- a/Examples/Filtering/GradientAnisotropicDiffusionImageFilter.cxx +++ b/Examples/Filtering/GradientAnisotropicDiffusionImageFilter.cxx @@ -174,7 +174,7 @@ int main( int argc, char * argv[] ) // // The output of the filter is rescaled here and then sent to a writer. // - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; typedef itk::RescaleIntensityImageFilter< OutputImageType, WriteImageType > RescaleFilterType; diff --git a/Examples/Filtering/GradientMagnitudeImageFilter.cxx b/Examples/Filtering/GradientMagnitudeImageFilter.cxx index 7ec6f365128..bfff1ea9898 100644 --- a/Examples/Filtering/GradientMagnitudeImageFilter.cxx +++ b/Examples/Filtering/GradientMagnitudeImageFilter.cxx @@ -175,7 +175,7 @@ int main( int argc, char * argv[] ) // // Software Guide : EndLatex - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; typedef itk::RescaleIntensityImageFilter< OutputImageType, WriteImageType > RescaleFilterType; diff --git a/Examples/Filtering/GradientMagnitudeRecursiveGaussianImageFilter.cxx b/Examples/Filtering/GradientMagnitudeRecursiveGaussianImageFilter.cxx index af22618452d..882c508ac98 100644 --- a/Examples/Filtering/GradientMagnitudeRecursiveGaussianImageFilter.cxx +++ b/Examples/Filtering/GradientMagnitudeRecursiveGaussianImageFilter.cxx @@ -201,7 +201,7 @@ int main( int argc, char * argv[] ) // Software Guide : EndLatex - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; typedef itk::RescaleIntensityImageFilter< diff --git a/Examples/Filtering/GrayscaleFunctionDilateImageFilter.cxx b/Examples/Filtering/GrayscaleFunctionDilateImageFilter.cxx index 97be89dcea5..5a315298155 100644 --- a/Examples/Filtering/GrayscaleFunctionDilateImageFilter.cxx +++ b/Examples/Filtering/GrayscaleFunctionDilateImageFilter.cxx @@ -32,7 +32,7 @@ int main(int argc, char *argv[] ) } const unsigned int Dimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension> ImageType; diff --git a/Examples/Filtering/LaplacianImageFilter.cxx b/Examples/Filtering/LaplacianImageFilter.cxx index 7a03a5c276a..f709972eb58 100644 --- a/Examples/Filtering/LaplacianImageFilter.cxx +++ b/Examples/Filtering/LaplacianImageFilter.cxx @@ -35,7 +35,7 @@ int main(int argc, char* argv[]) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef unsigned char CharPixelType; //IO + typedef uint8_t CharPixelType; //IO typedef double RealPixelType; //Operations const unsigned int Dimension = 2; diff --git a/Examples/Filtering/LaplacianRecursiveGaussianImageFilter1.cxx b/Examples/Filtering/LaplacianRecursiveGaussianImageFilter1.cxx index 542b26fb588..ec1b43fe02e 100644 --- a/Examples/Filtering/LaplacianRecursiveGaussianImageFilter1.cxx +++ b/Examples/Filtering/LaplacianRecursiveGaussianImageFilter1.cxx @@ -362,7 +362,7 @@ int main( int argc, char * argv[] ) // if (argc > 4) { - typedef unsigned char CharPixelType; + typedef uint8_t CharPixelType; typedef itk::Image CharImageType; typedef itk::RescaleIntensityImageFilter< OutputImageType, CharImageType> diff --git a/Examples/Filtering/LaplacianRecursiveGaussianImageFilter2.cxx b/Examples/Filtering/LaplacianRecursiveGaussianImageFilter2.cxx index 494f1541385..6d3b409e512 100644 --- a/Examples/Filtering/LaplacianRecursiveGaussianImageFilter2.cxx +++ b/Examples/Filtering/LaplacianRecursiveGaussianImageFilter2.cxx @@ -223,7 +223,7 @@ int main( int argc, char * argv[] ) // if (argc > 4) { - typedef unsigned char CharPixelType; + typedef uint8_t CharPixelType; typedef itk::Image CharImageType; typedef itk::RescaleIntensityImageFilter< OutputImageType, CharImageType> diff --git a/Examples/Filtering/LaplacianSharpeningImageFilter.cxx b/Examples/Filtering/LaplacianSharpeningImageFilter.cxx index 2b9fd31ddb6..15a8e3d727d 100644 --- a/Examples/Filtering/LaplacianSharpeningImageFilter.cxx +++ b/Examples/Filtering/LaplacianSharpeningImageFilter.cxx @@ -33,7 +33,7 @@ int main(int argc, char* argv[]) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef unsigned char CharPixelType; + typedef uint8_t CharPixelType; const unsigned int Dimension = 2; typedef itk::Image CharImageType; @@ -63,7 +63,7 @@ int main(int argc, char* argv[]) //Sharpen with the laplacian lapFilter->SetInput( reader->GetOutput() ); - // Rescale and cast to unsigned char + // Rescale and cast to uint8_t rescale->SetInput( lapFilter->GetOutput() ); writer->SetInput( rescale->GetOutput() ); diff --git a/Examples/Filtering/MathematicalMorphologyBinaryFilters.cxx b/Examples/Filtering/MathematicalMorphologyBinaryFilters.cxx index 6a58a98caf0..96049168cf5 100644 --- a/Examples/Filtering/MathematicalMorphologyBinaryFilters.cxx +++ b/Examples/Filtering/MathematicalMorphologyBinaryFilters.cxx @@ -73,8 +73,8 @@ int main( int argc, char * argv[] ) // Software Guide : BeginCodeSnippet const unsigned int Dimension = 2; - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Filtering/MathematicalMorphologyGrayscaleFilters.cxx b/Examples/Filtering/MathematicalMorphologyGrayscaleFilters.cxx index 17945f0e169..fb6b7c01000 100644 --- a/Examples/Filtering/MathematicalMorphologyGrayscaleFilters.cxx +++ b/Examples/Filtering/MathematicalMorphologyGrayscaleFilters.cxx @@ -71,8 +71,8 @@ int main( int argc, char * argv[] ) // Software Guide : BeginCodeSnippet const unsigned int Dimension = 2; - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Filtering/MeanImageFilter.cxx b/Examples/Filtering/MeanImageFilter.cxx index 5d5251c5760..87849d98075 100644 --- a/Examples/Filtering/MeanImageFilter.cxx +++ b/Examples/Filtering/MeanImageFilter.cxx @@ -96,8 +96,8 @@ int main( int argc, char * argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Examples/Filtering/MedianImageFilter.cxx b/Examples/Filtering/MedianImageFilter.cxx index 5c25abd82dc..6799da41899 100644 --- a/Examples/Filtering/MedianImageFilter.cxx +++ b/Examples/Filtering/MedianImageFilter.cxx @@ -96,8 +96,8 @@ int main( int argc, char * argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Examples/Filtering/MinMaxCurvatureFlowImageFilter.cxx b/Examples/Filtering/MinMaxCurvatureFlowImageFilter.cxx index 7aa228ed32e..3fb12b58835 100644 --- a/Examples/Filtering/MinMaxCurvatureFlowImageFilter.cxx +++ b/Examples/Filtering/MinMaxCurvatureFlowImageFilter.cxx @@ -214,7 +214,7 @@ int main( int argc, char * argv[] ) // // Software Guide : EndLatex - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; typedef itk::RescaleIntensityImageFilter< OutputImageType, WriteImageType > RescaleFilterType; diff --git a/Examples/Filtering/MorphologicalImageEnhancement.cxx b/Examples/Filtering/MorphologicalImageEnhancement.cxx index 4183c34c71c..4231cf83cd5 100644 --- a/Examples/Filtering/MorphologicalImageEnhancement.cxx +++ b/Examples/Filtering/MorphologicalImageEnhancement.cxx @@ -63,8 +63,8 @@ int main( int argc, char * argv[] ) // const unsigned int Dimension = 2; - typedef unsigned char PixelType; - typedef unsigned char WritePixelType; + typedef uint8_t PixelType; + typedef uint8_t WritePixelType; typedef itk::Image< PixelType, Dimension > ImageType; typedef itk::Image< WritePixelType, Dimension > WriteImageType; diff --git a/Examples/Filtering/OtsuMultipleThresholdImageFilter.cxx b/Examples/Filtering/OtsuMultipleThresholdImageFilter.cxx index a7521525ff5..90730ef2e92 100644 --- a/Examples/Filtering/OtsuMultipleThresholdImageFilter.cxx +++ b/Examples/Filtering/OtsuMultipleThresholdImageFilter.cxx @@ -48,8 +48,8 @@ int main( int argc, char * argv[] ) } //Convenience typedefs - typedef unsigned short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint16_t InputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Examples/Filtering/OtsuThresholdImageFilter.cxx b/Examples/Filtering/OtsuThresholdImageFilter.cxx index b9b3ef3780a..ed495bd9488 100644 --- a/Examples/Filtering/OtsuThresholdImageFilter.cxx +++ b/Examples/Filtering/OtsuThresholdImageFilter.cxx @@ -54,8 +54,8 @@ int main( int argc, char * argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; // Software Guide : EndCodeSnippet diff --git a/Examples/Filtering/RGBCurvatureAnisotropicDiffusionImageFilter.cxx b/Examples/Filtering/RGBCurvatureAnisotropicDiffusionImageFilter.cxx index 9a1b474a7d2..6e7689dd7bb 100644 --- a/Examples/Filtering/RGBCurvatureAnisotropicDiffusionImageFilter.cxx +++ b/Examples/Filtering/RGBCurvatureAnisotropicDiffusionImageFilter.cxx @@ -64,7 +64,7 @@ // // It is desirable to perform the computation on the RGB image using // \code{float} representation. However for input and output purposes -// \code{unsigned char} RGB components are commonly used. It is necessary to +// \code{uint8_t} RGB components are commonly used. It is necessary to // cast the type of color components in the pipeline before writing them to // a file. The \doxygen{VectorCastImageFilter} is used to achieve this goal. // @@ -163,7 +163,7 @@ int main( int argc, char * argv[] ) // Software Guide : BeginLatex // - // The filter output is now cast to \code{unsigned char} RGB components by + // The filter output is now cast to \code{uint8_t} RGB components by // using the VectorCastImageFilter // // \index{itk::VectorCastImageFilter!instantiation} @@ -173,7 +173,7 @@ int main( int argc, char * argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef itk::RGBPixel< unsigned char > WritePixelType; + typedef itk::RGBPixel< uint8_t > WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; typedef itk::VectorCastImageFilter< InputImageType, WriteImageType > CasterType; diff --git a/Examples/Filtering/RGBGradientAnisotropicDiffusionImageFilter.cxx b/Examples/Filtering/RGBGradientAnisotropicDiffusionImageFilter.cxx index c7e3e6d518e..1678dc9db5c 100644 --- a/Examples/Filtering/RGBGradientAnisotropicDiffusionImageFilter.cxx +++ b/Examples/Filtering/RGBGradientAnisotropicDiffusionImageFilter.cxx @@ -64,7 +64,7 @@ // // It is desirable to perform the computation on the RGB image using // \code{float} representation. However for input and output purposes -// \code{unsigned char} RGB components are commonly used. It is necessary to +// \code{uint8_t} RGB components are commonly used. It is necessary to // cast the type of color components along the pipeline before writing them // to a file. The \doxygen{VectorCastImageFilter} is used to achieve this // goal. @@ -163,7 +163,7 @@ int main( int argc, char * argv[] ) // Software Guide : BeginLatex // - // The filter output is now cast to \code{unsigned char} RGB components by + // The filter output is now cast to \code{uint8_t} RGB components by // using the \doxygen{VectorCastImageFilter}. // // \index{itk::VectorCastImageFilter!instantiation} @@ -173,7 +173,7 @@ int main( int argc, char * argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef itk::RGBPixel< unsigned char > WritePixelType; + typedef itk::RGBPixel< uint8_t > WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; typedef itk::VectorCastImageFilter< InputImageType, WriteImageType > CasterType; diff --git a/Examples/Filtering/RGBToGrayscale.cxx b/Examples/Filtering/RGBToGrayscale.cxx index 6420508a43b..fca0474d7ff 100644 --- a/Examples/Filtering/RGBToGrayscale.cxx +++ b/Examples/Filtering/RGBToGrayscale.cxx @@ -56,9 +56,9 @@ int main( int argc, char * argv[] ) const unsigned int Dimension = 2; - typedef itk::RGBPixel< unsigned char > InputPixelType; + typedef itk::RGBPixel< uint8_t > InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; - typedef itk::Image< unsigned char, Dimension > OutputImageType; + typedef itk::Image< uint8_t, Dimension > OutputImageType; typedef itk::ImageFileReader< InputImageType > ReaderType; diff --git a/Examples/Filtering/ResampleImageFilter.cxx b/Examples/Filtering/ResampleImageFilter.cxx index 9fe1413c185..c8792547d15 100644 --- a/Examples/Filtering/ResampleImageFilter.cxx +++ b/Examples/Filtering/ResampleImageFilter.cxx @@ -119,8 +119,8 @@ int main( int argc, char * argv[] ) // Software Guide : BeginCodeSnippet const unsigned int Dimension = 2; - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; // Software Guide : EndCodeSnippet diff --git a/Examples/Filtering/ResampleImageFilter2.cxx b/Examples/Filtering/ResampleImageFilter2.cxx index 116e704bb0d..e1c4c0caa42 100644 --- a/Examples/Filtering/ResampleImageFilter2.cxx +++ b/Examples/Filtering/ResampleImageFilter2.cxx @@ -75,8 +75,8 @@ int main( int argc, char * argv[] ) } const unsigned int Dimension = 2; - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Filtering/ResampleImageFilter3.cxx b/Examples/Filtering/ResampleImageFilter3.cxx index 98c4dd31fbf..a2fd990375b 100644 --- a/Examples/Filtering/ResampleImageFilter3.cxx +++ b/Examples/Filtering/ResampleImageFilter3.cxx @@ -100,8 +100,8 @@ int main( int argc, char * argv[] ) } const unsigned int Dimension = 2; - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Filtering/ResampleImageFilter4.cxx b/Examples/Filtering/ResampleImageFilter4.cxx index 3ec34516342..5dba0a1c20c 100644 --- a/Examples/Filtering/ResampleImageFilter4.cxx +++ b/Examples/Filtering/ResampleImageFilter4.cxx @@ -59,8 +59,8 @@ int main( int argc, char * argv[] ) } const unsigned int Dimension = 2; - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Filtering/ResampleImageFilter5.cxx b/Examples/Filtering/ResampleImageFilter5.cxx index 46ab57c702f..2bbc9ffcc5b 100644 --- a/Examples/Filtering/ResampleImageFilter5.cxx +++ b/Examples/Filtering/ResampleImageFilter5.cxx @@ -56,8 +56,8 @@ int main( int argc, char * argv[] ) } const unsigned int Dimension = 2; - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Filtering/ResampleImageFilter6.cxx b/Examples/Filtering/ResampleImageFilter6.cxx index 11ef750a6ac..9a7f79eda5f 100644 --- a/Examples/Filtering/ResampleImageFilter6.cxx +++ b/Examples/Filtering/ResampleImageFilter6.cxx @@ -44,7 +44,7 @@ int main( int argc, char * argv[] ) } const unsigned int Dimension = 2; - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; typedef itk::RGBPixel< PixelComponentType > PixelType; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Examples/Filtering/ResampleImageFilter7.cxx b/Examples/Filtering/ResampleImageFilter7.cxx index 20bb4ef670f..53c2bd9aaa8 100644 --- a/Examples/Filtering/ResampleImageFilter7.cxx +++ b/Examples/Filtering/ResampleImageFilter7.cxx @@ -55,8 +55,8 @@ int main( int argc, char * argv[] ) } const unsigned int Dimension = 2; - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Filtering/ResampleImageFilter8.cxx b/Examples/Filtering/ResampleImageFilter8.cxx index c7438e19666..ceb99db4d43 100644 --- a/Examples/Filtering/ResampleImageFilter8.cxx +++ b/Examples/Filtering/ResampleImageFilter8.cxx @@ -62,8 +62,8 @@ int main( int argc, char * argv[] ) } const unsigned int Dimension = 2; - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Filtering/ResampleImageFilter9.cxx b/Examples/Filtering/ResampleImageFilter9.cxx index 6fd4dea2ee5..d054fa73a5a 100644 --- a/Examples/Filtering/ResampleImageFilter9.cxx +++ b/Examples/Filtering/ResampleImageFilter9.cxx @@ -53,7 +53,7 @@ int main( int argc, char * argv[] ) } const unsigned int Dimension = 2; - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; typedef itk::RGBPixel< PixelComponentType > PixelType; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Examples/Filtering/ResampleOrientedImageFilter.cxx b/Examples/Filtering/ResampleOrientedImageFilter.cxx index fecd345d31f..8e7ae6bc521 100644 --- a/Examples/Filtering/ResampleOrientedImageFilter.cxx +++ b/Examples/Filtering/ResampleOrientedImageFilter.cxx @@ -34,8 +34,8 @@ int main( int argc, char * argv[] ) } const unsigned int Dimension = 2; - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Filtering/ResampleVolumesToBeIsotropic.cxx b/Examples/Filtering/ResampleVolumesToBeIsotropic.cxx index 923e8dbdd1a..e4a6ef85ec2 100644 --- a/Examples/Filtering/ResampleVolumesToBeIsotropic.cxx +++ b/Examples/Filtering/ResampleVolumesToBeIsotropic.cxx @@ -184,7 +184,7 @@ int main( int argc, char * argv[] ) // Software Guide : BeginCodeSnippet const unsigned int Dimension = 3; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef float InternalPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; @@ -333,7 +333,7 @@ int main( int argc, char * argv[] ) // Software Guide : BeginCodeSnippet - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Filtering/SigmoidImageFilter.cxx b/Examples/Filtering/SigmoidImageFilter.cxx index 7bbdd243e59..2b28f083b36 100644 --- a/Examples/Filtering/SigmoidImageFilter.cxx +++ b/Examples/Filtering/SigmoidImageFilter.cxx @@ -100,8 +100,8 @@ int main( int argc, char * argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Examples/Filtering/SignedDanielssonDistanceMapImageFilter.cxx b/Examples/Filtering/SignedDanielssonDistanceMapImageFilter.cxx index 900e261b5ab..a1e457834f5 100644 --- a/Examples/Filtering/SignedDanielssonDistanceMapImageFilter.cxx +++ b/Examples/Filtering/SignedDanielssonDistanceMapImageFilter.cxx @@ -64,9 +64,9 @@ int main( int argc, char * argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char InputPixelType; + typedef uint8_t InputPixelType; typedef float OutputPixelType; - typedef unsigned short VoronoiPixelType; + typedef uint16_t VoronoiPixelType; const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; diff --git a/Examples/Filtering/SmoothingRecursiveGaussianImageFilter.cxx b/Examples/Filtering/SmoothingRecursiveGaussianImageFilter.cxx index 40ac2b15ca2..07133dda912 100644 --- a/Examples/Filtering/SmoothingRecursiveGaussianImageFilter.cxx +++ b/Examples/Filtering/SmoothingRecursiveGaussianImageFilter.cxx @@ -268,7 +268,7 @@ int main( int argc, char * argv[] ) // Software Guide : EndCodeSnippet - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; typedef itk::RescaleIntensityImageFilter< OutputImageType, WriteImageType > RescaleFilterType; diff --git a/Examples/Filtering/SmoothingRecursiveGaussianImageFilter2.cxx b/Examples/Filtering/SmoothingRecursiveGaussianImageFilter2.cxx index cbbf929663b..e65e550ddec 100644 --- a/Examples/Filtering/SmoothingRecursiveGaussianImageFilter2.cxx +++ b/Examples/Filtering/SmoothingRecursiveGaussianImageFilter2.cxx @@ -181,7 +181,7 @@ int main( int argc, char * argv[] ) // Software Guide : EndCodeSnippet - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; typedef itk::RescaleIntensityImageFilter< diff --git a/Examples/Filtering/SpatialObjectToImage1.cxx b/Examples/Filtering/SpatialObjectToImage1.cxx index 0ccd0590206..690c002b1b5 100644 --- a/Examples/Filtering/SpatialObjectToImage1.cxx +++ b/Examples/Filtering/SpatialObjectToImage1.cxx @@ -96,7 +96,7 @@ int main( int argc, char *argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef signed short PixelType; + typedef int16_t PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Examples/Filtering/SpatialObjectToImage2.cxx b/Examples/Filtering/SpatialObjectToImage2.cxx index a48ca39e321..485130c2f8f 100644 --- a/Examples/Filtering/SpatialObjectToImage2.cxx +++ b/Examples/Filtering/SpatialObjectToImage2.cxx @@ -94,7 +94,7 @@ int main( int argc, char *argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef signed short PixelType; + typedef int16_t PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Examples/Filtering/SpatialObjectToImage3.cxx b/Examples/Filtering/SpatialObjectToImage3.cxx index 5da0ff2dfce..59b5ef735ae 100644 --- a/Examples/Filtering/SpatialObjectToImage3.cxx +++ b/Examples/Filtering/SpatialObjectToImage3.cxx @@ -61,7 +61,7 @@ int main( int argc, char *argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Examples/Filtering/SubsampleVolume.cxx b/Examples/Filtering/SubsampleVolume.cxx index 5d0b548d876..1dc4feb457d 100644 --- a/Examples/Filtering/SubsampleVolume.cxx +++ b/Examples/Filtering/SubsampleVolume.cxx @@ -79,10 +79,10 @@ int main( int argc, char * argv[] ) // Software Guide : BeginCodeSnippet const unsigned int Dimension = 3; - typedef unsigned char InputPixelType; + typedef uint8_t InputPixelType; typedef float InternalPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< InternalPixelType, Dimension > InternalImageType; diff --git a/Examples/Filtering/SurfaceExtraction.cxx b/Examples/Filtering/SurfaceExtraction.cxx index 6d07504e9fe..7ca73b0099c 100644 --- a/Examples/Filtering/SurfaceExtraction.cxx +++ b/Examples/Filtering/SurfaceExtraction.cxx @@ -86,7 +86,7 @@ int main(int argc, char * argv[] ) // Software Guide : BeginCodeSnippet const unsigned int Dimension = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > ImageType; // Software Guide : EndCodeSnippet diff --git a/Examples/Filtering/ThresholdImageFilter.cxx b/Examples/Filtering/ThresholdImageFilter.cxx index 01dd5b6bf18..f453ed9f2d2 100644 --- a/Examples/Filtering/ThresholdImageFilter.cxx +++ b/Examples/Filtering/ThresholdImageFilter.cxx @@ -123,7 +123,7 @@ int main( int argc, char * argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char PixelType; + typedef uint8_t PixelType; // Software Guide : EndCodeSnippet // Software Guide : BeginLatex diff --git a/Examples/Filtering/VectorCurvatureAnisotropicDiffusionImageFilter.cxx b/Examples/Filtering/VectorCurvatureAnisotropicDiffusionImageFilter.cxx index 240d01f973b..b1b300a2992 100644 --- a/Examples/Filtering/VectorCurvatureAnisotropicDiffusionImageFilter.cxx +++ b/Examples/Filtering/VectorCurvatureAnisotropicDiffusionImageFilter.cxx @@ -183,7 +183,7 @@ int main( int argc, char * argv[] ) // Select the component to extract. component->SetIndex( 0 ); - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; typedef itk::RescaleIntensityImageFilter< OutputImageType, WriteImageType > RescaleFilterType; diff --git a/Examples/Filtering/VectorGradientAnisotropicDiffusionImageFilter.cxx b/Examples/Filtering/VectorGradientAnisotropicDiffusionImageFilter.cxx index 0f679ae0d30..28525e16a2f 100644 --- a/Examples/Filtering/VectorGradientAnisotropicDiffusionImageFilter.cxx +++ b/Examples/Filtering/VectorGradientAnisotropicDiffusionImageFilter.cxx @@ -181,7 +181,7 @@ int main( int argc, char * argv[] ) // Select the component to extract. component->SetIndex( 0 ); - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; typedef itk::RescaleIntensityImageFilter< OutputImageType, WriteImageType > RescaleFilterType; diff --git a/Examples/Filtering/VectorIndexSelection.cxx b/Examples/Filtering/VectorIndexSelection.cxx index 5b2c64d4398..cb6e9edce73 100644 --- a/Examples/Filtering/VectorIndexSelection.cxx +++ b/Examples/Filtering/VectorIndexSelection.cxx @@ -40,8 +40,8 @@ int main( int argc, char * argv[] ) // Software Guide : BeginCodeSnippet - typedef itk::RGBPixel InputPixelType; - typedef unsigned char OutputPixelType; + typedef itk::RGBPixel InputPixelType; + typedef uint8_t OutputPixelType; const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; diff --git a/Examples/Filtering/VotingBinaryHoleFillingImageFilter.cxx b/Examples/Filtering/VotingBinaryHoleFillingImageFilter.cxx index a56d9c02e18..8cf9c768065 100644 --- a/Examples/Filtering/VotingBinaryHoleFillingImageFilter.cxx +++ b/Examples/Filtering/VotingBinaryHoleFillingImageFilter.cxx @@ -82,8 +82,8 @@ int main( int argc, char * argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Examples/Filtering/VotingBinaryIterativeHoleFillingImageFilter.cxx b/Examples/Filtering/VotingBinaryIterativeHoleFillingImageFilter.cxx index 3126430a296..2383d96c7b5 100644 --- a/Examples/Filtering/VotingBinaryIterativeHoleFillingImageFilter.cxx +++ b/Examples/Filtering/VotingBinaryIterativeHoleFillingImageFilter.cxx @@ -86,7 +86,7 @@ int main( int argc, char * argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, 2 > ImageType; // Software Guide : EndCodeSnippet diff --git a/Examples/Filtering/WarpImageFilter1.cxx b/Examples/Filtering/WarpImageFilter1.cxx index 1d43b66b835..358102391a8 100644 --- a/Examples/Filtering/WarpImageFilter1.cxx +++ b/Examples/Filtering/WarpImageFilter1.cxx @@ -62,7 +62,7 @@ int main( int argc, char * argv[] ) typedef itk::Vector< VectorComponentType, Dimension > VectorPixelType; typedef itk::Image< VectorPixelType, Dimension > DisplacementFieldType; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > ImageType; // Software Guide : EndCodeSnippet diff --git a/Examples/Filtering/ZeroCrossingBasedEdgeDetectionImageFilter.cxx b/Examples/Filtering/ZeroCrossingBasedEdgeDetectionImageFilter.cxx index 10f9539618e..852c58df690 100644 --- a/Examples/Filtering/ZeroCrossingBasedEdgeDetectionImageFilter.cxx +++ b/Examples/Filtering/ZeroCrossingBasedEdgeDetectionImageFilter.cxx @@ -63,7 +63,7 @@ int main( int argc, char * argv[] ) // Software Guide : BeginCodeSnippet typedef double InputPixelType; typedef double OutputPixelType; - typedef unsigned char CharPixelType; + typedef uint8_t CharPixelType; const unsigned int Dimension = 2; diff --git a/Examples/IO/CovariantVectorImageExtractComponent.cxx b/Examples/IO/CovariantVectorImageExtractComponent.cxx index 70a0420a17e..dd2df96c7ad 100644 --- a/Examples/IO/CovariantVectorImageExtractComponent.cxx +++ b/Examples/IO/CovariantVectorImageExtractComponent.cxx @@ -63,7 +63,7 @@ int main( int argc, char ** argv ) // We read an image of \doxygen{CovariantVector} pixels and extract on of // its components to generate a scalar image of a consistent pixel type. // Then, we rescale the intensities of this scalar image and write it as a - // image of \code{unsigned short} pixels. + // image of \code{uint16_t} pixels. // // Software Guide : EndLatex @@ -74,7 +74,7 @@ int main( int argc, char ** argv ) typedef itk::CovariantVector< ComponentType, Dimension > InputPixelType; - typedef unsigned short OutputPixelType; + typedef uint16_t OutputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< ComponentType, Dimension > ComponentImageType; diff --git a/Examples/IO/CovariantVectorImageRead.cxx b/Examples/IO/CovariantVectorImageRead.cxx index 124e7fa7826..c54b57d0d2a 100644 --- a/Examples/IO/CovariantVectorImageRead.cxx +++ b/Examples/IO/CovariantVectorImageRead.cxx @@ -66,7 +66,7 @@ int main( int argc, char ** argv ) // // We read an image of \doxygen{CovariantVector} pixels and compute pixel // magnitude to produce an image where each pixel is of type - // \code{unsigned short}. The components of the CovariantVector + // \code{uint16_t}. The components of the CovariantVector // are selected to be \code{float} here. Notice that a renormalization is // required in order to map the dynamic range of the magnitude values into // the range of the output pixel type. The @@ -82,7 +82,7 @@ int main( int argc, char ** argv ) Dimension > InputPixelType; typedef float MagnitudePixelType; - typedef unsigned short OutputPixelType; + typedef uint16_t OutputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< MagnitudePixelType, Dimension > MagnitudeImageType; diff --git a/Examples/IO/CovariantVectorImageWrite.cxx b/Examples/IO/CovariantVectorImageWrite.cxx index 07e05e3a334..057fb70a972 100644 --- a/Examples/IO/CovariantVectorImageWrite.cxx +++ b/Examples/IO/CovariantVectorImageWrite.cxx @@ -74,14 +74,14 @@ int main( int argc, char ** argv ) // Software Guide : BeginLatex // - // We select to read an image of \code{signed short} pixels and compute the + // We select to read an image of \code{int16_t} pixels and compute the // gradient to produce an image of CovariantVector where each // component is of type \code{float}. // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef signed short InputPixelType; + typedef int16_t InputPixelType; typedef float ComponentType; const unsigned int Dimension = 2; diff --git a/Examples/IO/DicomImageReadChangeHeaderWrite.cxx b/Examples/IO/DicomImageReadChangeHeaderWrite.cxx index 136ea3efd28..6d615071670 100644 --- a/Examples/IO/DicomImageReadChangeHeaderWrite.cxx +++ b/Examples/IO/DicomImageReadChangeHeaderWrite.cxx @@ -75,7 +75,7 @@ int main(int argc, char* argv[]) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef signed short InputPixelType; + typedef int16_t InputPixelType; const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; // Software Guide : EndCodeSnippet diff --git a/Examples/IO/DicomImageReadPrintTags.cxx b/Examples/IO/DicomImageReadPrintTags.cxx index 01e35e65af7..e4928401ecf 100644 --- a/Examples/IO/DicomImageReadPrintTags.cxx +++ b/Examples/IO/DicomImageReadPrintTags.cxx @@ -76,7 +76,7 @@ int main( int argc, char* argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef signed short PixelType; + typedef int16_t PixelType; const unsigned int Dimension = 2; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Examples/IO/DicomImageReadWrite.cxx b/Examples/IO/DicomImageReadWrite.cxx index dd33bab74e6..e1d8e300881 100644 --- a/Examples/IO/DicomImageReadWrite.cxx +++ b/Examples/IO/DicomImageReadWrite.cxx @@ -62,7 +62,7 @@ int main( int argc, char* argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef signed short InputPixelType; + typedef int16_t InputPixelType; const unsigned int InputDimension = 2; typedef itk::Image< InputPixelType, InputDimension > InputImageType; @@ -186,14 +186,14 @@ int main( int argc, char* argv[] ) // // We will now rescale the image into a rescaled image one using the rescale // intensity image filter. For this purpose we use a better suited pixel type: -// \code{unsigned char} instead of \code{signed short}. The minimum and +// \code{uint8_t} instead of \code{int16_t}. The minimum and // maximum values of the output image are explicitly defined in the rescaling // filter. // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; @@ -272,7 +272,7 @@ int main( int argc, char* argv[] ) // specific information // // The GDCMImageIO object will automatically detect the pixel type, in this -// case \code{unsigned char} and it will update the DICOM header information +// case \code{uint8_t} and it will update the DICOM header information // accordingly. // \index{itk::ImageFileWriter!UseInputMetaDataDictionaryOff()} // diff --git a/Examples/IO/DicomPrintPatientInformation.cxx b/Examples/IO/DicomPrintPatientInformation.cxx index 9285b19a396..a6c4a0b91a6 100644 --- a/Examples/IO/DicomPrintPatientInformation.cxx +++ b/Examples/IO/DicomPrintPatientInformation.cxx @@ -62,7 +62,7 @@ int main( int argc, char* argv[] ) return EXIT_FAILURE; } - typedef signed short PixelType; + typedef int16_t PixelType; const unsigned int Dimension = 2; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Examples/IO/DicomSeriesReadGaussianImageWrite.cxx b/Examples/IO/DicomSeriesReadGaussianImageWrite.cxx index 1008a906ed4..54d931a70eb 100644 --- a/Examples/IO/DicomSeriesReadGaussianImageWrite.cxx +++ b/Examples/IO/DicomSeriesReadGaussianImageWrite.cxx @@ -34,7 +34,7 @@ int main( int argc, char* argv[] ) } - typedef signed short PixelType; + typedef int16_t PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Examples/IO/DicomSeriesReadImageWrite2.cxx b/Examples/IO/DicomSeriesReadImageWrite2.cxx index 2f70be77202..4ddc9dfa82b 100644 --- a/Examples/IO/DicomSeriesReadImageWrite2.cxx +++ b/Examples/IO/DicomSeriesReadImageWrite2.cxx @@ -65,7 +65,7 @@ int main( int argc, char* argv[] ) // // We define the pixel type and dimension of the image to be read. In this // particular case, the dimensionality of the image is 3, and we assume a -// \code{signed short} pixel type that is commonly used for X-Rays CT scanners. +// \code{int16_t} pixel type that is commonly used for X-Rays CT scanners. // // The image orientation information contained in the direction cosines // of the DICOM header are read in and passed correctly down the image processing @@ -74,7 +74,7 @@ int main( int argc, char* argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef signed short PixelType; + typedef int16_t PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Examples/IO/DicomSeriesReadPrintTags.cxx b/Examples/IO/DicomSeriesReadPrintTags.cxx index 4569bd3be9a..58196215cac 100644 --- a/Examples/IO/DicomSeriesReadPrintTags.cxx +++ b/Examples/IO/DicomSeriesReadPrintTags.cxx @@ -56,7 +56,7 @@ int main( int argc, char* argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef signed short PixelType; + typedef int16_t PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Examples/IO/DicomSeriesReadSeriesWrite.cxx b/Examples/IO/DicomSeriesReadSeriesWrite.cxx index c3773d5416c..e5371f7b6e2 100644 --- a/Examples/IO/DicomSeriesReadSeriesWrite.cxx +++ b/Examples/IO/DicomSeriesReadSeriesWrite.cxx @@ -98,7 +98,7 @@ int main( int argc, char* argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef signed short PixelType; + typedef int16_t PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > ImageType; @@ -230,7 +230,7 @@ int main( int argc, char* argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef signed short OutputPixelType; + typedef int16_t OutputPixelType; const unsigned int OutputDimension = 2; typedef itk::Image< OutputPixelType, OutputDimension > Image2DType; diff --git a/Examples/IO/ImageReadCastWrite.cxx b/Examples/IO/ImageReadCastWrite.cxx index dc2523cd4a1..cd23ae37f94 100644 --- a/Examples/IO/ImageReadCastWrite.cxx +++ b/Examples/IO/ImageReadCastWrite.cxx @@ -69,7 +69,7 @@ int main( int argc, char ** argv ) // Software Guide : BeginCodeSnippet typedef float InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; diff --git a/Examples/IO/ImageReadDicomSeriesWrite.cxx b/Examples/IO/ImageReadDicomSeriesWrite.cxx index d88afc6300c..dc504169276 100644 --- a/Examples/IO/ImageReadDicomSeriesWrite.cxx +++ b/Examples/IO/ImageReadDicomSeriesWrite.cxx @@ -54,7 +54,7 @@ int main( int argc, char* argv[] ) } - typedef signed short PixelType; + typedef int16_t PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > ImageType; @@ -85,7 +85,7 @@ int main( int argc, char* argv[] ) itksys::SystemTools::MakeDirectory( outputDirectory ); - typedef signed short OutputPixelType; + typedef int16_t OutputPixelType; const unsigned int OutputDimension = 2; typedef itk::Image< OutputPixelType, OutputDimension > Image2DType; diff --git a/Examples/IO/ImageReadExportVTK.cxx b/Examples/IO/ImageReadExportVTK.cxx index 7ce31b6513e..bd1320a8b02 100644 --- a/Examples/IO/ImageReadExportVTK.cxx +++ b/Examples/IO/ImageReadExportVTK.cxx @@ -69,7 +69,7 @@ int main( int argc, char ** argv ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned short PixelType; + typedef uint16_t PixelType; const unsigned int Dimension = 2; typedef itk::Image< PixelType, Dimension > ImageType; // Software Guide : EndCodeSnippet diff --git a/Examples/IO/ImageReadExtractFilterInsertWrite.cxx b/Examples/IO/ImageReadExtractFilterInsertWrite.cxx index 2dfff4cfe48..5369bc9579a 100644 --- a/Examples/IO/ImageReadExtractFilterInsertWrite.cxx +++ b/Examples/IO/ImageReadExtractFilterInsertWrite.cxx @@ -77,9 +77,9 @@ int main( int argc, char ** argv ) // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char InputPixelType; - typedef unsigned char MiddlePixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t MiddlePixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 3 > InputImageType; typedef itk::Image< MiddlePixelType, 3 > MiddleImageType; typedef itk::Image< OutputPixelType, 3 > OutputImageType; diff --git a/Examples/IO/ImageReadExtractWrite.cxx b/Examples/IO/ImageReadExtractWrite.cxx index 89adb34f44b..2a05a2ad9c6 100644 --- a/Examples/IO/ImageReadExtractWrite.cxx +++ b/Examples/IO/ImageReadExtractWrite.cxx @@ -76,8 +76,8 @@ int main( int argc, char ** argv ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef signed short InputPixelType; - typedef signed short OutputPixelType; + typedef int16_t InputPixelType; + typedef int16_t OutputPixelType; typedef itk::Image< InputPixelType, 3 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Examples/IO/ImageReadImageSeriesWrite.cxx b/Examples/IO/ImageReadImageSeriesWrite.cxx index d41ccd6d70c..58326dd6841 100644 --- a/Examples/IO/ImageReadImageSeriesWrite.cxx +++ b/Examples/IO/ImageReadImageSeriesWrite.cxx @@ -49,7 +49,7 @@ int main( int argc, char *argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef itk::Image< unsigned char, 3 > ImageType; + typedef itk::Image< uint8_t, 3 > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; // Software Guide : EndCodeSnippet @@ -76,7 +76,7 @@ int main( int argc, char *argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef itk::Image< unsigned char, 2 > Image2DType; + typedef itk::Image< uint8_t, 2 > Image2DType; typedef itk::ImageSeriesWriter< ImageType, Image2DType > WriterType; diff --git a/Examples/IO/ImageReadRegionOfInterestWrite.cxx b/Examples/IO/ImageReadRegionOfInterestWrite.cxx index 6ca4e822525..633d7257d83 100644 --- a/Examples/IO/ImageReadRegionOfInterestWrite.cxx +++ b/Examples/IO/ImageReadRegionOfInterestWrite.cxx @@ -70,8 +70,8 @@ int main( int argc, char ** argv ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef signed short InputPixelType; - typedef signed short OutputPixelType; + typedef int16_t InputPixelType; + typedef int16_t OutputPixelType; const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; diff --git a/Examples/IO/ImageSeriesReadWrite.cxx b/Examples/IO/ImageSeriesReadWrite.cxx index 14974025ad8..beff40a3073 100644 --- a/Examples/IO/ImageSeriesReadWrite.cxx +++ b/Examples/IO/ImageSeriesReadWrite.cxx @@ -63,7 +63,7 @@ int main( int argc, char ** argv ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Examples/IO/ImageSeriesReadWrite2.cxx b/Examples/IO/ImageSeriesReadWrite2.cxx index 5f555fc0a71..59296442a1d 100644 --- a/Examples/IO/ImageSeriesReadWrite2.cxx +++ b/Examples/IO/ImageSeriesReadWrite2.cxx @@ -96,7 +96,7 @@ int main( int argc, char ** argv ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Examples/IO/RGBImageReadWrite.cxx b/Examples/IO/RGBImageReadWrite.cxx index 24798d9e102..c2e273d1f93 100644 --- a/Examples/IO/RGBImageReadWrite.cxx +++ b/Examples/IO/RGBImageReadWrite.cxx @@ -59,7 +59,7 @@ int main( int argc, char ** argv ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef itk::RGBPixel< unsigned char > PixelType; + typedef itk::RGBPixel< uint8_t > PixelType; typedef itk::Image< PixelType, 2 > ImageType; // Software Guide : EndCodeSnippet diff --git a/Examples/IO/RGBImageSeriesReadWrite.cxx b/Examples/IO/RGBImageSeriesReadWrite.cxx index cdec3bb42a0..f1ae853f437 100644 --- a/Examples/IO/RGBImageSeriesReadWrite.cxx +++ b/Examples/IO/RGBImageSeriesReadWrite.cxx @@ -64,7 +64,7 @@ int main( int argc, char ** argv ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef itk::RGBPixel< unsigned char > PixelType; + typedef itk::RGBPixel< uint8_t > PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Examples/IO/VisibleHumanPasteWrite.cxx b/Examples/IO/VisibleHumanPasteWrite.cxx index 2e54556296b..c3a0803acb8 100644 --- a/Examples/IO/VisibleHumanPasteWrite.cxx +++ b/Examples/IO/VisibleHumanPasteWrite.cxx @@ -49,8 +49,8 @@ int main(int argc, char *argv[]) std::string inputImageFile = argv[1]; std::string outputImageFile = argv[2]; - typedef itk::RGBPixel RGBPixelType; - typedef itk::Vector VRGBPixelType; + typedef itk::RGBPixel RGBPixelType; + typedef itk::Vector VRGBPixelType; typedef itk::Image RGB2DImageType; typedef itk::Image VRGB2DImageType; diff --git a/Examples/IO/VisibleHumanStreamReadWrite.cxx b/Examples/IO/VisibleHumanStreamReadWrite.cxx index fd0bbd5542a..fc4c8bced98 100644 --- a/Examples/IO/VisibleHumanStreamReadWrite.cxx +++ b/Examples/IO/VisibleHumanStreamReadWrite.cxx @@ -57,8 +57,8 @@ int main(int argc, char *argv[]) std::string visibleHumanPath = argv[1]; std::string outputImageFile = argv[2]; - typedef itk::RGBPixel RGBPixelType; - typedef unsigned char PixelType; + typedef itk::RGBPixel RGBPixelType; + typedef uint8_t PixelType; typedef itk::Image ImageType; typedef itk::Image RGB3DImageType; typedef itk::Image RGB2DImageType; diff --git a/Examples/Installation/HelloWorld.cxx b/Examples/Installation/HelloWorld.cxx index 7e0e1bb7806..3107fdecfd4 100644 --- a/Examples/Installation/HelloWorld.cxx +++ b/Examples/Installation/HelloWorld.cxx @@ -29,7 +29,7 @@ int main() { - typedef itk::Image< unsigned short, 3 > ImageType; + typedef itk::Image< uint16_t, 3 > ImageType; ImageType::Pointer image = ImageType::New(); diff --git a/Examples/Iterators/ImageLinearIteratorWithIndex.cxx b/Examples/Iterators/ImageLinearIteratorWithIndex.cxx index ebce22ed936..b0f3a33e37a 100644 --- a/Examples/Iterators/ImageLinearIteratorWithIndex.cxx +++ b/Examples/Iterators/ImageLinearIteratorWithIndex.cxx @@ -128,7 +128,7 @@ int main( int argc, char *argv[] ) const unsigned int Dimension = 2; - typedef itk::RGBPixel< unsigned char > RGBPixelType; + typedef itk::RGBPixel< uint8_t > RGBPixelType; typedef itk::Image< RGBPixelType, Dimension > ImageType; // Software Guide : BeginCodeSnippet diff --git a/Examples/Iterators/ImageLinearIteratorWithIndex2.cxx b/Examples/Iterators/ImageLinearIteratorWithIndex2.cxx index 5f9052b398d..b5dbf695737 100644 --- a/Examples/Iterators/ImageLinearIteratorWithIndex2.cxx +++ b/Examples/Iterators/ImageLinearIteratorWithIndex2.cxx @@ -57,7 +57,7 @@ int main( int argc, char *argv[] ) // Software Guide : BeginCodeSnippet - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, 3 > Image3DType; typedef itk::Image< PixelType, 4 > Image4DType; diff --git a/Examples/Iterators/ImageRandomConstIteratorWithIndex.cxx b/Examples/Iterators/ImageRandomConstIteratorWithIndex.cxx index 4564a773c3b..693f7f6e606 100644 --- a/Examples/Iterators/ImageRandomConstIteratorWithIndex.cxx +++ b/Examples/Iterators/ImageRandomConstIteratorWithIndex.cxx @@ -66,7 +66,7 @@ int main( int argc, char *argv[] ) // Software Guide : BeginCodeSnippet const unsigned int Dimension = 2; - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image< PixelType, Dimension > ImageType; typedef itk::ImageRandomConstIteratorWithIndex< ImageType > ConstIteratorType; // Software Guide : EndCodeSnippet diff --git a/Examples/Iterators/ImageRegionIterator.cxx b/Examples/Iterators/ImageRegionIterator.cxx index 0574a1cfc13..3e1c620f2e9 100644 --- a/Examples/Iterators/ImageRegionIterator.cxx +++ b/Examples/Iterators/ImageRegionIterator.cxx @@ -73,7 +73,7 @@ int main( int argc, char *argv[] ) // Software Guide : BeginCodeSnippet const unsigned int Dimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > ImageType; typedef itk::ImageRegionConstIterator< ImageType > ConstIteratorType; diff --git a/Examples/Iterators/ImageRegionIteratorWithIndex.cxx b/Examples/Iterators/ImageRegionIteratorWithIndex.cxx index a4a80aa6d8f..2f8f1e5705b 100644 --- a/Examples/Iterators/ImageRegionIteratorWithIndex.cxx +++ b/Examples/Iterators/ImageRegionIteratorWithIndex.cxx @@ -77,7 +77,7 @@ int main( int argc, char *argv[] ) // Software Guide : BeginCodeSnippet const unsigned int Dimension = 2; - typedef itk::RGBPixel< unsigned char > RGBPixelType; + typedef itk::RGBPixel< uint8_t > RGBPixelType; typedef itk::Image< RGBPixelType, Dimension > ImageType; typedef itk::ImageRegionIteratorWithIndex< ImageType > IteratorType; diff --git a/Examples/Iterators/ImageSliceIteratorWithIndex.cxx b/Examples/Iterators/ImageSliceIteratorWithIndex.cxx index 1602dbbec6f..ec80cfa2674 100644 --- a/Examples/Iterators/ImageSliceIteratorWithIndex.cxx +++ b/Examples/Iterators/ImageSliceIteratorWithIndex.cxx @@ -120,14 +120,14 @@ int main( int argc, char *argv[] ) // Software Guide : BeginLatex // - // The pixel type is defined as \code{unsigned short}. For this application, + // The pixel type is defined as \code{uint16_t}. For this application, // we need two image types, a 3D image for the input, and a 2D image for the // intensity projection. // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image< PixelType, 2 > ImageType2D; typedef itk::Image< PixelType, 3 > ImageType3D; // Software Guide : EndCodeSnippet @@ -257,7 +257,7 @@ int main( int argc, char *argv[] ) { while ( ! outputIt.IsAtEndOfLine() ) { - outputIt.Set( itk::NumericTraits::NonpositiveMin() ); + outputIt.Set( itk::NumericTraits::NonpositiveMin() ); ++outputIt; } outputIt.NextLine(); diff --git a/Examples/Iterators/NeighborhoodIterators1.cxx b/Examples/Iterators/NeighborhoodIterators1.cxx index f7847b77aa4..fcebede2e74 100644 --- a/Examples/Iterators/NeighborhoodIterators1.cxx +++ b/Examples/Iterators/NeighborhoodIterators1.cxx @@ -195,13 +195,13 @@ int main( int argc, char ** argv ) // // The last step is to write the output buffer to an image file. Writing is // done inside a \code{try/catch} block to handle any exceptions. The output - // is rescaled to intensity range $[0, 255]$ and cast to unsigned char so that + // is rescaled to intensity range $[0, 255]$ and cast to uint8_t so that // it can be saved and visualized as a PNG image. // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; typedef itk::ImageFileWriter< WriteImageType > WriterType; diff --git a/Examples/Iterators/NeighborhoodIterators2.cxx b/Examples/Iterators/NeighborhoodIterators2.cxx index ce961768c79..78b345d6aa1 100644 --- a/Examples/Iterators/NeighborhoodIterators2.cxx +++ b/Examples/Iterators/NeighborhoodIterators2.cxx @@ -156,7 +156,7 @@ int main( int argc, char ** argv ) // // Software Guide : EndLatex - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; typedef itk::ImageFileWriter< WriteImageType > WriterType; diff --git a/Examples/Iterators/NeighborhoodIterators3.cxx b/Examples/Iterators/NeighborhoodIterators3.cxx index 3e1df40da52..f044908881d 100644 --- a/Examples/Iterators/NeighborhoodIterators3.cxx +++ b/Examples/Iterators/NeighborhoodIterators3.cxx @@ -195,7 +195,7 @@ int main( int argc, char ** argv ) // // Software Guide : EndLatex - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; typedef itk::ImageFileWriter< WriteImageType > WriterType; diff --git a/Examples/Iterators/NeighborhoodIterators4.cxx b/Examples/Iterators/NeighborhoodIterators4.cxx index 3e6db9f383b..68b45cd1a78 100644 --- a/Examples/Iterators/NeighborhoodIterators4.cxx +++ b/Examples/Iterators/NeighborhoodIterators4.cxx @@ -199,7 +199,7 @@ int main( int argc, char ** argv ) // // Software Guide : EndLatex - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; typedef itk::ImageFileWriter< WriteImageType > WriterType; diff --git a/Examples/Iterators/NeighborhoodIterators5.cxx b/Examples/Iterators/NeighborhoodIterators5.cxx index 0782a4fdbc2..a67fb9a8148 100644 --- a/Examples/Iterators/NeighborhoodIterators5.cxx +++ b/Examples/Iterators/NeighborhoodIterators5.cxx @@ -184,7 +184,7 @@ int main( int argc, char ** argv ) // // Software Guide : EndLatex - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; typedef itk::ImageFileWriter< WriteImageType > WriterType; diff --git a/Examples/Iterators/NeighborhoodIterators6.cxx b/Examples/Iterators/NeighborhoodIterators6.cxx index ce41edabe13..d518543652d 100644 --- a/Examples/Iterators/NeighborhoodIterators6.cxx +++ b/Examples/Iterators/NeighborhoodIterators6.cxx @@ -204,7 +204,7 @@ int main( int argc, char ** argv ) // // Software Guide : EndLatex - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; typedef itk::ImageFileWriter< WriteImageType > WriterType; diff --git a/Examples/Iterators/ShapedNeighborhoodIterators1.cxx b/Examples/Iterators/ShapedNeighborhoodIterators1.cxx index 99b605dad18..318d71bb9d3 100644 --- a/Examples/Iterators/ShapedNeighborhoodIterators1.cxx +++ b/Examples/Iterators/ShapedNeighborhoodIterators1.cxx @@ -66,7 +66,7 @@ int main( int argc, char ** argv ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, 2 > ImageType; typedef itk::ConstShapedNeighborhoodIterator< diff --git a/Examples/Iterators/ShapedNeighborhoodIterators2.cxx b/Examples/Iterators/ShapedNeighborhoodIterators2.cxx index b6fe6c48826..f6bc47ab73e 100644 --- a/Examples/Iterators/ShapedNeighborhoodIterators2.cxx +++ b/Examples/Iterators/ShapedNeighborhoodIterators2.cxx @@ -41,7 +41,7 @@ int main( int argc, char ** argv ) return -1; } - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, 2 > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; @@ -147,7 +147,7 @@ int main( int argc, char ** argv ) // Software Guide : BeginLatex // // The output image is written and visualized directly as a binary image of -// \code{unsigned chars}. Figure~\ref{fig:ShapedNeighborhoodExample2} +// \code{uint8_ts}. Figure~\ref{fig:ShapedNeighborhoodExample2} // illustrates some results of erosion and dilation on the image // \code{Examples/Data/BinaryImage.png}. Applying erosion and dilation // in sequence effects the morphological operations of opening and closing. diff --git a/Examples/Registration/BSplineWarping1.cxx b/Examples/Registration/BSplineWarping1.cxx index c22d6e8f5a5..b57b1c60b0a 100644 --- a/Examples/Registration/BSplineWarping1.cxx +++ b/Examples/Registration/BSplineWarping1.cxx @@ -87,7 +87,7 @@ int main( int argc, char * argv[] ) // Software Guide : BeginCodeSnippet const unsigned int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, ImageDimension > FixedImageType; typedef itk::Image< PixelType, ImageDimension > MovingImageType; diff --git a/Examples/Registration/BSplineWarping2.cxx b/Examples/Registration/BSplineWarping2.cxx index 853423fca64..58976426597 100644 --- a/Examples/Registration/BSplineWarping2.cxx +++ b/Examples/Registration/BSplineWarping2.cxx @@ -87,7 +87,7 @@ int main( int argc, char * argv[] ) // Software Guide : BeginCodeSnippet const unsigned int ImageDimension = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, ImageDimension > FixedImageType; typedef itk::Image< PixelType, ImageDimension > MovingImageType; diff --git a/Examples/Registration/ChangeInformationImageFilter.cxx b/Examples/Registration/ChangeInformationImageFilter.cxx index d02bd4bc019..066b947a0a5 100644 --- a/Examples/Registration/ChangeInformationImageFilter.cxx +++ b/Examples/Registration/ChangeInformationImageFilter.cxx @@ -73,7 +73,7 @@ int main( int argc, char * argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 3; diff --git a/Examples/Registration/DeformableRegistration1.cxx b/Examples/Registration/DeformableRegistration1.cxx index 3bdd89eaa1a..edaf94cf9cb 100644 --- a/Examples/Registration/DeformableRegistration1.cxx +++ b/Examples/Registration/DeformableRegistration1.cxx @@ -51,7 +51,7 @@ // Software Guide : BeginCodeSnippet -typedef itk::Image DiskImageType; +typedef itk::Image DiskImageType; typedef itk::Image ImageType; typedef itk::fem::Element2DC0LinearQuadrilateralMembrane ElementType; typedef itk::fem::Element2DC0LinearTriangularMembrane ElementType2; @@ -70,7 +70,7 @@ typedef itk::fem::FEMObject<2> FEMObjectType; // SoftwareGuide : BeginCodeSnippet -typedef itk::Image fileImage3DType; +typedef itk::Image fileImage3DType; typedef itk::Image Image3DType; typedef itk::fem::Element3DC0LinearHexahedronMembrane Element3DType; typedef itk::fem::Element3DC0LinearTetrahedronMembrane Element3DType2; diff --git a/Examples/Registration/DeformableRegistration10.cxx b/Examples/Registration/DeformableRegistration10.cxx index c29ee2a2171..b65f7a43ab4 100644 --- a/Examples/Registration/DeformableRegistration10.cxx +++ b/Examples/Registration/DeformableRegistration10.cxx @@ -179,7 +179,7 @@ int main( int argc, char *argv[] ) warper->SetDisplacementField( multires->GetOutput() ); // Write warped image out to file - typedef unsigned short OutputPixelType; + typedef uint16_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::CastImageFilter< MovingImageType, diff --git a/Examples/Registration/DeformableRegistration11.cxx b/Examples/Registration/DeformableRegistration11.cxx index d1da862dd45..13497ba0c8c 100644 --- a/Examples/Registration/DeformableRegistration11.cxx +++ b/Examples/Registration/DeformableRegistration11.cxx @@ -29,7 +29,7 @@ const unsigned int Dimension = 3; -typedef itk::Image FileImageType; +typedef itk::Image FileImageType; typedef itk::Image ImageType; typedef itk::fem::Element3DC0LinearHexahedronMembrane ElementType; diff --git a/Examples/Registration/DeformableRegistration12.cxx b/Examples/Registration/DeformableRegistration12.cxx index 2434de03b1d..2c990e5f577 100644 --- a/Examples/Registration/DeformableRegistration12.cxx +++ b/Examples/Registration/DeformableRegistration12.cxx @@ -127,7 +127,7 @@ int main( int argc, char *argv[] ) } const unsigned int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, ImageDimension > FixedImageType; typedef itk::Image< PixelType, ImageDimension > MovingImageType; @@ -383,7 +383,7 @@ int main( int argc, char *argv[] ) // such as 100 or 128. resample->SetDefaultPixelValue( 0 ); - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, ImageDimension > OutputImageType; diff --git a/Examples/Registration/DeformableRegistration13.cxx b/Examples/Registration/DeformableRegistration13.cxx index f48db731fe0..9280c14e392 100644 --- a/Examples/Registration/DeformableRegistration13.cxx +++ b/Examples/Registration/DeformableRegistration13.cxx @@ -114,7 +114,7 @@ int main( int argc, char *argv[] ) } const unsigned int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, ImageDimension > FixedImageType; typedef itk::Image< PixelType, ImageDimension > MovingImageType; @@ -335,7 +335,7 @@ int main( int argc, char *argv[] ) // such as 100 or 128. resample->SetDefaultPixelValue( 0 ); - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, ImageDimension > OutputImageType; diff --git a/Examples/Registration/DeformableRegistration14.cxx b/Examples/Registration/DeformableRegistration14.cxx index b92bb57a1a3..cb51c38b872 100644 --- a/Examples/Registration/DeformableRegistration14.cxx +++ b/Examples/Registration/DeformableRegistration14.cxx @@ -113,7 +113,7 @@ int main( int argc, char *argv[] ) } const unsigned int ImageDimension = 3; - typedef signed short PixelType; + typedef int16_t PixelType; typedef itk::Image< PixelType, ImageDimension > FixedImageType; typedef itk::Image< PixelType, ImageDimension > MovingImageType; @@ -333,7 +333,7 @@ int main( int argc, char *argv[] ) // such as 100 or 128. resample->SetDefaultPixelValue( 0 ); - typedef signed short OutputPixelType; + typedef int16_t OutputPixelType; typedef itk::Image< OutputPixelType, ImageDimension > OutputImageType; diff --git a/Examples/Registration/DeformableRegistration15.cxx b/Examples/Registration/DeformableRegistration15.cxx index 5c5d27c058d..377205ac382 100644 --- a/Examples/Registration/DeformableRegistration15.cxx +++ b/Examples/Registration/DeformableRegistration15.cxx @@ -125,7 +125,7 @@ int main( int argc, char *argv[] ) } const unsigned int ImageDimension = 3; - typedef signed short PixelType; + typedef int16_t PixelType; typedef itk::Image< PixelType, ImageDimension > FixedImageType; typedef itk::Image< PixelType, ImageDimension > MovingImageType; @@ -703,7 +703,7 @@ int main( int argc, char *argv[] ) // such as 100 or 128. resample->SetDefaultPixelValue( 0 ); - typedef signed short OutputPixelType; + typedef int16_t OutputPixelType; typedef itk::Image< OutputPixelType, ImageDimension > OutputImageType; diff --git a/Examples/Registration/DeformableRegistration2.cxx b/Examples/Registration/DeformableRegistration2.cxx index a2e09e57ca0..8383697d6fe 100644 --- a/Examples/Registration/DeformableRegistration2.cxx +++ b/Examples/Registration/DeformableRegistration2.cxx @@ -106,7 +106,7 @@ int main( int argc, char *argv[] ) // Software Guide : BeginCodeSnippet const unsigned int Dimension = 2; - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; @@ -345,7 +345,7 @@ int main( int argc, char *argv[] ) // Write warped image out to file - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::CastImageFilter< MovingImageType, diff --git a/Examples/Registration/DeformableRegistration3.cxx b/Examples/Registration/DeformableRegistration3.cxx index 81f756510c8..efe6da35821 100644 --- a/Examples/Registration/DeformableRegistration3.cxx +++ b/Examples/Registration/DeformableRegistration3.cxx @@ -104,7 +104,7 @@ int main( int argc, char *argv[] ) // Software Guide : BeginCodeSnippet const unsigned int Dimension = 2; - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; @@ -341,7 +341,7 @@ int main( int argc, char *argv[] ) // Write warped image out to file - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::CastImageFilter< MovingImageType, diff --git a/Examples/Registration/DeformableRegistration4.cxx b/Examples/Registration/DeformableRegistration4.cxx index 84dcaa3dcd4..eca67372812 100644 --- a/Examples/Registration/DeformableRegistration4.cxx +++ b/Examples/Registration/DeformableRegistration4.cxx @@ -312,7 +312,7 @@ int main( int argc, char *argv[] ) resample->SetOutputDirection( fixedImage->GetDirection() ); resample->SetDefaultPixelValue( 100 ); - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, ImageDimension > OutputImageType; diff --git a/Examples/Registration/DeformableRegistration5.cxx b/Examples/Registration/DeformableRegistration5.cxx index e103e4fdb39..ec9efbf872b 100644 --- a/Examples/Registration/DeformableRegistration5.cxx +++ b/Examples/Registration/DeformableRegistration5.cxx @@ -96,7 +96,7 @@ int main( int argc, char *argv[] ) // Software Guide : BeginCodeSnippet const unsigned int Dimension = 2; - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; @@ -336,7 +336,7 @@ int main( int argc, char *argv[] ) // Write warped image out to file - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::CastImageFilter< MovingImageType, diff --git a/Examples/Registration/DeformableRegistration6.cxx b/Examples/Registration/DeformableRegistration6.cxx index 27fee85e7b5..7cf8491b6c0 100644 --- a/Examples/Registration/DeformableRegistration6.cxx +++ b/Examples/Registration/DeformableRegistration6.cxx @@ -384,7 +384,7 @@ int main( int argc, char *argv[] ) resample->SetOutputDirection( fixedImage->GetDirection() ); resample->SetDefaultPixelValue( 100 ); - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, ImageDimension > OutputImageType; diff --git a/Examples/Registration/DeformableRegistration7.cxx b/Examples/Registration/DeformableRegistration7.cxx index d14b2d35ed3..b1d5384a027 100644 --- a/Examples/Registration/DeformableRegistration7.cxx +++ b/Examples/Registration/DeformableRegistration7.cxx @@ -353,7 +353,7 @@ int main( int argc, char *argv[] ) resample->SetOutputDirection( fixedImage->GetDirection() ); resample->SetDefaultPixelValue( 100 ); - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, ImageDimension > OutputImageType; diff --git a/Examples/Registration/DeformableRegistration8.cxx b/Examples/Registration/DeformableRegistration8.cxx index 53b0bcdc24a..4c4010305af 100644 --- a/Examples/Registration/DeformableRegistration8.cxx +++ b/Examples/Registration/DeformableRegistration8.cxx @@ -128,7 +128,7 @@ int main( int argc, char *argv[] ) } const unsigned int ImageDimension = 3; - typedef signed short PixelType; + typedef int16_t PixelType; typedef itk::Image< PixelType, ImageDimension > FixedImageType; typedef itk::Image< PixelType, ImageDimension > MovingImageType; @@ -412,7 +412,7 @@ int main( int argc, char *argv[] ) // such as 100 or 128. resample->SetDefaultPixelValue( 0 ); - typedef signed short OutputPixelType; + typedef int16_t OutputPixelType; typedef itk::Image< OutputPixelType, ImageDimension > OutputImageType; diff --git a/Examples/Registration/DeformableRegistration9.cxx b/Examples/Registration/DeformableRegistration9.cxx index 6a90dec0390..90bcf698ef3 100644 --- a/Examples/Registration/DeformableRegistration9.cxx +++ b/Examples/Registration/DeformableRegistration9.cxx @@ -172,7 +172,7 @@ int main( int argc, char *argv[] ) warper->SetDisplacementField( filter->GetOutput() ); // Write warped image out to file - typedef unsigned short OutputPixelType; + typedef uint16_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::CastImageFilter< MovingImageType, diff --git a/Examples/Registration/DisplacementFieldInitialization.cxx b/Examples/Registration/DisplacementFieldInitialization.cxx index 29da84d76ab..fca55224380 100644 --- a/Examples/Registration/DisplacementFieldInitialization.cxx +++ b/Examples/Registration/DisplacementFieldInitialization.cxx @@ -64,7 +64,7 @@ int main( int argc, char * argv[] ) typedef itk::Image< VectorType, Dimension > DisplacementFieldType; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::ImageFileReader< FixedImageType > FixedReaderType; diff --git a/Examples/Registration/ImageRegistration1.cxx b/Examples/Registration/ImageRegistration1.cxx index 5ce30741e3d..2856b931b3b 100644 --- a/Examples/Registration/ImageRegistration1.cxx +++ b/Examples/Registration/ImageRegistration1.cxx @@ -619,7 +619,7 @@ int main( int argc, char *argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::CastImageFilter< FixedImageType, diff --git a/Examples/Registration/ImageRegistration10.cxx b/Examples/Registration/ImageRegistration10.cxx index da98d4c18be..1a2f83756f0 100644 --- a/Examples/Registration/ImageRegistration10.cxx +++ b/Examples/Registration/ImageRegistration10.cxx @@ -452,7 +452,7 @@ int main( int argc, char *argv[] ) // pixel type of the resampled image to the final type used by the // writer. The cast and writer filters are instantiated below. // - typedef unsigned short OutputPixelType; + typedef uint16_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::CastImageFilter< FixedImageType, diff --git a/Examples/Registration/ImageRegistration11.cxx b/Examples/Registration/ImageRegistration11.cxx index 89551cb3c70..dfd4086cea2 100644 --- a/Examples/Registration/ImageRegistration11.cxx +++ b/Examples/Registration/ImageRegistration11.cxx @@ -111,7 +111,7 @@ int main( int argc, char *argv[] ) } const unsigned int Dimension = 2; - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; @@ -324,7 +324,7 @@ int main( int argc, char *argv[] ) resample->SetDefaultPixelValue( 100 ); - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::CastImageFilter< FixedImageType, diff --git a/Examples/Registration/ImageRegistration12.cxx b/Examples/Registration/ImageRegistration12.cxx index 7c4212afe32..a0dde0d2739 100644 --- a/Examples/Registration/ImageRegistration12.cxx +++ b/Examples/Registration/ImageRegistration12.cxx @@ -219,13 +219,13 @@ int main( int argc, char *argv[] ) // Software Guide : BeginLatex // // The mask in this case is read from a binary file using the - // \code{ImageFileReader} instantiated for an \code{unsigned char} pixel + // \code{ImageFileReader} instantiated for an \code{uint8_t} pixel // type. // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef itk::Image< unsigned char, Dimension > ImageMaskType; + typedef itk::Image< uint8_t, Dimension > ImageMaskType; typedef itk::ImageFileReader< ImageMaskType > MaskReaderType; // Software Guide : EndCodeSnippet @@ -385,7 +385,7 @@ int main( int argc, char *argv[] ) resample->SetOutputDirection( fixedImage->GetDirection() ); resample->SetDefaultPixelValue( 100 ); - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Registration/ImageRegistration13.cxx b/Examples/Registration/ImageRegistration13.cxx index 5a15ec3d4ae..f83dc92c3f9 100644 --- a/Examples/Registration/ImageRegistration13.cxx +++ b/Examples/Registration/ImageRegistration13.cxx @@ -96,7 +96,7 @@ int main( int argc, char *argv[] ) } const unsigned int Dimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; diff --git a/Examples/Registration/ImageRegistration14.cxx b/Examples/Registration/ImageRegistration14.cxx index a5738f84bcf..770b0056b92 100644 --- a/Examples/Registration/ImageRegistration14.cxx +++ b/Examples/Registration/ImageRegistration14.cxx @@ -104,7 +104,7 @@ int main( int argc, char *argv[] ) } const unsigned int Dimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; diff --git a/Examples/Registration/ImageRegistration15.cxx b/Examples/Registration/ImageRegistration15.cxx index 839adbca778..97260f4d58e 100644 --- a/Examples/Registration/ImageRegistration15.cxx +++ b/Examples/Registration/ImageRegistration15.cxx @@ -101,7 +101,7 @@ int main( int argc, char *argv[] ) } const unsigned int Dimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; diff --git a/Examples/Registration/ImageRegistration16.cxx b/Examples/Registration/ImageRegistration16.cxx index dbb6639df7d..19156d5ff72 100644 --- a/Examples/Registration/ImageRegistration16.cxx +++ b/Examples/Registration/ImageRegistration16.cxx @@ -96,7 +96,7 @@ int main( int argc, char *argv[] ) } const unsigned int Dimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; diff --git a/Examples/Registration/ImageRegistration17.cxx b/Examples/Registration/ImageRegistration17.cxx index 4b830e70abc..7e07506fe23 100644 --- a/Examples/Registration/ImageRegistration17.cxx +++ b/Examples/Registration/ImageRegistration17.cxx @@ -95,7 +95,7 @@ int main( int argc, char *argv[] ) } const unsigned int Dimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; diff --git a/Examples/Registration/ImageRegistration18.cxx b/Examples/Registration/ImageRegistration18.cxx index 7a4061fe9ce..29faa11f2ba 100644 --- a/Examples/Registration/ImageRegistration18.cxx +++ b/Examples/Registration/ImageRegistration18.cxx @@ -90,7 +90,7 @@ int main( int argc, char *argv[] ) } const unsigned int Dimension = 2; - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; @@ -236,7 +236,7 @@ int main( int argc, char *argv[] ) // Prepare a writer and caster filters to send the resampled moving image to // a file // - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Registration/ImageRegistration19.cxx b/Examples/Registration/ImageRegistration19.cxx index b326ac16ffd..8cab0ea9c6a 100644 --- a/Examples/Registration/ImageRegistration19.cxx +++ b/Examples/Registration/ImageRegistration19.cxx @@ -406,7 +406,7 @@ int main( int argc, char *argv[] ) // pixel type of the resampled image to the final type used by the // writer. The cast and writer filters are instantiated below. // - typedef unsigned short OutputPixelType; + typedef uint16_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::CastImageFilter< FixedImageType, diff --git a/Examples/Registration/ImageRegistration2.cxx b/Examples/Registration/ImageRegistration2.cxx index d2d18dc9d5d..a4773848306 100644 --- a/Examples/Registration/ImageRegistration2.cxx +++ b/Examples/Registration/ImageRegistration2.cxx @@ -145,7 +145,7 @@ int main( int argc, char *argv[] ) // // Software Guide : BeginCodeSnippet const unsigned int Dimension = 2; - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; @@ -522,7 +522,7 @@ int main( int argc, char *argv[] ) resample->SetDefaultPixelValue( 100 ); - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Registration/ImageRegistration20.cxx b/Examples/Registration/ImageRegistration20.cxx index 2ef62d6aee1..c7fa0f0d9a1 100644 --- a/Examples/Registration/ImageRegistration20.cxx +++ b/Examples/Registration/ImageRegistration20.cxx @@ -412,7 +412,7 @@ int main( int argc, char *argv[] ) resampler->SetOutputDirection( fixedImage->GetDirection() ); resampler->SetDefaultPixelValue( 100 ); - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Registration/ImageRegistration3.cxx b/Examples/Registration/ImageRegistration3.cxx index 9b176adcc6a..76f74ae8638 100644 --- a/Examples/Registration/ImageRegistration3.cxx +++ b/Examples/Registration/ImageRegistration3.cxx @@ -278,7 +278,7 @@ int main( int argc, char *argv[] ) } const unsigned int Dimension = 2; - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; @@ -503,7 +503,7 @@ int main( int argc, char *argv[] ) // Prepare a writer and caster filters to send the resampled moving image to // a file // - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Registration/ImageRegistration4.cxx b/Examples/Registration/ImageRegistration4.cxx index 10da73348e6..ee853aefee3 100644 --- a/Examples/Registration/ImageRegistration4.cxx +++ b/Examples/Registration/ImageRegistration4.cxx @@ -119,7 +119,7 @@ int main( int argc, char *argv[] ) } const unsigned int Dimension = 2; - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; @@ -388,7 +388,7 @@ int main( int argc, char *argv[] ) resample->SetDefaultPixelValue( defaultPixelValue ); - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Registration/ImageRegistration5.cxx b/Examples/Registration/ImageRegistration5.cxx index d2ab3cf0889..b99fc01a5ff 100644 --- a/Examples/Registration/ImageRegistration5.cxx +++ b/Examples/Registration/ImageRegistration5.cxx @@ -127,7 +127,7 @@ int main( int argc, char *argv[] ) } const unsigned int Dimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; @@ -549,7 +549,7 @@ int main( int argc, char *argv[] ) DifferenceFilterType::Pointer difference = DifferenceFilterType::New(); - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Registration/ImageRegistration6.cxx b/Examples/Registration/ImageRegistration6.cxx index bec43c38969..e7dc96c7744 100644 --- a/Examples/Registration/ImageRegistration6.cxx +++ b/Examples/Registration/ImageRegistration6.cxx @@ -572,7 +572,7 @@ int main( int argc, char *argv[] ) resample->SetOutputDirection( fixedImage->GetDirection() ); resample->SetDefaultPixelValue( 100 ); - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; @@ -606,7 +606,7 @@ int main( int argc, char *argv[] ) DifferenceFilterType::Pointer difference = DifferenceFilterType::New(); - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Registration/ImageRegistration7.cxx b/Examples/Registration/ImageRegistration7.cxx index 41d6c31bc40..98327b3d0a9 100644 --- a/Examples/Registration/ImageRegistration7.cxx +++ b/Examples/Registration/ImageRegistration7.cxx @@ -492,7 +492,7 @@ int main( int argc, char *argv[] ) resampler->SetOutputDirection( fixedImage->GetDirection() ); resampler->SetDefaultPixelValue( 100 ); - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Registration/ImageRegistration8.cxx b/Examples/Registration/ImageRegistration8.cxx index 62afbdc3cde..833bebd99da 100644 --- a/Examples/Registration/ImageRegistration8.cxx +++ b/Examples/Registration/ImageRegistration8.cxx @@ -515,7 +515,7 @@ int main( int argc, char *argv[] ) resampler->SetOutputDirection( fixedImage->GetDirection() ); resampler->SetDefaultPixelValue( 100 ); - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::CastImageFilter< FixedImageType, OutputImageType > CastFilterType; typedef itk::ImageFileWriter< OutputImageType > WriterType; diff --git a/Examples/Registration/ImageRegistration9.cxx b/Examples/Registration/ImageRegistration9.cxx index 3b852c2bb0e..5407e432fbe 100644 --- a/Examples/Registration/ImageRegistration9.cxx +++ b/Examples/Registration/ImageRegistration9.cxx @@ -545,7 +545,7 @@ int main( int argc, char *argv[] ) resampler->SetOutputDirection( fixedImage->GetDirection() ); resampler->SetDefaultPixelValue( 100 ); - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Registration/ImageRegistrationHistogramPlotter.cxx b/Examples/Registration/ImageRegistrationHistogramPlotter.cxx index 998b90dfccd..3328648d796 100644 --- a/Examples/Registration/ImageRegistrationHistogramPlotter.cxx +++ b/Examples/Registration/ImageRegistrationHistogramPlotter.cxx @@ -134,7 +134,7 @@ template< class TInput > class RescaleDynamicRangeFunctor { public: - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; RescaleDynamicRangeFunctor() {}; ~RescaleDynamicRangeFunctor() {}; inline OutputPixelType operator()( const TInput &A ) @@ -312,7 +312,7 @@ class HistogramWriter //Write the joint histogram as outputFilename. Also intensity window //the image by lower and upper thresholds and rescale the image to //8 bits. - typedef itk::Image< unsigned char, Dimension > RescaledOutputImageType; + typedef itk::Image< uint8_t, Dimension > RescaledOutputImageType; typedef RescaleDynamicRangeFunctor< OutputPixelType @@ -473,7 +473,7 @@ int main( int argc, char *argv[] ) return EXIT_FAILURE; } - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 2; @@ -680,7 +680,7 @@ int main( int argc, char *argv[] ) resample->SetDefaultPixelValue( 100 ); - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Registration/IterativeClosestPoint3.cxx b/Examples/Registration/IterativeClosestPoint3.cxx index b7a9912b6fc..4ac0ca03594 100644 --- a/Examples/Registration/IterativeClosestPoint3.cxx +++ b/Examples/Registration/IterativeClosestPoint3.cxx @@ -197,7 +197,7 @@ int main(int argc, char * argv[] ) // filter expects an image as input. // //------------------------------------------------- - typedef itk::Image< unsigned char, Dimension > BinaryImageType; + typedef itk::Image< uint8_t, Dimension > BinaryImageType; typedef itk::PointSetToImageFilter< PointSetType, @@ -222,7 +222,7 @@ int main(int argc, char * argv[] ) BinaryImageType::Pointer binaryImage = pointsToImageFilter->GetOutput(); - typedef itk::Image< unsigned short, Dimension > DistanceImageType; + typedef itk::Image< uint16_t, Dimension > DistanceImageType; typedef itk::DanielssonDistanceMapImageFilter< BinaryImageType, diff --git a/Examples/Registration/LandmarkWarping2.cxx b/Examples/Registration/LandmarkWarping2.cxx index 88d1ae5ec5a..bda4493e037 100644 --- a/Examples/Registration/LandmarkWarping2.cxx +++ b/Examples/Registration/LandmarkWarping2.cxx @@ -58,7 +58,7 @@ int main( int argc, char * argv[] ) typedef itk::Image< VectorType, Dimension > DisplacementFieldType; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; diff --git a/Examples/Registration/MeanSquaresImageMetric1.cxx b/Examples/Registration/MeanSquaresImageMetric1.cxx index e547b8f3d2a..08c13bdfec9 100644 --- a/Examples/Registration/MeanSquaresImageMetric1.cxx +++ b/Examples/Registration/MeanSquaresImageMetric1.cxx @@ -71,7 +71,7 @@ int main( int argc, char * argv[] ) // Software Guide : BeginCodeSnippet const unsigned int Dimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > ImageType; // Software Guide : EndCodeSnippet diff --git a/Examples/Registration/ModelToImageRegistration2.cxx b/Examples/Registration/ModelToImageRegistration2.cxx index 379638bd84e..ea977a373bb 100644 --- a/Examples/Registration/ModelToImageRegistration2.cxx +++ b/Examples/Registration/ModelToImageRegistration2.cxx @@ -143,7 +143,7 @@ int main( int argc, char * argv [] ) const unsigned int Dimension = 2; - typedef unsigned char MaskPixelType; + typedef uint8_t MaskPixelType; typedef itk::Image< MaskPixelType, Dimension > MaskImageType; @@ -163,11 +163,11 @@ int main( int argc, char * argv [] ) FixedPointSetType > NarrowBandFilterType; - typedef signed short PixelType; + typedef int16_t PixelType; typedef itk::Image< PixelType, Dimension > ImageType; - typedef unsigned char MaskPixelType; + typedef uint8_t MaskPixelType; typedef itk::Image< MaskPixelType, Dimension > MaskImageType; diff --git a/Examples/Registration/MultiResImageRegistration1.cxx b/Examples/Registration/MultiResImageRegistration1.cxx index f91523ed831..a02a63394cf 100644 --- a/Examples/Registration/MultiResImageRegistration1.cxx +++ b/Examples/Registration/MultiResImageRegistration1.cxx @@ -300,7 +300,7 @@ int main( int argc, char *argv[] ) } const unsigned int Dimension = 2; - typedef unsigned short PixelType; + typedef uint16_t PixelType; const std::string fixedImageFile = argv[1]; const std::string movingImageFile = argv[2]; @@ -629,7 +629,7 @@ int main( int argc, char *argv[] ) resample->SetDefaultPixelValue( backgroundGrayLevel ); - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Registration/MultiResImageRegistration2.cxx b/Examples/Registration/MultiResImageRegistration2.cxx index ac6576779b2..42103095713 100644 --- a/Examples/Registration/MultiResImageRegistration2.cxx +++ b/Examples/Registration/MultiResImageRegistration2.cxx @@ -175,7 +175,7 @@ int main( int argc, char *argv[] ) } const unsigned int Dimension = 2; - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; @@ -552,7 +552,7 @@ int main( int argc, char *argv[] ) resample->SetOutputDirection( fixedImage->GetDirection() ); resample->SetDefaultPixelValue( backgroundGrayLevel ); - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::CastImageFilter< FixedImageType, diff --git a/Examples/Registration/MultiResImageRegistration3.cxx b/Examples/Registration/MultiResImageRegistration3.cxx index aa06cab306a..edf42662a2f 100644 --- a/Examples/Registration/MultiResImageRegistration3.cxx +++ b/Examples/Registration/MultiResImageRegistration3.cxx @@ -140,7 +140,7 @@ int main( int argc, char *argv[] ) } const unsigned int Dimension = 3; - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; @@ -337,7 +337,7 @@ int main( int argc, char *argv[] ) resample->SetDefaultPixelValue( backgroundGrayLevel ); - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Registration/ThinPlateSplineWarp.cxx b/Examples/Registration/ThinPlateSplineWarp.cxx index 54429aa111e..24c19751be7 100644 --- a/Examples/Registration/ThinPlateSplineWarp.cxx +++ b/Examples/Registration/ThinPlateSplineWarp.cxx @@ -52,7 +52,7 @@ int main( int argc, char * argv[] ) const unsigned int ImageDimension = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, ImageDimension > InputImageType; typedef itk::ImageFileReader< InputImageType > ReaderType; typedef itk::ImageFileWriter< InputImageType > DeformedImageWriterType; diff --git a/Examples/Segmentation/CannySegmentationLevelSetImageFilter.cxx b/Examples/Segmentation/CannySegmentationLevelSetImageFilter.cxx index a2a8c848d7b..68ca1b917e4 100644 --- a/Examples/Segmentation/CannySegmentationLevelSetImageFilter.cxx +++ b/Examples/Segmentation/CannySegmentationLevelSetImageFilter.cxx @@ -120,7 +120,7 @@ int main( int argc, char *argv[] ) typedef itk::Image< InternalPixelType, Dimension > InternalImageType; // Software Guide : EndCodeSnippet - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::BinaryThresholdImageFilter< InternalImageType, diff --git a/Examples/Segmentation/ConfidenceConnected.cxx b/Examples/Segmentation/ConfidenceConnected.cxx index b8e93c23b43..97c061a1fd6 100644 --- a/Examples/Segmentation/ConfidenceConnected.cxx +++ b/Examples/Segmentation/ConfidenceConnected.cxx @@ -126,7 +126,7 @@ int main( int argc, char *argv[] ) typedef itk::Image< InternalPixelType, Dimension > InternalImageType; // Software Guide : EndCodeSnippet - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::CastImageFilter< InternalImageType, OutputImageType > diff --git a/Examples/Segmentation/ConfidenceConnected3D.cxx b/Examples/Segmentation/ConfidenceConnected3D.cxx index 8575d5b68f4..102fb58105a 100644 --- a/Examples/Segmentation/ConfidenceConnected3D.cxx +++ b/Examples/Segmentation/ConfidenceConnected3D.cxx @@ -52,7 +52,7 @@ int main( int argc, char *argv[] ) const unsigned int Dimension = 3; typedef itk::Image< InternalPixelType, Dimension > InternalImageType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::CastImageFilter< InternalImageType, OutputImageType > diff --git a/Examples/Segmentation/ConnectedThresholdImageFilter.cxx b/Examples/Segmentation/ConnectedThresholdImageFilter.cxx index 5fdfb2411cc..f710fa7e543 100644 --- a/Examples/Segmentation/ConnectedThresholdImageFilter.cxx +++ b/Examples/Segmentation/ConnectedThresholdImageFilter.cxx @@ -119,7 +119,7 @@ int main( int argc, char *argv[]) // Software Guide : EndCodeSnippet - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::CastImageFilter< InternalImageType, OutputImageType > CastingFilterType; diff --git a/Examples/Segmentation/CurvesLevelSetImageFilter.cxx b/Examples/Segmentation/CurvesLevelSetImageFilter.cxx index c52703b03df..ec830377e3e 100644 --- a/Examples/Segmentation/CurvesLevelSetImageFilter.cxx +++ b/Examples/Segmentation/CurvesLevelSetImageFilter.cxx @@ -125,7 +125,7 @@ int main( int argc, char *argv[] ) // process the final level set at the output of the // CurvesLevelSetImageFilter. // - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::BinaryThresholdImageFilter< InternalImageType, diff --git a/Examples/Segmentation/FastMarchingImageFilter.cxx b/Examples/Segmentation/FastMarchingImageFilter.cxx index 6f489bd6102..1933606ef50 100644 --- a/Examples/Segmentation/FastMarchingImageFilter.cxx +++ b/Examples/Segmentation/FastMarchingImageFilter.cxx @@ -202,7 +202,7 @@ int main( int argc, char *argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; // Software Guide : EndCodeSnippet diff --git a/Examples/Segmentation/GeodesicActiveContourImageFilter.cxx b/Examples/Segmentation/GeodesicActiveContourImageFilter.cxx index 8c7c272f95d..b9b993b27fb 100644 --- a/Examples/Segmentation/GeodesicActiveContourImageFilter.cxx +++ b/Examples/Segmentation/GeodesicActiveContourImageFilter.cxx @@ -146,7 +146,7 @@ int main( int argc, char *argv[] ) // process the final level set at the output of the // GeodesicActiveContourLevelSetImageFilter. // - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::BinaryThresholdImageFilter< InternalImageType, diff --git a/Examples/Segmentation/GeodesicActiveContourShapePriorLevelSetImageFilter.cxx b/Examples/Segmentation/GeodesicActiveContourShapePriorLevelSetImageFilter.cxx index 78547658425..64faa5f2128 100644 --- a/Examples/Segmentation/GeodesicActiveContourShapePriorLevelSetImageFilter.cxx +++ b/Examples/Segmentation/GeodesicActiveContourShapePriorLevelSetImageFilter.cxx @@ -228,7 +228,7 @@ int main( int argc, char *argv[] ) // process the final level set at the output of the // GeodesicActiveContourLevelSetImageFilter. // - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::BinaryThresholdImageFilter< InternalImageType, diff --git a/Examples/Segmentation/GibbsPriorImageFilter1.cxx b/Examples/Segmentation/GibbsPriorImageFilter1.cxx index 3c174491032..3f0309eefaf 100644 --- a/Examples/Segmentation/GibbsPriorImageFilter1.cxx +++ b/Examples/Segmentation/GibbsPriorImageFilter1.cxx @@ -70,10 +70,10 @@ int main( int argc, char *argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - const unsigned short NUMBANDS = 1; - const unsigned short NDIMENSION = 3; + const uint16_t NUMBANDS = 1; + const uint16_t NDIMENSION = 3; - typedef itk::Image,NDIMENSION> VecImageType; + typedef itk::Image,NDIMENSION> VecImageType; // Software Guide : EndCodeSnippet // Software Guide : BeginLatex @@ -82,12 +82,12 @@ int main( int argc, char *argv[] ) // segmentation that yields a sample of tissue from a region to be // segmented, which will be combined to form the input for the // isocontouring method. We define the pixel type of the output of the - // Gibbs prior filter to be \code{unsigned short}. + // Gibbs prior filter to be \code{uint16_t}. // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef itk::Image< unsigned short, NDIMENSION > ClassImageType; + typedef itk::Image< uint16_t, NDIMENSION > ClassImageType; // Software Guide : EndCodeSnippet diff --git a/Examples/Segmentation/HoughTransform2DCirclesImageFilter.cxx b/Examples/Segmentation/HoughTransform2DCirclesImageFilter.cxx index dc794f8290f..6dc8b50c243 100644 --- a/Examples/Segmentation/HoughTransform2DCirclesImageFilter.cxx +++ b/Examples/Segmentation/HoughTransform2DCirclesImageFilter.cxx @@ -69,7 +69,7 @@ int main( int argc, char *argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef float AccumulatorPixelType; const unsigned int Dimension = 2; typedef itk::Image< PixelType, Dimension > ImageType; @@ -186,7 +186,7 @@ int main( int argc, char *argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; OutputImageType::Pointer localOutputImage = OutputImageType::New(); diff --git a/Examples/Segmentation/HoughTransform2DLinesImageFilter.cxx b/Examples/Segmentation/HoughTransform2DLinesImageFilter.cxx index d64fe1e7919..d71ae4d4cca 100644 --- a/Examples/Segmentation/HoughTransform2DLinesImageFilter.cxx +++ b/Examples/Segmentation/HoughTransform2DLinesImageFilter.cxx @@ -64,7 +64,7 @@ int main( int argc, char *argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef float AccumulatorPixelType; const unsigned int Dimension = 2; @@ -136,8 +136,8 @@ int main( int argc, char *argv[] ) threshFilter->SetInput( gradFilter->GetOutput()); threshFilter->SetOutsideValue(0); - unsigned char threshBelow = 0; - unsigned char threshAbove = 255; + uint8_t threshBelow = 0; + uint8_t threshAbove = 255; threshFilter->ThresholdOutside(threshBelow,threshAbove); threshFilter->Update(); // Software Guide : EndCodeSnippet @@ -207,7 +207,7 @@ int main( int argc, char *argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; OutputImageType::Pointer localOutputImage = OutputImageType::New(); diff --git a/Examples/Segmentation/IsolatedConnectedImageFilter.cxx b/Examples/Segmentation/IsolatedConnectedImageFilter.cxx index 46a324d169f..98159b42fa2 100644 --- a/Examples/Segmentation/IsolatedConnectedImageFilter.cxx +++ b/Examples/Segmentation/IsolatedConnectedImageFilter.cxx @@ -84,7 +84,7 @@ int main( int argc, char *argv[] ) // Software Guide : EndCodeSnippet - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::CastImageFilter< InternalImageType, OutputImageType > CastingFilterType; diff --git a/Examples/Segmentation/LaplacianSegmentationLevelSetImageFilter.cxx b/Examples/Segmentation/LaplacianSegmentationLevelSetImageFilter.cxx index 98052279300..f60bda0a42f 100644 --- a/Examples/Segmentation/LaplacianSegmentationLevelSetImageFilter.cxx +++ b/Examples/Segmentation/LaplacianSegmentationLevelSetImageFilter.cxx @@ -111,7 +111,7 @@ int main( int argc, char *argv[] ) typedef itk::Image< InternalPixelType, Dimension > InternalImageType; // Software Guide : EndCodeSnippet - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::BinaryThresholdImageFilter< InternalImageType, diff --git a/Examples/Segmentation/NeighborhoodConnectedImageFilter.cxx b/Examples/Segmentation/NeighborhoodConnectedImageFilter.cxx index fcfe0f5bb91..abbd601bf23 100644 --- a/Examples/Segmentation/NeighborhoodConnectedImageFilter.cxx +++ b/Examples/Segmentation/NeighborhoodConnectedImageFilter.cxx @@ -89,7 +89,7 @@ int main( int argc, char *argv[] ) // Software Guide : EndCodeSnippet - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::CastImageFilter< InternalImageType, OutputImageType > diff --git a/Examples/Segmentation/RelabelComponentImageFilter.cxx b/Examples/Segmentation/RelabelComponentImageFilter.cxx index f6c9066e636..d738db539ee 100644 --- a/Examples/Segmentation/RelabelComponentImageFilter.cxx +++ b/Examples/Segmentation/RelabelComponentImageFilter.cxx @@ -63,8 +63,8 @@ int main( int argc, char * argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Examples/Segmentation/ShapeDetectionLevelSetFilter.cxx b/Examples/Segmentation/ShapeDetectionLevelSetFilter.cxx index d68704099fe..44c1411e8ff 100644 --- a/Examples/Segmentation/ShapeDetectionLevelSetFilter.cxx +++ b/Examples/Segmentation/ShapeDetectionLevelSetFilter.cxx @@ -188,7 +188,7 @@ int main( int argc, char *argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; // Software Guide : EndCodeSnippet diff --git a/Examples/Segmentation/ThresholdSegmentationLevelSetImageFilter.cxx b/Examples/Segmentation/ThresholdSegmentationLevelSetImageFilter.cxx index dd09d224ec0..a8acbc9c108 100644 --- a/Examples/Segmentation/ThresholdSegmentationLevelSetImageFilter.cxx +++ b/Examples/Segmentation/ThresholdSegmentationLevelSetImageFilter.cxx @@ -132,7 +132,7 @@ int main( int argc, char *argv[] ) typedef itk::Image< InternalPixelType, Dimension > InternalImageType; // Software Guide : EndCodeSnippet - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::BinaryThresholdImageFilter ThresholdingFilterType; diff --git a/Examples/Segmentation/VectorConfidenceConnected.cxx b/Examples/Segmentation/VectorConfidenceConnected.cxx index eeeb016dcb9..5c7c4458d22 100644 --- a/Examples/Segmentation/VectorConfidenceConnected.cxx +++ b/Examples/Segmentation/VectorConfidenceConnected.cxx @@ -78,13 +78,13 @@ int main( int argc, char *argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; typedef itk::RGBPixel< PixelComponentType > InputPixelType; const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; // Software Guide : EndCodeSnippet - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Examples/Segmentation/WatershedSegmentation1.cxx b/Examples/Segmentation/WatershedSegmentation1.cxx index 380ba9497aa..83fbe8ee59a 100644 --- a/Examples/Segmentation/WatershedSegmentation1.cxx +++ b/Examples/Segmentation/WatershedSegmentation1.cxx @@ -85,7 +85,7 @@ int main( int argc, char *argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef itk::RGBPixel RGBPixelType; + typedef itk::RGBPixel RGBPixelType; typedef itk::Image RGBImageType; typedef itk::Vector VectorPixelType; typedef itk::Image VectorImageType; diff --git a/Examples/Segmentation/WatershedSegmentation2.cxx b/Examples/Segmentation/WatershedSegmentation2.cxx index c445888b094..dbb71437965 100644 --- a/Examples/Segmentation/WatershedSegmentation2.cxx +++ b/Examples/Segmentation/WatershedSegmentation2.cxx @@ -45,7 +45,7 @@ int main( int argc, char *argv[] ) } typedef float InternalPixelType; - typedef itk::RGBPixel RGBPixelType; + typedef itk::RGBPixel RGBPixelType; const unsigned int Dimension = 3; diff --git a/Examples/SpatialObjects/ImageMaskSpatialObject.cxx b/Examples/SpatialObjects/ImageMaskSpatialObject.cxx index 54022cf0878..68ba200c997 100644 --- a/Examples/SpatialObjects/ImageMaskSpatialObject.cxx +++ b/Examples/SpatialObjects/ImageMaskSpatialObject.cxx @@ -27,7 +27,7 @@ // intensity in the image is not zero. // // The supported pixel types does not include \doxygen{RGBPixel}, \doxygen{RGBAPixel}, etc... -// So far it only allows to manage images of simple types like unsigned short, +// So far it only allows to manage images of simple types like uint16_t, // unsigned int, or \doxygen{Vector}. // Let's begin by including the appropriate header file. // diff --git a/Examples/SpatialObjects/MeshSpatialObject.cxx b/Examples/SpatialObjects/MeshSpatialObject.cxx index b41711f7749..12801c3ef29 100644 --- a/Examples/SpatialObjects/MeshSpatialObject.cxx +++ b/Examples/SpatialObjects/MeshSpatialObject.cxx @@ -173,7 +173,7 @@ int main(int, char * [] ) // First we define and instantiate the SpatialObjectToImageFilter. // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::GroupSpatialObject<3> GroupType; typedef itk::SpatialObjectToImageFilter< GroupType, ImageType > SpatialObjectToImageFilterType; diff --git a/Examples/SpatialObjects/SpatialObjectToImageStatisticsCalculator.cxx b/Examples/SpatialObjects/SpatialObjectToImageStatisticsCalculator.cxx index e1f7db7283f..fc98d3726ae 100644 --- a/Examples/SpatialObjects/SpatialObjectToImageStatisticsCalculator.cxx +++ b/Examples/SpatialObjects/SpatialObjectToImageStatisticsCalculator.cxx @@ -40,7 +40,7 @@ int main(int, char * [] ) // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::RandomImageSource RandomImageSourceType; RandomImageSourceType::Pointer randomImageSource = RandomImageSourceType::New(); ImageType::SizeValueType size[2]; diff --git a/Examples/Statistics/BayesianClassifier.cxx b/Examples/Statistics/BayesianClassifier.cxx index 0d4872c4c7a..a6dec6626f4 100644 --- a/Examples/Statistics/BayesianClassifier.cxx +++ b/Examples/Statistics/BayesianClassifier.cxx @@ -23,7 +23,7 @@ // This image is conveniently generated by the BayesianClassifierInitializer.cxx // example. // -// The output of the filter is a label map (an image of unsigned char's) with +// The output of the filter is a label map (an image of uint8_t's) with // pixel values indicating the classes they correspond to. Pixels with intensity 0 // belong to the 0th class, 1 belong to the 1st class etc.... The classification // is done by applying a Maximum decision rule to the posterior image. @@ -76,7 +76,7 @@ int main(int argc, char* argv[] ) ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( membershipImageFileName ); - typedef unsigned char LabelType; + typedef uint8_t LabelType; typedef float PriorType; typedef float PosteriorType; @@ -113,7 +113,7 @@ int main(int argc, char* argv[] ) // datatype and write it // typedef ClassifierFilterType::OutputImageType ClassifierOutputImageType; - typedef itk::Image< unsigned char, Dimension > OutputImageType; + typedef itk::Image< uint8_t, Dimension > OutputImageType; typedef itk::RescaleIntensityImageFilter< ClassifierOutputImageType, OutputImageType > RescalerType; RescalerType::Pointer rescaler = RescalerType::New(); diff --git a/Examples/Statistics/BayesianClassifierInitializer.cxx b/Examples/Statistics/BayesianClassifierInitializer.cxx index 08e42f6c697..86f50357536 100644 --- a/Examples/Statistics/BayesianClassifierInitializer.cxx +++ b/Examples/Statistics/BayesianClassifierInitializer.cxx @@ -69,7 +69,7 @@ int main(int argc, char *argv[]) return EXIT_FAILURE; } - typedef itk::Image< unsigned char, Dimension > ImageType; + typedef itk::Image< uint8_t, Dimension > ImageType; typedef itk::BayesianClassifierInitializationImageFilter< ImageType > BayesianInitializerType; BayesianInitializerType::Pointer bayesianInitializer @@ -153,7 +153,7 @@ int main(int argc, char *argv[]) } // Write out the rescaled extracted component - typedef itk::Image< unsigned char, Dimension > OutputImageType; + typedef itk::Image< uint8_t, Dimension > OutputImageType; typedef itk::RescaleIntensityImageFilter< ExtractedComponentImageType, OutputImageType > RescalerType; RescalerType::Pointer rescaler = RescalerType::New(); diff --git a/Examples/Statistics/ImageEntropy1.cxx b/Examples/Statistics/ImageEntropy1.cxx index 29933a02f8b..bea0920d941 100644 --- a/Examples/Statistics/ImageEntropy1.cxx +++ b/Examples/Statistics/ImageEntropy1.cxx @@ -77,7 +77,7 @@ int main( int argc, char * argv [] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Examples/Statistics/ImageHistogram1.cxx b/Examples/Statistics/ImageHistogram1.cxx index 98c0cbcac3e..21d15f26d7d 100644 --- a/Examples/Statistics/ImageHistogram1.cxx +++ b/Examples/Statistics/ImageHistogram1.cxx @@ -74,7 +74,7 @@ int main( int argc, char * argv [] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 2; typedef itk::Image ImageType; diff --git a/Examples/Statistics/ImageHistogram2.cxx b/Examples/Statistics/ImageHistogram2.cxx index 843366d412b..d032efb3a98 100644 --- a/Examples/Statistics/ImageHistogram2.cxx +++ b/Examples/Statistics/ImageHistogram2.cxx @@ -70,7 +70,7 @@ int main( int argc, char * argv [] ) // Software Guide : BeginCodeSnippet - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 2; typedef itk::Image ImageType; diff --git a/Examples/Statistics/ImageHistogram3.cxx b/Examples/Statistics/ImageHistogram3.cxx index 8fb74537a87..4fdab8014d6 100644 --- a/Examples/Statistics/ImageHistogram3.cxx +++ b/Examples/Statistics/ImageHistogram3.cxx @@ -71,7 +71,7 @@ int main( int argc, char * argv [] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; typedef itk::RGBPixel< PixelComponentType > RGBPixelType; diff --git a/Examples/Statistics/ImageHistogram4.cxx b/Examples/Statistics/ImageHistogram4.cxx index 8654214410e..158bbfe0f52 100644 --- a/Examples/Statistics/ImageHistogram4.cxx +++ b/Examples/Statistics/ImageHistogram4.cxx @@ -79,7 +79,7 @@ int main( int argc, char * argv [] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; typedef itk::RGBPixel< PixelComponentType > RGBPixelType; diff --git a/Examples/Statistics/ImageMutualInformation1.cxx b/Examples/Statistics/ImageMutualInformation1.cxx index 62e28277967..08e314ee5be 100644 --- a/Examples/Statistics/ImageMutualInformation1.cxx +++ b/Examples/Statistics/ImageMutualInformation1.cxx @@ -105,7 +105,7 @@ int main( int argc, char * argv [] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; const unsigned int Dimension = 2; typedef itk::Image< PixelComponentType, Dimension > ImageType; diff --git a/Examples/Statistics/ScalarImageKmeansClassifier.cxx b/Examples/Statistics/ScalarImageKmeansClassifier.cxx index 026c0847ac3..5c25f93b92c 100644 --- a/Examples/Statistics/ScalarImageKmeansClassifier.cxx +++ b/Examples/Statistics/ScalarImageKmeansClassifier.cxx @@ -69,7 +69,7 @@ int main( int argc, char * argv [] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef signed short PixelType; + typedef int16_t PixelType; const unsigned int Dimension = 2; typedef itk::Image ImageType; diff --git a/Examples/Statistics/ScalarImageKmeansModelEstimator.cxx b/Examples/Statistics/ScalarImageKmeansModelEstimator.cxx index c00a2e66aad..7d992c762c0 100644 --- a/Examples/Statistics/ScalarImageKmeansModelEstimator.cxx +++ b/Examples/Statistics/ScalarImageKmeansModelEstimator.cxx @@ -57,7 +57,7 @@ int main( int argc, char * argv [] ) } - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 2; typedef itk::Image ImageType; diff --git a/Examples/Statistics/ScalarImageMarkovRandomField1.cxx b/Examples/Statistics/ScalarImageMarkovRandomField1.cxx index 3f788560c4e..2d110968162 100644 --- a/Examples/Statistics/ScalarImageMarkovRandomField1.cxx +++ b/Examples/Statistics/ScalarImageMarkovRandomField1.cxx @@ -109,13 +109,13 @@ int main( int argc, char * argv [] ) // classify. With this image type we can also declare the // \doxygen{ImageFileReader} needed for reading the input image, create one and // set its input filename. In this particular case we choose to use - // \code{signed short} as pixel type, which is typical for MicroMRI and CT data + // \code{int16_t} as pixel type, which is typical for MicroMRI and CT data // sets. // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef signed short PixelType; + typedef int16_t PixelType; const unsigned int Dimension = 2; typedef itk::Image ImageType; @@ -137,7 +137,7 @@ int main( int argc, char * argv [] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef unsigned char LabelPixelType; + typedef uint8_t LabelPixelType; typedef itk::Image LabelImageType; @@ -419,7 +419,7 @@ int main( int argc, char * argv [] ) // Software Guide : EndCodeSnippet // Rescale outputs to the dynamic range of the display - typedef itk::Image< unsigned char, Dimension > RescaledOutputImageType; + typedef itk::Image< uint8_t, Dimension > RescaledOutputImageType; typedef itk::RescaleIntensityImageFilter< OutputImageType, RescaledOutputImageType > RescalerType; diff --git a/Modules/Bridge/VTK/include/itkVTKImageExport.h b/Modules/Bridge/VTK/include/itkVTKImageExport.h index 5ffd45350dd..5ef8d60f4b2 100644 --- a/Modules/Bridge/VTK/include/itkVTKImageExport.h +++ b/Modules/Bridge/VTK/include/itkVTKImageExport.h @@ -40,7 +40,7 @@ namespace itk * * Note that not all image types will work correctly. VTK will only * support images of 1, 2, or 3 dimensions. Scalar value types can be - * one of: float, double, char, unsigned char, short, unsigned short, + * one of: float, double, char, uint8_t, short, uint16_t, * int, unsigned int, long, unsigned long. * * Currently VTKImageExport does not support pixel types with multiple diff --git a/Modules/Bridge/VTK/include/itkVTKImageExport.hxx b/Modules/Bridge/VTK/include/itkVTKImageExport.hxx index 2101034b1c1..578cb944682 100644 --- a/Modules/Bridge/VTK/include/itkVTKImageExport.hxx +++ b/Modules/Bridge/VTK/include/itkVTKImageExport.hxx @@ -62,21 +62,21 @@ VTKImageExport< TInputImage >::VTKImageExport() { m_ScalarTypeName = "short"; } - else if ( typeid( ScalarType ) == typeid( unsigned short ) ) + else if ( typeid( ScalarType ) == typeid( uint16_t ) ) { - m_ScalarTypeName = "unsigned short"; + m_ScalarTypeName = "uint16_t"; } else if ( typeid( ScalarType ) == typeid( char ) ) { m_ScalarTypeName = "char"; } - else if ( typeid( ScalarType ) == typeid( unsigned char ) ) + else if ( typeid( ScalarType ) == typeid( uint8_t ) ) { - m_ScalarTypeName = "unsigned char"; + m_ScalarTypeName = "uint8_t"; } - else if ( typeid( ScalarType ) == typeid( signed char ) ) + else if ( typeid( ScalarType ) == typeid( int8_t ) ) { - m_ScalarTypeName = "signed char"; + m_ScalarTypeName = "int8_t"; } else { diff --git a/Modules/Bridge/VTK/include/itkVTKImageImport.h b/Modules/Bridge/VTK/include/itkVTKImageImport.h index c2155bcd66a..e758cea3697 100644 --- a/Modules/Bridge/VTK/include/itkVTKImageImport.h +++ b/Modules/Bridge/VTK/include/itkVTKImageImport.h @@ -44,8 +44,8 @@ namespace itk * through the ITK pipeline are automatically propagated to the VTK pipeline. * * Note that the VTK images are assumed to be of 1, 2, or 3 dimensions. - * Scalar value types can be one of: float, double, char, unsigned char, - * short, unsigned short, int, unsigned int, long, unsigned long. The + * Scalar value types can be one of: float, double, char, uint8_t, + * short, uint16_t, int, unsigned int, long, unsigned long. The * images must have pixel types with one component. * * \ingroup IOFilters diff --git a/Modules/Bridge/VTK/include/itkVTKImageImport.hxx b/Modules/Bridge/VTK/include/itkVTKImageImport.hxx index 48453abd9d8..a9bc5fbceb4 100644 --- a/Modules/Bridge/VTK/include/itkVTKImageImport.hxx +++ b/Modules/Bridge/VTK/include/itkVTKImageImport.hxx @@ -58,21 +58,21 @@ VTKImageImport< TOutputImage > { m_ScalarTypeName = "short"; } - else if ( typeid( ScalarType ) == typeid( unsigned short ) ) + else if ( typeid( ScalarType ) == typeid( uint16_t ) ) { - m_ScalarTypeName = "unsigned short"; + m_ScalarTypeName = "uint16_t"; } else if ( typeid( ScalarType ) == typeid( char ) ) { m_ScalarTypeName = "char"; } - else if ( typeid( ScalarType ) == typeid( signed char ) ) + else if ( typeid( ScalarType ) == typeid( int8_t ) ) { - m_ScalarTypeName = "signed char"; + m_ScalarTypeName = "int8_t"; } - else if ( typeid( ScalarType ) == typeid( unsigned char ) ) + else if ( typeid( ScalarType ) == typeid( uint8_t ) ) { - m_ScalarTypeName = "unsigned char"; + m_ScalarTypeName = "uint8_t"; } else { diff --git a/Modules/Bridge/VtkGlue/include/QuickView.h b/Modules/Bridge/VtkGlue/include/QuickView.h index b68c4b2a2b5..ec9017614a0 100644 --- a/Modules/Bridge/VtkGlue/include/QuickView.h +++ b/Modules/Bridge/VtkGlue/include/QuickView.h @@ -33,7 +33,7 @@ class ImageInfo { public: - typedef itk::Image ImageType; + typedef itk::Image ImageType; ImageInfo(ImageType *image, std::string description="") { @@ -52,7 +52,7 @@ class ImageInfo class RGBImageInfo { public: - typedef itk::Image, 2> ImageType; + typedef itk::Image, 2> ImageType; RGBImageInfo(ImageType *image, std::string description="") { m_Image = image; diff --git a/Modules/Bridge/VtkGlue/src/QuickView.cxx b/Modules/Bridge/VtkGlue/src/QuickView.cxx index 201a1d42876..1b79d58ff4e 100644 --- a/Modules/Bridge/VtkGlue/src/QuickView.cxx +++ b/Modules/Bridge/VtkGlue/src/QuickView.cxx @@ -43,12 +43,12 @@ #include "itkImageToVTKImageFilter.h" -typedef itk::Image, 2> UnsignedCharRGBImageType; +typedef itk::Image, 2> UnsignedCharRGBImageType; typedef itk::Image, 2> FloatRGBImageType; -typedef itk::Image UnsignedCharImageType; +typedef itk::Image UnsignedCharImageType; typedef itk::Image CharImageType; -typedef itk::Image UnsignedShortImageType; +typedef itk::Image UnsignedShortImageType; typedef itk::Image ShortImageType; typedef itk::Image UnsignedIntImageType; typedef itk::Image IntImageType; @@ -241,9 +241,9 @@ void QuickView::Visualize(bool interact) double step = 1./(static_cast(numberOfImages)); std::vector viewports; - typedef itk::ImageToVTKImageFilter > + typedef itk::ImageToVTKImageFilter > ConnectorType; - typedef itk::ImageToVTKImageFilter, 2> > + typedef itk::ImageToVTKImageFilter, 2> > RGBConnectorType; std::vector connectors; // Force the connectors to persist (not lose scope) after each iteration of the loop std::vector RGBconnectors; // Force the connectors to persist after each iteration of the loop diff --git a/Modules/Bridge/VtkGlue/test/QuickViewTest.cxx b/Modules/Bridge/VtkGlue/test/QuickViewTest.cxx index 2c7dac35dfc..644e9c5b44d 100644 --- a/Modules/Bridge/VtkGlue/test/QuickViewTest.cxx +++ b/Modules/Bridge/VtkGlue/test/QuickViewTest.cxx @@ -120,10 +120,10 @@ template void ViewRGB(const char *name, int QuickViewTest (int argc, char *argv[]) { - View("unsigned char", static_cast(0), true); - View("unsigned char", static_cast(0)); + View("uint8_t", static_cast(0), true); + View("uint8_t", static_cast(0)); View("char", char(0)); - View("unsigned short", static_cast(0)); + View("uint16_t", static_cast(0)); View("short", short(0)); View("unsigned int", static_cast(0)); View("int", int(0)); @@ -137,10 +137,10 @@ int QuickViewTest (int argc, char *argv[]) if (argc > 1) { - View("unsigned char", static_cast(0), false, argv[1]); - View("unsigned char", static_cast(0), false, argv[1], std::string("tif")); - View("unsigned char", static_cast(0), false, argv[1], std::string("jpg")); - View("unsigned char", static_cast(0), false, argv[1], std::string("bmp")); + View("uint8_t", static_cast(0), false, argv[1]); + View("uint8_t", static_cast(0), false, argv[1], std::string("tif")); + View("uint8_t", static_cast(0), false, argv[1], std::string("jpg")); + View("uint8_t", static_cast(0), false, argv[1], std::string("bmp")); } return EXIT_SUCCESS; diff --git a/Modules/Compatibility/Deprecated/include/itkAnalyzeDbh.h b/Modules/Compatibility/Deprecated/include/itkAnalyzeDbh.h index 6272c6f979f..8c71d7dcbb6 100644 --- a/Modules/Compatibility/Deprecated/include/itkAnalyzeDbh.h +++ b/Modules/Compatibility/Deprecated/include/itkAnalyzeDbh.h @@ -77,17 +77,17 @@ namespace itk enum DataTypeKeyValues { ANALYZE_DT_UNKNOWN =0, /**< Deontes that the data type is unknon */ ANALYZE_DT_BINARY =1, /**< Deontes that the data type is binary */ - ANALYZE_DT_UNSIGNED_CHAR=2, /**< Deontes that the data type is unsigned char */ - ANALYZE_DT_SIGNED_SHORT =4, /**< Deontes that the data type is signed short */ + ANALYZE_DT_UNSIGNED_CHAR=2, /**< Deontes that the data type is uint8_t */ + ANALYZE_DT_SIGNED_SHORT =4, /**< Deontes that the data type is int16_t */ ANALYZE_DT_SIGNED_INT =8, /**< Deontes that the data type is signed int */ ANALYZE_DT_FLOAT =16, /**< Deontes that the data type is single precision floating point */ ANALYZE_DT_COMPLEX =32, /**< Deontes that the data type is pairs of single precision floating point numbers */ ANALYZE_DT_DOUBLE =64, /**< Deontes that the data type is double precision floating point */ - ANALYZE_DT_RGB =128,/**< Deontes that the data type is triples of unsigned char */ + ANALYZE_DT_RGB =128,/**< Deontes that the data type is triples of uint8_t */ ANALYZE_DT_ALL =255,/**< Deontes that the data type is unknon */ - //Obsolete, using SPM, B2ANALYZE_DT_UNSIGNED_SHORT =6, /**< Deontes that the data type is unsigned short in brains2 analyze extensions*/ + //Obsolete, using SPM, B2ANALYZE_DT_UNSIGNED_SHORT =6, /**< Deontes that the data type is uint16_t in brains2 analyze extensions*/ //Obsolete, using SPM, B2ANALYZE_DT_UNSIGNED_INT =12, /**< Deontes that the data type is unsigned int in brains2 analyze extensions*/ - SPMANALYZE_DT_UNSIGNED_SHORT=132,/**< Deontes that the data type is unsigned short in SPM analyze extensions*/ + SPMANALYZE_DT_UNSIGNED_SHORT=132,/**< Deontes that the data type is uint16_t in SPM analyze extensions*/ SPMANALYZE_DT_UNSIGNED_INT =136 /**< Deontes that the data type is unsigned int in SPM analyze extensions*/ }; diff --git a/Modules/Compatibility/Deprecated/include/itkAnalyzeImageIO.h b/Modules/Compatibility/Deprecated/include/itkAnalyzeImageIO.h index badaebf5c4f..64e917c95ba 100644 --- a/Modules/Compatibility/Deprecated/include/itkAnalyzeImageIO.h +++ b/Modules/Compatibility/Deprecated/include/itkAnalyzeImageIO.h @@ -55,8 +55,8 @@ namespace itk * uncompressed voxel data for the images in one of the several * possible voxel formats: * - 1 bit packed binary (slices begin on byte boundaries) - * - 8 bit (unsigned char) gray scale unless .lkup file present - * - 16 bit signed short + * - 8 bit (uint8_t) gray scale unless .lkup file present + * - 16 bit int16_t * - 32 bit signed integers or float * - 24 bit RGB, 8 bits per channel * - a header file ([basename].hdr) diff --git a/Modules/Compatibility/Deprecated/include/itkBalloonForceFilter.h b/Modules/Compatibility/Deprecated/include/itkBalloonForceFilter.h index 2b712314807..43eff93fdb5 100644 --- a/Modules/Compatibility/Deprecated/include/itkBalloonForceFilter.h +++ b/Modules/Compatibility/Deprecated/include/itkBalloonForceFilter.h @@ -113,7 +113,7 @@ class ITK_EXPORT BalloonForceFilter:public MeshToMeshFilter< TInputMesh, TOutput typedef typename InputMeshType::PointType IPixelType; typedef typename InputMeshType::PixelType PixelType; - typedef Image< unsigned short, 2 > ImageType; + typedef Image< uint16_t, 2 > ImageType; typedef CovariantVector< PixelType, 2 > GradientType; typedef Image< GradientType, 2 > GradientImageType; typedef typename InputMeshType::Pointer InputMeshPointer; @@ -254,7 +254,7 @@ class ITK_EXPORT BalloonForceFilter:public MeshToMeshFilter< TInputMesh, TOutput // for Gibbs Prior Model parameters' recalculation ImagePointer m_ImageOutput; - unsigned short m_ObjectLabel; + uint16_t m_ObjectLabel; typedef ImageType::SizeType ImageSizeType; }; diff --git a/Modules/Compatibility/Deprecated/include/itkBalloonForceFilter.hxx b/Modules/Compatibility/Deprecated/include/itkBalloonForceFilter.hxx index 4cd780bcf9d..c53e5ea103a 100644 --- a/Modules/Compatibility/Deprecated/include/itkBalloonForceFilter.hxx +++ b/Modules/Compatibility/Deprecated/include/itkBalloonForceFilter.hxx @@ -421,7 +421,7 @@ BalloonForceFilter< TInputMesh, TOutputMesh > IPixelType x, y, z, f; float dist = 0.0; - unsigned short label; + uint16_t label; InputPointsContainerPointer Points = m_Locations->GetPoints(); InputPointsContainerIterator points = Points->Begin(); @@ -448,7 +448,7 @@ BalloonForceFilter< TInputMesh, TOutputMesh > coord[0] = (int)x[0]; coord[1] = (int)x[1]; - label = (unsigned short)m_Potential->GetPixel(coord); + label = (uint16_t)m_Potential->GetPixel(coord); if ( label != m_ObjectLabel ) { xs = ys = 0.0; @@ -550,7 +550,7 @@ BalloonForceFilter< TInputMesh, TOutputMesh > break; } - label = (unsigned short)m_Potential->GetPixel(extend); + label = (uint16_t)m_Potential->GetPixel(extend); if ( label != m_ObjectLabel ) { break; } t += 1.0; diff --git a/Modules/Compatibility/Deprecated/include/itkDICOMImageIO2.h b/Modules/Compatibility/Deprecated/include/itkDICOMImageIO2.h index 4a311257fcc..bce5f9bb788 100644 --- a/Modules/Compatibility/Deprecated/include/itkDICOMImageIO2.h +++ b/Modules/Compatibility/Deprecated/include/itkDICOMImageIO2.h @@ -63,7 +63,7 @@ class ITK_EXPORT DICOMImageIO2:public ImageIOBase virtual void Read(void *buffer); /** Compute the size (in bytes) of the components of a pixel. For - * example, and RGB pixel of unsigned char would have a + * example, and RGB pixel of uint8_t would have a * component size of 1 byte. */ // virtual unsigned int GetComponentSize() const; @@ -122,10 +122,10 @@ class ITK_EXPORT DICOMImageIO2:public ImageIOBase void ReadDataCallback(doublebyte group, doublebyte element, itkdicomparser::DICOMParser::VRTypes type, - unsigned char *val, + uint8_t *val, quadbyte len); - unsigned char *m_ImageDataBuffer; + uint8_t *m_ImageDataBuffer; private: DICOMImageIO2(const Self &); //purposely not implemented diff --git a/Modules/Compatibility/Deprecated/include/itkDeformableMesh3DFilter.h b/Modules/Compatibility/Deprecated/include/itkDeformableMesh3DFilter.h index bb258bf12d4..efdd5079536 100644 --- a/Modules/Compatibility/Deprecated/include/itkDeformableMesh3DFilter.h +++ b/Modules/Compatibility/Deprecated/include/itkDeformableMesh3DFilter.h @@ -105,7 +105,7 @@ class ITK_EXPORT DeformableMesh3DFilter:public MeshToMeshFilter< TInputMesh, TOu typedef typename InputMeshType::PixelType PixelType; /** Image and Image iterator definition. */ - typedef Image< unsigned char, 3 > PotentialImageType; + typedef Image< uint8_t, 3 > PotentialImageType; typedef ImageRegionIterator< PotentialImageType > PotentialIterator; typedef CovariantVector< PixelType, 3 > GradientType; typedef Image< GradientType, 3 > GradientImageType; @@ -150,8 +150,8 @@ class ITK_EXPORT DeformableMesh3DFilter:public MeshToMeshFilter< TInputMesh, TOu itkSetMacro(PotentialMagnitude, PixelType); itkSetMacro(GradientMagnitude, PixelType); - itkSetMacro(PotentialOn, unsigned short); - itkSetMacro(ObjectLabel, unsigned char); + itkSetMacro(PotentialOn, uint16_t); + itkSetMacro(ObjectLabel, uint8_t); itkGetConstMacro(Normals, InputMeshPointer); @@ -208,14 +208,14 @@ class ITK_EXPORT DeformableMesh3DFilter:public MeshToMeshFilter< TInputMesh, TOu int m_StepThreshold; /** This threshold decides when to stop the model. */ - unsigned short m_ModelXUpLimit; - unsigned short m_ModelXDownLimit; - unsigned short m_ModelYUpLimit; - unsigned short m_ModelYDownLimit; - unsigned short m_ModelZUpLimit; - unsigned short m_ModelZDownLimit; - unsigned short m_PotentialOn; - unsigned char m_ObjectLabel; + uint16_t m_ModelXUpLimit; + uint16_t m_ModelXDownLimit; + uint16_t m_ModelYUpLimit; + uint16_t m_ModelYDownLimit; + uint16_t m_ModelZUpLimit; + uint16_t m_ModelZDownLimit; + uint16_t m_PotentialOn; + uint8_t m_ObjectLabel; PixelType m_GradientMagnitude; PixelType m_PotentialMagnitude; diff --git a/Modules/Compatibility/Deprecated/include/itkDeformableMesh3DFilter.hxx b/Modules/Compatibility/Deprecated/include/itkDeformableMesh3DFilter.hxx index b6884a7f144..30678e3ae0b 100644 --- a/Modules/Compatibility/Deprecated/include/itkDeformableMesh3DFilter.hxx +++ b/Modules/Compatibility/Deprecated/include/itkDeformableMesh3DFilter.hxx @@ -78,7 +78,7 @@ DeformableMesh3DFilter< TInputMesh, TOutputMesh > os << indent << "TimeStep = " << m_TimeStep << std::endl; os << indent << "PotentialOn = " << m_PotentialOn << std::endl; os << indent << "ObjectLabel = " - << static_cast< typename NumericTraits< unsigned char >::PrintType >( m_ObjectLabel ) + << static_cast< typename NumericTraits< uint8_t >::PrintType >( m_ObjectLabel ) << std::endl; os << indent << "StepThreshold = " << m_StepThreshold << std::endl; if ( m_Normals ) diff --git a/Modules/Compatibility/Deprecated/src/itkAnalyzeImageIO.cxx b/Modules/Compatibility/Deprecated/src/itkAnalyzeImageIO.cxx index 1cecb051587..b4bd36747be 100644 --- a/Modules/Compatibility/Deprecated/src/itkAnalyzeImageIO.cxx +++ b/Modules/Compatibility/Deprecated/src/itkAnalyzeImageIO.cxx @@ -152,16 +152,16 @@ AnalyzeImageIO::SwapBytesIfNecessary(void *buffer, numberOfPixels ); break; case UCHAR: - ByteSwapper< unsigned char >::SwapRangeFromSystemToLittleEndian - ( (unsigned char *)buffer, numberOfPixels ); + ByteSwapper< uint8_t >::SwapRangeFromSystemToLittleEndian + ( (uint8_t *)buffer, numberOfPixels ); break; case SHORT: ByteSwapper< short >::SwapRangeFromSystemToLittleEndian ( (short *)buffer, numberOfPixels ); break; case USHORT: - ByteSwapper< unsigned short >::SwapRangeFromSystemToLittleEndian - ( (unsigned short *)buffer, numberOfPixels ); + ByteSwapper< uint16_t >::SwapRangeFromSystemToLittleEndian + ( (uint16_t *)buffer, numberOfPixels ); break; case INT: ByteSwapper< int >::SwapRangeFromSystemToLittleEndian @@ -200,16 +200,16 @@ AnalyzeImageIO::SwapBytesIfNecessary(void *buffer, numberOfPixels ); break; case UCHAR: - ByteSwapper< unsigned char >::SwapRangeFromSystemToBigEndian - ( (unsigned char *)buffer, numberOfPixels ); + ByteSwapper< uint8_t >::SwapRangeFromSystemToBigEndian + ( (uint8_t *)buffer, numberOfPixels ); break; case SHORT: ByteSwapper< short >::SwapRangeFromSystemToBigEndian ( (short *)buffer, numberOfPixels ); break; case USHORT: - ByteSwapper< unsigned short >::SwapRangeFromSystemToBigEndian - ( (unsigned short *)buffer, numberOfPixels ); + ByteSwapper< uint16_t >::SwapRangeFromSystemToBigEndian + ( (uint16_t *)buffer, numberOfPixels ); break; case INT: ByteSwapper< int >::SwapRangeFromSystemToBigEndian @@ -433,7 +433,7 @@ AnalyzeImageIO::AnalyzeImageIO() // Analyze stuff // memset sets the first n bytes in memory area s to the value of c - // (cothis->m_Hdr.dime.dim[4]erted to an unsigned char). It returns s. + // (cothis->m_Hdr.dime.dim[4]erted to an uint8_t). It returns s. // void *memset (void *s, int c, size_t n); memset( &( this->m_Hdr ), 0, sizeof( struct dsr ) ); @@ -1168,7 +1168,7 @@ ::WriteImageInformation(void) { if ( this->GetComponentType() != UCHAR ) { - itkExceptionMacro(<< "Only unsigned char RGB files supported"); + itkExceptionMacro(<< "Only uint8_t RGB files supported"); } } else diff --git a/Modules/Compatibility/Deprecated/src/itkDICOMImageIO2.cxx b/Modules/Compatibility/Deprecated/src/itkDICOMImageIO2.cxx index 6d6a18098e7..9b3b9a61a3f 100644 --- a/Modules/Compatibility/Deprecated/src/itkDICOMImageIO2.cxx +++ b/Modules/Compatibility/Deprecated/src/itkDICOMImageIO2.cxx @@ -64,7 +64,7 @@ bool DICOMImageIO2::CanReadFile(const char *filename) void DICOMImageIO2::ReadDataCallback(doublebyte, doublebyte, itkdicomparser::DICOMParser::VRTypes, - unsigned char *val, + uint8_t *val, quadbyte len) { unsigned int imageBytes = static_cast< unsigned int >( this->GetImageSizeInBytes() ); diff --git a/Modules/Compatibility/Deprecated/test/BigEndian_hdr.h b/Modules/Compatibility/Deprecated/test/BigEndian_hdr.h index 68b7ef35b52..e1716f4b8f1 100644 --- a/Modules/Compatibility/Deprecated/test/BigEndian_hdr.h +++ b/Modules/Compatibility/Deprecated/test/BigEndian_hdr.h @@ -18,7 +18,7 @@ #ifndef __BigEndian_hdr_h #define __BigEndian_hdr_h -static unsigned char BigEndian_hdr[] = { +static uint8_t BigEndian_hdr[] = { 0, 0, 1, 92, 70, 76, 79, 65, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 114, 0, 0, 4, 0, 6, 0, 6, 0, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, diff --git a/Modules/Compatibility/Deprecated/test/BigEndian_img.h b/Modules/Compatibility/Deprecated/test/BigEndian_img.h index 7b5a18c8725..4d9b3ff7cd3 100644 --- a/Modules/Compatibility/Deprecated/test/BigEndian_img.h +++ b/Modules/Compatibility/Deprecated/test/BigEndian_img.h @@ -18,7 +18,7 @@ #ifndef __BigEndian_img_h #define __BigEndian_img_h -const unsigned char BigEndian_img[] = { +const uint8_t BigEndian_img[] = { 67, 16, 0, 0, 67, 16, 0, 0, 67, 16, 0, 0, 65, 128, 0, 0, 65, 128, 0, 0, 65, 128, 0, 0, 67, 16, 0, 0, 67, 16, 0, 0, 67, 16, 0, 0, 65, 128, 0, 0, 65, 128, 0, 0, 65, 128, 0, 0, 67, 16, 0, 0, 67, 16, 0, 0, 67, 16, 0, 0, diff --git a/Modules/Compatibility/Deprecated/test/ConvertAnalyzeFile.cxx b/Modules/Compatibility/Deprecated/test/ConvertAnalyzeFile.cxx index e33f65feaa0..52a67fbfec3 100644 --- a/Modules/Compatibility/Deprecated/test/ConvertAnalyzeFile.cxx +++ b/Modules/Compatibility/Deprecated/test/ConvertAnalyzeFile.cxx @@ -154,22 +154,22 @@ main( int argc, char **argv ) { if(dim == 2) { - return ReadAnalyzeWriteNIfTI,2> >(argv[1],argv[2]); + return ReadAnalyzeWriteNIfTI,2> >(argv[1],argv[2]); } else { - return ReadAnalyzeWriteNIfTI,3> >(argv[1],argv[2]); + return ReadAnalyzeWriteNIfTI,3> >(argv[1],argv[2]); } } break; case itk::ImageIOBase::UCHAR: if(dim == 2) { - return ReadAnalyzeWriteNIfTI >( argv[1],argv[2]); + return ReadAnalyzeWriteNIfTI >( argv[1],argv[2]); } else { - return ReadAnalyzeWriteNIfTI >( argv[1],argv[2]); + return ReadAnalyzeWriteNIfTI >( argv[1],argv[2]); } break; // Software Guide : EndCodeSnippet @@ -186,11 +186,11 @@ main( int argc, char **argv ) case itk::ImageIOBase::USHORT: if(dim == 2) { - return ReadAnalyzeWriteNIfTI >( argv[1],argv[2]); + return ReadAnalyzeWriteNIfTI >( argv[1],argv[2]); } else { - return ReadAnalyzeWriteNIfTI >( argv[1],argv[2]); + return ReadAnalyzeWriteNIfTI >( argv[1],argv[2]); } break; case itk::ImageIOBase::INT: diff --git a/Modules/Compatibility/Deprecated/test/DeformableModel1.cxx b/Modules/Compatibility/Deprecated/test/DeformableModel1.cxx index f7d23f8f7ee..9c9daaedc2c 100644 --- a/Modules/Compatibility/Deprecated/test/DeformableModel1.cxx +++ b/Modules/Compatibility/Deprecated/test/DeformableModel1.cxx @@ -197,7 +197,7 @@ int main( int argc, char *argv[] ) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef itk::Image< unsigned char, Dimension > BinaryImageType; + typedef itk::Image< uint8_t, Dimension > BinaryImageType; // Software Guide : EndCodeSnippet // Software Guide : BeginLatex diff --git a/Modules/Compatibility/Deprecated/test/ImageCompare.cxx b/Modules/Compatibility/Deprecated/test/ImageCompare.cxx index b2ce9cd320c..886e305cef9 100644 --- a/Modules/Compatibility/Deprecated/test/ImageCompare.cxx +++ b/Modules/Compatibility/Deprecated/test/ImageCompare.cxx @@ -101,8 +101,8 @@ int RegressionTestImage (const char *testImageFilename, const char *baselineImag { // Use the factory mechanism to read the test and baseline files and convert them to double typedef itk::Image ImageType; - typedef itk::Image OutputType; - typedef itk::Image DiffOutputType; + typedef itk::Image OutputType; + typedef itk::Image DiffOutputType; typedef itk::ImageFileReader ReaderType; // Read the baseline file @@ -170,8 +170,8 @@ int RegressionTestImage (const char *testImageFilename, const char *baselineImag RescaleType::Pointer rescale = RescaleType::New(); - rescale->SetOutputMinimum(itk::NumericTraits::NonpositiveMin()); - rescale->SetOutputMaximum(itk::NumericTraits::max()); + rescale->SetOutputMinimum(itk::NumericTraits::NonpositiveMin()); + rescale->SetOutputMaximum(itk::NumericTraits::max()); rescale->SetInput(diff->GetOutput()); rescale->UpdateLargestPossibleRegion(); diff --git a/Modules/Compatibility/Deprecated/test/ImageCompareCommand.cxx b/Modules/Compatibility/Deprecated/test/ImageCompareCommand.cxx index aaa213262e9..1c42e346aff 100644 --- a/Modules/Compatibility/Deprecated/test/ImageCompareCommand.cxx +++ b/Modules/Compatibility/Deprecated/test/ImageCompareCommand.cxx @@ -225,8 +225,8 @@ int RegressionTestImage (const char *testImageFilename, const char *baselineImag { // Use the factory mechanism to read the test and baseline files and convert them to double typedef itk::Image ImageType; - typedef itk::Image OutputType; - typedef itk::Image DiffOutputType; + typedef itk::Image OutputType; + typedef itk::Image DiffOutputType; typedef itk::ImageFileReader ReaderType; // Read the baseline file @@ -317,8 +317,8 @@ int RegressionTestImage (const char *testImageFilename, const char *baselineImag RescaleType::Pointer rescale = RescaleType::New(); - rescale->SetOutputMinimum(itk::NumericTraits::NonpositiveMin()); - rescale->SetOutputMaximum(itk::NumericTraits::max()); + rescale->SetOutputMinimum(itk::NumericTraits::NonpositiveMin()); + rescale->SetOutputMaximum(itk::NumericTraits::max()); rescale->SetInput(diff->GetOutput()); rescale->UpdateLargestPossibleRegion(); diff --git a/Modules/Compatibility/Deprecated/test/ImageCopy.cxx b/Modules/Compatibility/Deprecated/test/ImageCopy.cxx index a5f6c105391..bc733bdb2bf 100644 --- a/Modules/Compatibility/Deprecated/test/ImageCopy.cxx +++ b/Modules/Compatibility/Deprecated/test/ImageCopy.cxx @@ -33,9 +33,9 @@ int main(int argc, char *argv[]) const unsigned int Dimension = 2; - typedef itk::Image< unsigned char, Dimension > ImageType; - typedef itk::Image< unsigned char, Dimension > OutputType; - typedef itk::Image< unsigned char, Dimension > DiffOutputType; + typedef itk::Image< uint8_t, Dimension > ImageType; + typedef itk::Image< uint8_t, Dimension > OutputType; + typedef itk::Image< uint8_t, Dimension > DiffOutputType; typedef itk::ImageFileReader< ImageType > ReaderType; typedef itk::ImageFileWriter< OutputType > WriterType; diff --git a/Modules/Compatibility/Deprecated/test/LittleEndian_hdr.h b/Modules/Compatibility/Deprecated/test/LittleEndian_hdr.h index 9c05a6a121a..07e1ec848cf 100644 --- a/Modules/Compatibility/Deprecated/test/LittleEndian_hdr.h +++ b/Modules/Compatibility/Deprecated/test/LittleEndian_hdr.h @@ -18,7 +18,7 @@ #ifndef __LittleEndian_hdr_h #define __LittleEndian_hdr_h -static unsigned char LittleEndian_hdr[] = { +static uint8_t LittleEndian_hdr[] = { 92, 1, 0, 0, 70, 76, 79, 65, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 114, 0, 4, 0, 6, 0, 6, 0, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, diff --git a/Modules/Compatibility/Deprecated/test/LittleEndian_img.h b/Modules/Compatibility/Deprecated/test/LittleEndian_img.h index 4035bf51495..f71e020a69c 100644 --- a/Modules/Compatibility/Deprecated/test/LittleEndian_img.h +++ b/Modules/Compatibility/Deprecated/test/LittleEndian_img.h @@ -18,7 +18,7 @@ #ifndef __LittleEndian_img_h #define __LittleEndian_img_h -const unsigned char LittleEndian_img[] = { +const uint8_t LittleEndian_img[] = { 0, 0, 16, 67, 0, 0, 16, 67, 0, 0, 16, 67, 0, 0, 128, 65, 0, 0, 128, 65, 0, 0, 128, 65, 0, 0, 16, 67, 0, 0, 16, 67, 0, 0, 16, 67, 0, 0, 128, 65, 0, 0, 128, 65, 0, 0, 128, 65, 0, 0, 16, 67, 0, 0, 16, 67, 0, 0, 16, 67, diff --git a/Modules/Compatibility/Deprecated/test/itk2DDeformableTest.cxx b/Modules/Compatibility/Deprecated/test/itk2DDeformableTest.cxx index 45b8d61c75b..53fb4b8c505 100644 --- a/Modules/Compatibility/Deprecated/test/itk2DDeformableTest.cxx +++ b/Modules/Compatibility/Deprecated/test/itk2DDeformableTest.cxx @@ -39,7 +39,7 @@ int itk2DDeformableTest(int, char* []) typedef itk::Image myImageType; // Declare the types of the output images - typedef itk::Image binaryImageType; + typedef itk::Image binaryImageType; // Declare the type of the index to access images typedef itk::Index myIndexType; diff --git a/Modules/Compatibility/Deprecated/test/itkAnalyzeImageIOBadHeader.cxx b/Modules/Compatibility/Deprecated/test/itkAnalyzeImageIOBadHeader.cxx index 91d154619ea..8da2f3244f6 100644 --- a/Modules/Compatibility/Deprecated/test/itkAnalyzeImageIOBadHeader.cxx +++ b/Modules/Compatibility/Deprecated/test/itkAnalyzeImageIOBadHeader.cxx @@ -28,7 +28,7 @@ TestDegenerateHeaderFiles() } std::string fname(AugmentName); fname += "LittleEndian.hdr"; - typedef itk::Image ImageType; + typedef itk::Image ImageType; ImageType::Pointer img; std::fstream header(fname.c_str(),std::ios::binary | std::ios::in | std::ios::out); if(!header.is_open()) diff --git a/Modules/Compatibility/Deprecated/test/itkAnalyzeImageIODirectionsTest.cxx b/Modules/Compatibility/Deprecated/test/itkAnalyzeImageIODirectionsTest.cxx index 43580fb016d..dd6c314618f 100644 --- a/Modules/Compatibility/Deprecated/test/itkAnalyzeImageIODirectionsTest.cxx +++ b/Modules/Compatibility/Deprecated/test/itkAnalyzeImageIODirectionsTest.cxx @@ -29,7 +29,7 @@ class AnalyzeIODirectionHelper { public: - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, 3 > Image3DType; diff --git a/Modules/Compatibility/Deprecated/test/itkAnalyzeImageIORGBImageTest.cxx b/Modules/Compatibility/Deprecated/test/itkAnalyzeImageIORGBImageTest.cxx index b54bb58b03f..838c7ab92d6 100644 --- a/Modules/Compatibility/Deprecated/test/itkAnalyzeImageIORGBImageTest.cxx +++ b/Modules/Compatibility/Deprecated/test/itkAnalyzeImageIORGBImageTest.cxx @@ -29,7 +29,7 @@ int itkAnalyzeImageIORGBImageTest(int ac, char* av[]) itksys::SystemTools::ChangeDirectory(testdir); } const unsigned int Dimension = 3; - typedef itk::RGBPixel RGBPixelType; + typedef itk::RGBPixel RGBPixelType; typedef itk::Image RGBImageType; RGBImageType::Pointer im(NewRGBImage()); diff --git a/Modules/Compatibility/Deprecated/test/itkAnalyzeImageIOTest.cxx b/Modules/Compatibility/Deprecated/test/itkAnalyzeImageIOTest.cxx index 6aacb0562cf..717f54b776f 100644 --- a/Modules/Compatibility/Deprecated/test/itkAnalyzeImageIOTest.cxx +++ b/Modules/Compatibility/Deprecated/test/itkAnalyzeImageIOTest.cxx @@ -133,9 +133,9 @@ int itkAnalyzeImageIOTest(int ac, char* av[]) itksys::SystemTools::ChangeDirectory(testdir); } - if(ac2 > 1) //This is a mechanism for reading unsigned char images for testing. + if(ac2 > 1) //This is a mechanism for reading uint8_t images for testing. { - typedef itk::Image ImageType; + typedef itk::Image ImageType; ImageType::Pointer input; itk::ImageFileReader::Pointer imageReader = itk::ImageFileReader::New(); @@ -167,10 +167,10 @@ int itkAnalyzeImageIOTest(int ac, char* av[]) std::cerr << "Error writing Analyze file type char" << std::endl; rval += cur_return; } - cur_return = MakeImage(AugmentName); + cur_return = MakeImage(AugmentName); if(cur_return != 0) { - std::cerr << "Error writing Analyze file type unsigned char" << std::endl; + std::cerr << "Error writing Analyze file type uint8_t" << std::endl; rval += cur_return; } cur_return = MakeImage(AugmentName); @@ -179,10 +179,10 @@ int itkAnalyzeImageIOTest(int ac, char* av[]) std::cerr << "Error writing Analyze file type short" << std::endl; rval += cur_return; } - cur_return = MakeImage(AugmentName); + cur_return = MakeImage(AugmentName); if(cur_return != 0) { - std::cerr << "Error writing Analyze file type unsigned short" << std::endl; + std::cerr << "Error writing Analyze file type uint16_t" << std::endl; rval += cur_return; } cur_return = MakeImage(AugmentName); @@ -211,10 +211,10 @@ int itkAnalyzeImageIOTest(int ac, char* av[]) std::cerr << "Error writing Analyze file type char" << std::endl; rval += cur_return; } - cur_return = MakeImage(AugmentName); + cur_return = MakeImage(AugmentName); if(cur_return != 0) { - std::cerr << "Error writing Analyze file type unsigned char" << std::endl; + std::cerr << "Error writing Analyze file type uint8_t" << std::endl; rval += cur_return; } cur_return = MakeImage(AugmentName); @@ -223,10 +223,10 @@ int itkAnalyzeImageIOTest(int ac, char* av[]) std::cerr << "Error writing Analyze file type short" << std::endl; rval += cur_return; } - cur_return = MakeImage(AugmentName); + cur_return = MakeImage(AugmentName); if(cur_return != 0) { - std::cerr << "Error writing Analyze file type unsigned short" << std::endl; + std::cerr << "Error writing Analyze file type uint16_t" << std::endl; rval += cur_return; } cur_return = MakeImage(AugmentName); diff --git a/Modules/Compatibility/Deprecated/test/itkAnalyzeImageIOTest.h b/Modules/Compatibility/Deprecated/test/itkAnalyzeImageIOTest.h index ae4f949d78f..cc68d9d7ba3 100644 --- a/Modules/Compatibility/Deprecated/test/itkAnalyzeImageIOTest.h +++ b/Modules/Compatibility/Deprecated/test/itkAnalyzeImageIOTest.h @@ -40,10 +40,10 @@ #define SPECIFIC_IMAGEIO_MODULE_TEST -const unsigned char RPI=16; /*Bit pattern 0 0 0 10000*/ -const unsigned char LEFT=128; /*Bit pattern 1 0 0 00000*/ -const unsigned char ANTERIOR=64; /*Bit pattern 0 1 0 00000*/ -const unsigned char SUPERIOR=32; /*Bit pattern 0 0 1 00000*/ +const uint8_t RPI=16; /*Bit pattern 0 0 0 10000*/ +const uint8_t LEFT=128; /*Bit pattern 1 0 0 00000*/ +const uint8_t ANTERIOR=64; /*Bit pattern 0 1 0 00000*/ +const uint8_t SUPERIOR=32; /*Bit pattern 0 0 1 00000*/ template typename ImageType::DirectionType diff --git a/Modules/Compatibility/Deprecated/test/itkAnalyzeImageIOTest2.cxx b/Modules/Compatibility/Deprecated/test/itkAnalyzeImageIOTest2.cxx index 27cbc5223f3..0b4ea8af286 100644 --- a/Modules/Compatibility/Deprecated/test/itkAnalyzeImageIOTest2.cxx +++ b/Modules/Compatibility/Deprecated/test/itkAnalyzeImageIOTest2.cxx @@ -37,7 +37,7 @@ int itkAnalyzeImageIOTest2(int ac, char* av[]) char *arg1 = av[1]; char *arg2 = av[2]; int test_success = 0; - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef ImageType::Pointer ImagePointer; typedef itk::ImageFileReader< ImageType > ImageReaderType; diff --git a/Modules/Compatibility/Deprecated/test/itkDICOMImageIO2Test.cxx b/Modules/Compatibility/Deprecated/test/itkDICOMImageIO2Test.cxx index 12675c75832..102f2a66087 100644 --- a/Modules/Compatibility/Deprecated/test/itkDICOMImageIO2Test.cxx +++ b/Modules/Compatibility/Deprecated/test/itkDICOMImageIO2Test.cxx @@ -61,7 +61,7 @@ int itkDICOMImageIO2Test(int ac, char* av[]) return EXIT_FAILURE; } - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; diff --git a/Modules/Compatibility/Deprecated/test/itkDICOMImageSeriesTest.cxx b/Modules/Compatibility/Deprecated/test/itkDICOMImageSeriesTest.cxx index 1d82eeff83e..efc1f7f9226 100644 --- a/Modules/Compatibility/Deprecated/test/itkDICOMImageSeriesTest.cxx +++ b/Modules/Compatibility/Deprecated/test/itkDICOMImageSeriesTest.cxx @@ -30,7 +30,7 @@ int itkDICOMImageSeriesTest(int ac, char* av[]) return EXIT_FAILURE; } - typedef itk::Image ImageNDType; + typedef itk::Image ImageNDType; typedef itk::ImageSeriesReader ReaderType; itk::DICOMImageIO2::Pointer io = itk::DICOMImageIO2::New(); diff --git a/Modules/Compatibility/Deprecated/test/itkDICOMImageSeriesTest2.cxx b/Modules/Compatibility/Deprecated/test/itkDICOMImageSeriesTest2.cxx index 1bf610682e1..e1c8337c334 100644 --- a/Modules/Compatibility/Deprecated/test/itkDICOMImageSeriesTest2.cxx +++ b/Modules/Compatibility/Deprecated/test/itkDICOMImageSeriesTest2.cxx @@ -30,7 +30,7 @@ int itkDICOMImageSeriesTest2(int ac, char* av[]) return EXIT_FAILURE; } - typedef itk::Image ImageNDType; + typedef itk::Image ImageNDType; typedef itk::ImageSeriesReader ReaderType; itk::DICOMImageIO2::Pointer io = itk::DICOMImageIO2::New(); diff --git a/Modules/Compatibility/Deprecated/test/itkDeformableTest.cxx b/Modules/Compatibility/Deprecated/test/itkDeformableTest.cxx index 7584a410c19..5838ece5dd1 100644 --- a/Modules/Compatibility/Deprecated/test/itkDeformableTest.cxx +++ b/Modules/Compatibility/Deprecated/test/itkDeformableTest.cxx @@ -39,7 +39,7 @@ int itkDeformableTest(int , char *[]) typedef itk::Image myImageType; // Declare the types of the output images - typedef itk::Image binaryImageType; + typedef itk::Image binaryImageType; // Declare the type of the index to access images typedef itk::Index myIndexType; diff --git a/Modules/Compatibility/Deprecated/test/itkDeprecatedPrintTest.cxx b/Modules/Compatibility/Deprecated/test/itkDeprecatedPrintTest.cxx index fe13dc4e0a6..1e3ecda7162 100644 --- a/Modules/Compatibility/Deprecated/test/itkDeprecatedPrintTest.cxx +++ b/Modules/Compatibility/Deprecated/test/itkDeprecatedPrintTest.cxx @@ -33,8 +33,8 @@ int main (int , char* []) typedef itk::Image InputType3D; typedef itk::Image OutputType; typedef itk::Image BinaryImageType; - typedef itk::Image UShortImageType; - typedef itk::Image CharType; + typedef itk::Image UShortImageType; + typedef itk::Image CharType; typedef itk::Mesh MeshType; @@ -56,7 +56,7 @@ int main (int , char* []) itk::GradientToMagnitudeImageFilter::New(); std::cout << "-------------GradientToMagnitudeImageFilter" << GradientToMagnitudeImageFilterObj; - typedef itk::Image ImageType; + typedef itk::Image ImageType; itk::ImageFileReader::Pointer reader = itk::ImageFileReader::New(); diff --git a/Modules/Compatibility/Deprecated/test/itkDicomImageIODirection2DTest.cxx b/Modules/Compatibility/Deprecated/test/itkDicomImageIODirection2DTest.cxx index dc908b7857f..84ae5108069 100644 --- a/Modules/Compatibility/Deprecated/test/itkDicomImageIODirection2DTest.cxx +++ b/Modules/Compatibility/Deprecated/test/itkDicomImageIODirection2DTest.cxx @@ -33,7 +33,7 @@ int itkDicomImageIODirection2DTest( int argc, char * argv[] ) return EXIT_FAILURE; } - typedef signed short PixelType; + typedef int16_t PixelType; typedef itk::Image Image2DType; typedef itk::Image Image3DType; diff --git a/Modules/Compatibility/Deprecated/test/itkDicomImageIOTest.cxx b/Modules/Compatibility/Deprecated/test/itkDicomImageIOTest.cxx index 0f908c618ae..c9e6b71116f 100644 --- a/Modules/Compatibility/Deprecated/test/itkDicomImageIOTest.cxx +++ b/Modules/Compatibility/Deprecated/test/itkDicomImageIOTest.cxx @@ -58,7 +58,7 @@ int itkDicomImageIOTest(int ac, char* av[]) return EXIT_FAILURE; } - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; diff --git a/Modules/Compatibility/Deprecated/test/itkImageReadDICOMSeriesWriteTest.cxx b/Modules/Compatibility/Deprecated/test/itkImageReadDICOMSeriesWriteTest.cxx index 35098038854..f48664c1cb1 100644 --- a/Modules/Compatibility/Deprecated/test/itkImageReadDICOMSeriesWriteTest.cxx +++ b/Modules/Compatibility/Deprecated/test/itkImageReadDICOMSeriesWriteTest.cxx @@ -33,7 +33,7 @@ int itkImageReadDICOMSeriesWriteTest( int argc, char* argv[] ) } - typedef signed short PixelType; + typedef int16_t PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > ImageType; @@ -65,7 +65,7 @@ int itkImageReadDICOMSeriesWriteTest( int argc, char* argv[] ) itksys::SystemTools::MakeDirectory( outputDirectory ); - typedef signed short OutputPixelType; + typedef int16_t OutputPixelType; const unsigned int OutputDimension = 2; typedef itk::Image< OutputPixelType, OutputDimension > Image2DType; diff --git a/Modules/Compatibility/Deprecated/test/itkReflectImageFilterTest.cxx b/Modules/Compatibility/Deprecated/test/itkReflectImageFilterTest.cxx index 9b3a0cc7526..9bd19ab37a5 100644 --- a/Modules/Compatibility/Deprecated/test/itkReflectImageFilterTest.cxx +++ b/Modules/Compatibility/Deprecated/test/itkReflectImageFilterTest.cxx @@ -27,7 +27,7 @@ int itkReflectImageFilterTest(int, char* [] ) const unsigned int myDimension = 3; // Declare the types of the image - typedef itk::Image myImageType; + typedef itk::Image myImageType; // Declare the type of the Region typedef myImageType::RegionType myRegionType; diff --git a/Modules/Compatibility/Deprecated/test/itkVOLImageIOTest.cxx b/Modules/Compatibility/Deprecated/test/itkVOLImageIOTest.cxx index 39e33687d34..0b1a89dfd49 100644 --- a/Modules/Compatibility/Deprecated/test/itkVOLImageIOTest.cxx +++ b/Modules/Compatibility/Deprecated/test/itkVOLImageIOTest.cxx @@ -37,7 +37,7 @@ int itkVOLImageIOTest(int ac, char* av[]) // VOL image file readers itk::VOLImageIOFactory::RegisterOneFactory(); - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image myImage; diff --git a/Modules/Core/Common/include/itkDefaultConvertPixelTraits.h b/Modules/Core/Common/include/itkDefaultConvertPixelTraits.h index 95fc7e287eb..fe20b88e6c5 100644 --- a/Modules/Core/Common/include/itkDefaultConvertPixelTraits.h +++ b/Modules/Core/Common/include/itkDefaultConvertPixelTraits.h @@ -98,9 +98,9 @@ ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(int) ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(char) ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(short) ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(unsigned int) -ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(signed char) -ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(unsigned char) -ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(unsigned short) +ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(int8_t) +ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(uint8_t) +ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(uint16_t) ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(long) ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(unsigned long) ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(bool) diff --git a/Modules/Core/Common/include/itkFixedArray.h b/Modules/Core/Common/include/itkFixedArray.h index e4c0e0a14bd..23785c4e070 100644 --- a/Modules/Core/Common/include/itkFixedArray.h +++ b/Modules/Core/Common/include/itkFixedArray.h @@ -188,8 +188,8 @@ class FixedArray * Visual C++. */ reference operator[](short index) { return m_InternalArray[index]; } const_reference operator[](short index) const { return m_InternalArray[index]; } - reference operator[](unsigned short index) { return m_InternalArray[index]; } - const_reference operator[](unsigned short index) const { return m_InternalArray[index]; } + reference operator[](uint16_t index) { return m_InternalArray[index]; } + const_reference operator[](uint16_t index) const { return m_InternalArray[index]; } reference operator[](int index) { return m_InternalArray[index]; } const_reference operator[](int index) const { return m_InternalArray[index]; } reference operator[](unsigned int index) { return m_InternalArray[index]; } @@ -204,9 +204,9 @@ class FixedArray const_reference operator[](unsigned long long index) const { return m_InternalArray[index]; } /** Set/Get element methods are more convenient in wrapping languages */ - void SetElement(unsigned short index, const_reference value) + void SetElement(uint16_t index, const_reference value) { m_InternalArray[index] = value; } - const_reference GetElement(unsigned short index) const { return m_InternalArray[index]; } + const_reference GetElement(uint16_t index) const { return m_InternalArray[index]; } /** Return a pointer to the data. */ ValueType * GetDataPointer() diff --git a/Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.h b/Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.h index 139884791a9..44f18106a76 100644 --- a/Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.h +++ b/Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.h @@ -224,7 +224,7 @@ class ITK_EXPORT FloodFilledFunctionConditionalConstIterator: * 1 = pixel is not inside the function * 2 = pixel is inside the function, neighbor check incomplete * 3 = pixel is inside the function, neighbor check complete */ - typedef Image< unsigned char, itkGetStaticConstMacro(NDimensions) > TTempImage; + typedef Image< uint8_t, itkGetStaticConstMacro(NDimensions) > TTempImage; typename TTempImage::Pointer m_TemporaryPointer; /** A list of locations to start the recursive fill */ diff --git a/Modules/Core/Common/include/itkFloodFilledSpatialFunctionConditionalConstIterator.h b/Modules/Core/Common/include/itkFloodFilledSpatialFunctionConditionalConstIterator.h index 98f03b68cec..f08b0d87208 100644 --- a/Modules/Core/Common/include/itkFloodFilledSpatialFunctionConditionalConstIterator.h +++ b/Modules/Core/Common/include/itkFloodFilledSpatialFunctionConditionalConstIterator.h @@ -110,7 +110,7 @@ class ITK_EXPORT FloodFilledSpatialFunctionConditionalConstIterator:public Flood * 3) Intersect: if any of the corners of the pixel in physical space are inside the function, * then the pixel is inside the function */ - unsigned char m_InclusionStrategy; + uint8_t m_InclusionStrategy; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkMersenneTwisterRandomVariateGenerator.h b/Modules/Core/Common/include/itkMersenneTwisterRandomVariateGenerator.h index 7e981b470ad..3d6334175dd 100644 --- a/Modules/Core/Common/include/itkMersenneTwisterRandomVariateGenerator.h +++ b/Modules/Core/Common/include/itkMersenneTwisterRandomVariateGenerator.h @@ -264,7 +264,7 @@ MersenneTwisterRandomVariateGenerator::hash(vcl_time_t t, vcl_clock_t c) static IntegerType differ = 0; // guarantee time-based seeds will change IntegerType h1 = 0; - unsigned char *p = (unsigned char *)&t; + uint8_t *p = (uint8_t *)&t; const unsigned int sizeOfT = static_cast< unsigned int >( sizeof(t) ); for ( unsigned int i = 0; i < sizeOfT; ++i ) @@ -273,7 +273,7 @@ MersenneTwisterRandomVariateGenerator::hash(vcl_time_t t, vcl_clock_t c) h1 += p[i]; } IntegerType h2 = 0; - p = (unsigned char *)&c; + p = (uint8_t *)&c; const unsigned int sizeOfC = static_cast< unsigned int >( sizeof(c) ); for ( unsigned int j = 0; j < sizeOfC; ++j ) diff --git a/Modules/Core/Common/include/itkNumericTraits.h b/Modules/Core/Common/include/itkNumericTraits.h index 7ee8fb793e4..834318b0bf3 100644 --- a/Modules/Core/Common/include/itkNumericTraits.h +++ b/Modules/Core/Common/include/itkNumericTraits.h @@ -214,8 +214,8 @@ class NumericTraits< bool > :public vcl_numeric_limits< bool > public: typedef bool ValueType; typedef bool PrintType; - typedef unsigned char AbsType; - typedef unsigned char AccumulateType; + typedef uint8_t AbsType; + typedef uint8_t AccumulateType; typedef double RealType; typedef RealType ScalarRealType; typedef float FloatType; @@ -267,7 +267,7 @@ class NumericTraits< char > :public vcl_numeric_limits< char > public: typedef char ValueType; typedef int PrintType; - typedef unsigned char AbsType; + typedef uint8_t AbsType; typedef short AccumulateType; typedef double RealType; typedef RealType ScalarRealType; @@ -315,32 +315,32 @@ class NumericTraits< char > :public vcl_numeric_limits< char > * \ingroup ITKCommon */ template< > -class NumericTraits< signed char > :public vcl_numeric_limits< signed char > +class NumericTraits< int8_t > :public vcl_numeric_limits< int8_t > { public: - typedef signed char ValueType; + typedef int8_t ValueType; typedef int PrintType; - typedef unsigned char AbsType; + typedef uint8_t AbsType; typedef short AccumulateType; typedef double RealType; typedef RealType ScalarRealType; typedef float FloatType; typedef FixedArray MeasurementVectorType; - static const signed char ITKCommon_EXPORT Zero; - static const signed char ITKCommon_EXPORT One; - - static signed char min() { return -128; } - static signed char max() { return 127; } - static signed char min(signed char) { return min(); } - static signed char max(signed char) { return max(); } - static signed char NonpositiveMin() { return min(); } - static bool IsPositive(signed char val) { return val > Zero; } - static bool IsNonpositive(signed char val) { return val <= Zero; } - static bool IsNegative(signed char val) { return val < Zero; } - static bool IsNonnegative(signed char val) { return val >= Zero; } - static signed char ZeroValue() { return Zero; } - static signed char OneValue() { return One; } + static const int8_t ITKCommon_EXPORT Zero; + static const int8_t ITKCommon_EXPORT One; + + static int8_t min() { return -128; } + static int8_t max() { return 127; } + static int8_t min(int8_t) { return min(); } + static int8_t max(int8_t) { return max(); } + static int8_t NonpositiveMin() { return min(); } + static bool IsPositive(int8_t val) { return val > Zero; } + static bool IsNonpositive(int8_t val) { return val <= Zero; } + static bool IsNegative(int8_t val) { return val < Zero; } + static bool IsNonnegative(int8_t val) { return val >= Zero; } + static int8_t ZeroValue() { return Zero; } + static int8_t OneValue() { return One; } static unsigned int GetLength(const ValueType &) { return 1; } static unsigned int GetLength() { return 1; } static ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } @@ -361,36 +361,36 @@ class NumericTraits< signed char > :public vcl_numeric_limits< signed char > } }; -/** \class NumericTraits - * \brief Define traits for type unsigned char. +/** \class NumericTraits + * \brief Define traits for type uint8_t. * \ingroup DataRepresentation * \ingroup ITKCommon */ template< > -class NumericTraits< unsigned char > :public vcl_numeric_limits< unsigned char > +class NumericTraits< uint8_t > :public vcl_numeric_limits< uint8_t > { public: - typedef unsigned char ValueType; + typedef uint8_t ValueType; typedef int PrintType; - typedef unsigned char AbsType; - typedef unsigned short AccumulateType; + typedef uint8_t AbsType; + typedef uint16_t AccumulateType; typedef double RealType; typedef RealType ScalarRealType; typedef float FloatType; typedef FixedArray MeasurementVectorType; - static const unsigned char ITKCommon_EXPORT Zero; - static const unsigned char ITKCommon_EXPORT One; + static const uint8_t ITKCommon_EXPORT Zero; + static const uint8_t ITKCommon_EXPORT One; itkNUMERIC_TRAITS_MIN_MAX_MACRO(); - static unsigned char NonpositiveMin() { return vcl_numeric_limits< ValueType >::min(); } - static bool IsPositive(unsigned char val) { return val != Zero; } - static bool IsNonpositive(unsigned char val) { return val == Zero; } - static bool IsNegative(unsigned char val) { return val ? false : false; } - static bool IsNonnegative(unsigned char val) { return val ? true : true; } - static unsigned char ZeroValue() { return Zero; } - static unsigned char OneValue() { return One; } + static uint8_t NonpositiveMin() { return vcl_numeric_limits< ValueType >::min(); } + static bool IsPositive(uint8_t val) { return val != Zero; } + static bool IsNonpositive(uint8_t val) { return val == Zero; } + static bool IsNegative(uint8_t val) { return val ? false : false; } + static bool IsNonnegative(uint8_t val) { return val ? true : true; } + static uint8_t ZeroValue() { return Zero; } + static uint8_t OneValue() { return One; } static unsigned int GetLength(const ValueType &) { return 1; } static unsigned int GetLength() { return 1; } static ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } @@ -421,7 +421,7 @@ class NumericTraits< short > :public vcl_numeric_limits< short > public: typedef short ValueType; typedef short PrintType; - typedef unsigned short AbsType; + typedef uint16_t AbsType; typedef int AccumulateType; typedef double RealType; typedef RealType ScalarRealType; @@ -459,35 +459,35 @@ class NumericTraits< short > :public vcl_numeric_limits< short > } }; -/** \class NumericTraits - * \brief Define traits for type unsigned short. +/** \class NumericTraits + * \brief Define traits for type uint16_t. * \ingroup DataRepresentation * \ingroup ITKCommon */ template< > -class NumericTraits< unsigned short > :public vcl_numeric_limits< unsigned short > +class NumericTraits< uint16_t > :public vcl_numeric_limits< uint16_t > { public: - typedef unsigned short ValueType; - typedef unsigned short PrintType; - typedef unsigned short AbsType; + typedef uint16_t ValueType; + typedef uint16_t PrintType; + typedef uint16_t AbsType; typedef unsigned int AccumulateType; typedef double RealType; typedef RealType ScalarRealType; typedef float FloatType; typedef FixedArray MeasurementVectorType; - static const unsigned short ITKCommon_EXPORT Zero; - static const unsigned short ITKCommon_EXPORT One; + static const uint16_t ITKCommon_EXPORT Zero; + static const uint16_t ITKCommon_EXPORT One; itkNUMERIC_TRAITS_MIN_MAX_MACRO(); - static unsigned short NonpositiveMin() { return vcl_numeric_limits< ValueType >::min(); } - static bool IsPositive(unsigned short val) { return val != Zero; } - static bool IsNonpositive(unsigned short val) { return val == Zero; } - static bool IsNegative(unsigned short val) { return val ? false : false; } - static bool IsNonnegative(unsigned short val) { return val ? true : true; } - static unsigned short ZeroValue() { return Zero; } - static unsigned short OneValue() { return One; } + static uint16_t NonpositiveMin() { return vcl_numeric_limits< ValueType >::min(); } + static bool IsPositive(uint16_t val) { return val != Zero; } + static bool IsNonpositive(uint16_t val) { return val == Zero; } + static bool IsNegative(uint16_t val) { return val ? false : false; } + static bool IsNonnegative(uint16_t val) { return val ? true : true; } + static uint16_t ZeroValue() { return Zero; } + static uint16_t OneValue() { return One; } static unsigned int GetLength(const ValueType &) { return 1; } static unsigned int GetLength() { return 1; } static ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } diff --git a/Modules/Core/Common/include/itkPixelTraits.h b/Modules/Core/Common/include/itkPixelTraits.h index d20872b8180..34e99cfbdc0 100644 --- a/Modules/Core/Common/include/itkPixelTraits.h +++ b/Modules/Core/Common/include/itkPixelTraits.h @@ -75,7 +75,7 @@ class PixelTraits< char > }; template< > -class PixelTraits< signed char > +class PixelTraits< int8_t > { public: itkStaticConstMacro(Dimension, unsigned int, 1); @@ -83,11 +83,11 @@ class PixelTraits< signed char > }; template< > -class PixelTraits< unsigned char > +class PixelTraits< uint8_t > { public: itkStaticConstMacro(Dimension, unsigned int, 1); - typedef unsigned char ValueType; + typedef uint8_t ValueType; }; template< > @@ -99,11 +99,11 @@ class PixelTraits< short > }; template< > -class PixelTraits< unsigned short > +class PixelTraits< uint16_t > { public: itkStaticConstMacro(Dimension, unsigned int, 1); - typedef unsigned short ValueType; + typedef uint16_t ValueType; }; template< > @@ -163,7 +163,7 @@ class PixelTraits< double > * JoinTraits defines the value type needed to combine the specified * pixel types into a single vector. The data type selected is the * smallest data type that can represent the dynamic range of both - * input pixel types. For example, if a char and unsigned short are + * input pixel types. For example, if a char and uint16_t are * "joined", the resulting data type must be a vector of int. In * some cases, like joining a unsigned int and a char, the join * value type is promoted all the way to a float. This provides @@ -202,10 +202,10 @@ class JoinTraits< bool, char > }; template< > -class JoinTraits< bool, unsigned char > +class JoinTraits< bool, uint8_t > { public: - typedef unsigned char ValueType; + typedef uint8_t ValueType; }; template< > @@ -216,10 +216,10 @@ class JoinTraits< bool, short > }; template< > -class JoinTraits< bool, unsigned short > +class JoinTraits< bool, uint16_t > { public: - typedef unsigned short ValueType; + typedef uint16_t ValueType; }; template< > @@ -283,7 +283,7 @@ class JoinTraits< char, char > }; template< > -class JoinTraits< char, unsigned char > +class JoinTraits< char, uint8_t > { public: typedef short ValueType; @@ -297,7 +297,7 @@ class JoinTraits< char, short > }; template< > -class JoinTraits< char, unsigned short > +class JoinTraits< char, uint16_t > { public: typedef int ValueType; @@ -346,82 +346,82 @@ class JoinTraits< char, double > typedef double ValueType; }; -/** \class PixelTraits - * Specializations for unsigned char. +/** \class PixelTraits + * Specializations for uint8_t. * \ingroup ITKCommon */ template< > -class JoinTraits< unsigned char, bool > +class JoinTraits< uint8_t, bool > { public: - typedef unsigned char ValueType; + typedef uint8_t ValueType; }; template< > -class JoinTraits< unsigned char, char > +class JoinTraits< uint8_t, char > { public: typedef short ValueType; }; template< > -class JoinTraits< unsigned char, unsigned char > +class JoinTraits< uint8_t, uint8_t > { public: - typedef unsigned char ValueType; + typedef uint8_t ValueType; }; template< > -class JoinTraits< unsigned char, short > +class JoinTraits< uint8_t, short > { public: typedef short ValueType; }; template< > -class JoinTraits< unsigned char, unsigned short > +class JoinTraits< uint8_t, uint16_t > { public: - typedef unsigned short ValueType; + typedef uint16_t ValueType; }; template< > -class JoinTraits< unsigned char, int > +class JoinTraits< uint8_t, int > { public: typedef int ValueType; }; template< > -class JoinTraits< unsigned char, unsigned int > +class JoinTraits< uint8_t, unsigned int > { public: typedef unsigned int ValueType; }; template< > -class JoinTraits< unsigned char, long > +class JoinTraits< uint8_t, long > { public: typedef long ValueType; }; template< > -class JoinTraits< unsigned char, unsigned long > +class JoinTraits< uint8_t, unsigned long > { public: typedef unsigned long ValueType; }; template< > -class JoinTraits< unsigned char, float > +class JoinTraits< uint8_t, float > { public: typedef float ValueType; }; template< > -class JoinTraits< unsigned char, double > +class JoinTraits< uint8_t, double > { public: typedef double ValueType; @@ -446,7 +446,7 @@ class JoinTraits< short, char > }; template< > -class JoinTraits< short, unsigned char > +class JoinTraits< short, uint8_t > { public: typedef short ValueType; @@ -460,7 +460,7 @@ class JoinTraits< short, short > }; template< > -class JoinTraits< short, unsigned short > +class JoinTraits< short, uint16_t > { public: typedef int ValueType; @@ -509,82 +509,82 @@ class JoinTraits< short, double > typedef double ValueType; }; -/** \class PixelTraits - * Specializations for unsigned short. +/** \class PixelTraits + * Specializations for uint16_t. * \ingroup ITKCommon */ template< > -class JoinTraits< unsigned short, bool > +class JoinTraits< uint16_t, bool > { public: - typedef unsigned short ValueType; + typedef uint16_t ValueType; }; template< > -class JoinTraits< unsigned short, char > +class JoinTraits< uint16_t, char > { public: typedef int ValueType; }; template< > -class JoinTraits< unsigned short, unsigned char > +class JoinTraits< uint16_t, uint8_t > { public: - typedef unsigned short ValueType; + typedef uint16_t ValueType; }; template< > -class JoinTraits< unsigned short, short > +class JoinTraits< uint16_t, short > { public: typedef int ValueType; }; template< > -class JoinTraits< unsigned short, unsigned short > +class JoinTraits< uint16_t, uint16_t > { public: - typedef unsigned short ValueType; + typedef uint16_t ValueType; }; template< > -class JoinTraits< unsigned short, int > +class JoinTraits< uint16_t, int > { public: typedef int ValueType; }; template< > -class JoinTraits< unsigned short, unsigned int > +class JoinTraits< uint16_t, unsigned int > { public: typedef unsigned int ValueType; }; template< > -class JoinTraits< unsigned short, long > +class JoinTraits< uint16_t, long > { public: typedef long ValueType; }; template< > -class JoinTraits< unsigned short, unsigned long > +class JoinTraits< uint16_t, unsigned long > { public: typedef unsigned long ValueType; }; template< > -class JoinTraits< unsigned short, float > +class JoinTraits< uint16_t, float > { public: typedef float ValueType; }; template< > -class JoinTraits< unsigned short, double > +class JoinTraits< uint16_t, double > { public: typedef double ValueType; @@ -609,7 +609,7 @@ class JoinTraits< int, char > }; template< > -class JoinTraits< int, unsigned char > +class JoinTraits< int, uint8_t > { public: typedef int ValueType; @@ -623,7 +623,7 @@ class JoinTraits< int, short > }; template< > -class JoinTraits< int, unsigned short > +class JoinTraits< int, uint16_t > { public: typedef int ValueType; @@ -692,7 +692,7 @@ class JoinTraits< unsigned int, char > }; template< > -class JoinTraits< unsigned int, unsigned char > +class JoinTraits< unsigned int, uint8_t > { public: typedef unsigned int ValueType; @@ -707,7 +707,7 @@ class JoinTraits< unsigned int, short > }; template< > -class JoinTraits< unsigned int, unsigned short > +class JoinTraits< unsigned int, uint16_t > { public: typedef unsigned int ValueType; @@ -775,7 +775,7 @@ class JoinTraits< long, char > }; template< > -class JoinTraits< long, unsigned char > +class JoinTraits< long, uint8_t > { public: typedef long ValueType; @@ -789,7 +789,7 @@ class JoinTraits< long, short > }; template< > -class JoinTraits< long, unsigned short > +class JoinTraits< long, uint16_t > { public: typedef long ValueType; @@ -856,7 +856,7 @@ class JoinTraits< unsigned long, char > }; template< > -class JoinTraits< unsigned long, unsigned char > +class JoinTraits< unsigned long, uint8_t > { public: typedef unsigned long ValueType; @@ -870,7 +870,7 @@ class JoinTraits< unsigned long, short > }; template< > -class JoinTraits< unsigned long, unsigned short > +class JoinTraits< unsigned long, uint16_t > { public: typedef unsigned long ValueType; @@ -937,7 +937,7 @@ class JoinTraits< float, char > }; template< > -class JoinTraits< float, unsigned char > +class JoinTraits< float, uint8_t > { public: typedef float ValueType; @@ -951,7 +951,7 @@ class JoinTraits< float, short > }; template< > -class JoinTraits< float, unsigned short > +class JoinTraits< float, uint16_t > { public: typedef float ValueType; @@ -1018,7 +1018,7 @@ class JoinTraits< double, char > }; template< > -class JoinTraits< double, unsigned char > +class JoinTraits< double, uint8_t > { public: typedef double ValueType; @@ -1032,7 +1032,7 @@ class JoinTraits< double, short > }; template< > -class JoinTraits< double, unsigned short > +class JoinTraits< double, uint16_t > { public: typedef double ValueType; diff --git a/Modules/Core/Common/include/itkRGBAPixel.h b/Modules/Core/Common/include/itkRGBAPixel.h index 020afe617a4..33798caecf5 100644 --- a/Modules/Core/Common/include/itkRGBAPixel.h +++ b/Modules/Core/Common/include/itkRGBAPixel.h @@ -55,7 +55,7 @@ namespace itk * \endwiki */ -template< typename TComponent = unsigned short > +template< typename TComponent = uint16_t > class RGBAPixel:public FixedArray< TComponent, 4 > { public: diff --git a/Modules/Core/Common/include/itkRGBPixel.h b/Modules/Core/Common/include/itkRGBPixel.h index e28f5bb8d42..f91582b0943 100644 --- a/Modules/Core/Common/include/itkRGBPixel.h +++ b/Modules/Core/Common/include/itkRGBPixel.h @@ -54,7 +54,7 @@ namespace itk * \endwiki */ -template< typename TComponent = unsigned short > +template< typename TComponent = uint16_t > class RGBPixel:public FixedArray< TComponent, 3 > { public: diff --git a/Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.h b/Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.h index 1739967ce80..6c8530f2d1c 100644 --- a/Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.h +++ b/Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.h @@ -233,7 +233,7 @@ class ITK_EXPORT ShapedFloodFilledFunctionConditionalConstIterator: * 1 = pixel is not inside the function * 2 = pixel is inside the function, neighbor check incomplete * 3 = pixel is inside the function, neighbor check complete */ - typedef Image< unsigned char, itkGetStaticConstMacro(NDimensions) > TTempImage; + typedef Image< uint8_t, itkGetStaticConstMacro(NDimensions) > TTempImage; typename TTempImage::Pointer m_TempPtr; diff --git a/Modules/Core/Common/include/itkSparseImage.h b/Modules/Core/Common/include/itkSparseImage.h index b8e25492718..43ad4dc1a89 100644 --- a/Modules/Core/Common/include/itkSparseImage.h +++ b/Modules/Core/Common/include/itkSparseImage.h @@ -38,7 +38,7 @@ namespace itk * classes that process the SparseImage class such as * FiniteDifferenceSparseImageFilter. The node type must also have members * NodeType* Next and NodeType* Previous. A minimal node class which could - * be used to create the sparse equivalent of an itk::Image + * be used to create the sparse equivalent of an itk::Image * is shown below: * * \code @@ -47,7 +47,7 @@ namespace itk * NodeType* Next; * NodeType* Previous; * ImageType::IndexType m_Index; - * unsigned char m_Data; + * uint8_t m_Data; * }; * typedef itk::SparseImage SparseImageType; * \endcode diff --git a/Modules/Core/Common/src/itkFloatingPointExceptions.cxx b/Modules/Core/Common/src/itkFloatingPointExceptions.cxx index 36caa7b31a6..6261d0be6fe 100644 --- a/Modules/Core/Common/src/itkFloatingPointExceptions.cxx +++ b/Modules/Core/Common/src/itkFloatingPointExceptions.cxx @@ -324,7 +324,7 @@ extern "C" if ( sig == SIGFPE ) { #if DEFINED_INTEL - unsigned short x87cr,x87sr; + uint16_t x87cr,x87sr; unsigned int mxcsr; getx87cr (x87cr); diff --git a/Modules/Core/Common/src/itkNumericTraits.cxx b/Modules/Core/Common/src/itkNumericTraits.cxx index f2a78070f2f..710ab90da5a 100644 --- a/Modules/Core/Common/src/itkNumericTraits.cxx +++ b/Modules/Core/Common/src/itkNumericTraits.cxx @@ -22,17 +22,17 @@ namespace itk const bool NumericTraits< bool >:: Zero = false; const bool NumericTraits< bool >:: One = true; -const unsigned char NumericTraits< unsigned char >:: Zero = 0; -const unsigned char NumericTraits< unsigned char >:: One = 1; +const uint8_t NumericTraits< uint8_t >:: Zero = 0; +const uint8_t NumericTraits< uint8_t >:: One = 1; -const signed char NumericTraits< signed char >:: Zero = 0; -const signed char NumericTraits< signed char >:: One = 1; +const int8_t NumericTraits< int8_t >:: Zero = 0; +const int8_t NumericTraits< int8_t >:: One = 1; const char NumericTraits< char >:: Zero = 0; const char NumericTraits< char >:: One = 1; -const unsigned short NumericTraits< unsigned short >:: Zero = 0; -const unsigned short NumericTraits< unsigned short >:: One = 1; +const uint16_t NumericTraits< uint16_t >:: Zero = 0; +const uint16_t NumericTraits< uint16_t >:: One = 1; const short NumericTraits< short >:: Zero = 0; const short NumericTraits< short >:: One = 1; diff --git a/Modules/Core/Common/src/itkNumericTraitsCovariantVectorPixel.cxx b/Modules/Core/Common/src/itkNumericTraitsCovariantVectorPixel.cxx index e63057e8b6a..f513f03ab20 100644 --- a/Modules/Core/Common/src/itkNumericTraitsCovariantVectorPixel.cxx +++ b/Modules/Core/Common/src/itkNumericTraitsCovariantVectorPixel.cxx @@ -20,10 +20,10 @@ namespace itk { itkStaticNumericTraitsGenericArrayDimensionsMacro(CovariantVector, char); -itkStaticNumericTraitsGenericArrayDimensionsMacro(CovariantVector, unsigned char); -itkStaticNumericTraitsGenericArrayDimensionsMacro(CovariantVector, signed char); +itkStaticNumericTraitsGenericArrayDimensionsMacro(CovariantVector, uint8_t); +itkStaticNumericTraitsGenericArrayDimensionsMacro(CovariantVector, int8_t); itkStaticNumericTraitsGenericArrayDimensionsMacro(CovariantVector, short); -itkStaticNumericTraitsGenericArrayDimensionsMacro(CovariantVector, unsigned short); +itkStaticNumericTraitsGenericArrayDimensionsMacro(CovariantVector, uint16_t); itkStaticNumericTraitsGenericArrayDimensionsMacro(CovariantVector, int); itkStaticNumericTraitsGenericArrayDimensionsMacro(CovariantVector, unsigned int); itkStaticNumericTraitsGenericArrayDimensionsMacro(CovariantVector, long); diff --git a/Modules/Core/Common/src/itkNumericTraitsDiffusionTensor3DPixel.cxx b/Modules/Core/Common/src/itkNumericTraitsDiffusionTensor3DPixel.cxx index 93ac5667bac..6941d8eb542 100644 --- a/Modules/Core/Common/src/itkNumericTraitsDiffusionTensor3DPixel.cxx +++ b/Modules/Core/Common/src/itkNumericTraitsDiffusionTensor3DPixel.cxx @@ -39,9 +39,9 @@ namespace itk // DIFFUSIONTENSOR3DPIXELSTATICTRAITSMACRO(char); -DIFFUSIONTENSOR3DPIXELSTATICTRAITSMACRO(unsigned char); +DIFFUSIONTENSOR3DPIXELSTATICTRAITSMACRO(uint8_t); DIFFUSIONTENSOR3DPIXELSTATICTRAITSMACRO(short); -DIFFUSIONTENSOR3DPIXELSTATICTRAITSMACRO(unsigned short); +DIFFUSIONTENSOR3DPIXELSTATICTRAITSMACRO(uint16_t); DIFFUSIONTENSOR3DPIXELSTATICTRAITSMACRO(int); DIFFUSIONTENSOR3DPIXELSTATICTRAITSMACRO(unsigned int); DIFFUSIONTENSOR3DPIXELSTATICTRAITSMACRO(long); diff --git a/Modules/Core/Common/src/itkNumericTraitsFixedArrayPixel.cxx b/Modules/Core/Common/src/itkNumericTraitsFixedArrayPixel.cxx index 381445583e2..82dd07cdb8f 100644 --- a/Modules/Core/Common/src/itkNumericTraitsFixedArrayPixel.cxx +++ b/Modules/Core/Common/src/itkNumericTraitsFixedArrayPixel.cxx @@ -20,10 +20,10 @@ namespace itk { itkStaticNumericTraitsGenericArrayDimensionsMacro(FixedArray, char); -itkStaticNumericTraitsGenericArrayDimensionsMacro(FixedArray, unsigned char); -itkStaticNumericTraitsGenericArrayDimensionsMacro(FixedArray, signed char); +itkStaticNumericTraitsGenericArrayDimensionsMacro(FixedArray, uint8_t); +itkStaticNumericTraitsGenericArrayDimensionsMacro(FixedArray, int8_t); itkStaticNumericTraitsGenericArrayDimensionsMacro(FixedArray, short); -itkStaticNumericTraitsGenericArrayDimensionsMacro(FixedArray, unsigned short); +itkStaticNumericTraitsGenericArrayDimensionsMacro(FixedArray, uint16_t); itkStaticNumericTraitsGenericArrayDimensionsMacro(FixedArray, int); itkStaticNumericTraitsGenericArrayDimensionsMacro(FixedArray, unsigned int); itkStaticNumericTraitsGenericArrayDimensionsMacro(FixedArray, long); diff --git a/Modules/Core/Common/src/itkNumericTraitsPointPixel.cxx b/Modules/Core/Common/src/itkNumericTraitsPointPixel.cxx index 3c65a97ca49..27e6177a1ce 100644 --- a/Modules/Core/Common/src/itkNumericTraitsPointPixel.cxx +++ b/Modules/Core/Common/src/itkNumericTraitsPointPixel.cxx @@ -20,10 +20,10 @@ namespace itk { itkStaticNumericTraitsGenericArrayDimensionsMacro(Point, char); -itkStaticNumericTraitsGenericArrayDimensionsMacro(Point, unsigned char); -itkStaticNumericTraitsGenericArrayDimensionsMacro(Point, signed char); +itkStaticNumericTraitsGenericArrayDimensionsMacro(Point, uint8_t); +itkStaticNumericTraitsGenericArrayDimensionsMacro(Point, int8_t); itkStaticNumericTraitsGenericArrayDimensionsMacro(Point, short); -itkStaticNumericTraitsGenericArrayDimensionsMacro(Point, unsigned short); +itkStaticNumericTraitsGenericArrayDimensionsMacro(Point, uint16_t); itkStaticNumericTraitsGenericArrayDimensionsMacro(Point, int); itkStaticNumericTraitsGenericArrayDimensionsMacro(Point, unsigned int); itkStaticNumericTraitsGenericArrayDimensionsMacro(Point, long); diff --git a/Modules/Core/Common/src/itkNumericTraitsRGBAPixel.cxx b/Modules/Core/Common/src/itkNumericTraitsRGBAPixel.cxx index eaa95b76bcd..75fe46e8db7 100644 --- a/Modules/Core/Common/src/itkNumericTraitsRGBAPixel.cxx +++ b/Modules/Core/Common/src/itkNumericTraitsRGBAPixel.cxx @@ -37,10 +37,10 @@ namespace itk // List here the specializations of the Traits: // RGBAPIXELSTATICTRAITSMACRO(char); -RGBAPIXELSTATICTRAITSMACRO(signed char); -RGBAPIXELSTATICTRAITSMACRO(unsigned char); +RGBAPIXELSTATICTRAITSMACRO(int8_t); +RGBAPIXELSTATICTRAITSMACRO(uint8_t); RGBAPIXELSTATICTRAITSMACRO(short); -RGBAPIXELSTATICTRAITSMACRO(unsigned short); +RGBAPIXELSTATICTRAITSMACRO(uint16_t); RGBAPIXELSTATICTRAITSMACRO(int); RGBAPIXELSTATICTRAITSMACRO(unsigned int); RGBAPIXELSTATICTRAITSMACRO(long); diff --git a/Modules/Core/Common/src/itkNumericTraitsRGBPixel.cxx b/Modules/Core/Common/src/itkNumericTraitsRGBPixel.cxx index c249f781016..a1f08b499cb 100644 --- a/Modules/Core/Common/src/itkNumericTraitsRGBPixel.cxx +++ b/Modules/Core/Common/src/itkNumericTraitsRGBPixel.cxx @@ -37,10 +37,10 @@ namespace itk // List here the specializations of the Traits: // RGBPIXELSTATICTRAITSMACRO(char); -RGBPIXELSTATICTRAITSMACRO(signed char); -RGBPIXELSTATICTRAITSMACRO(unsigned char); +RGBPIXELSTATICTRAITSMACRO(int8_t); +RGBPIXELSTATICTRAITSMACRO(uint8_t); RGBPIXELSTATICTRAITSMACRO(short); -RGBPIXELSTATICTRAITSMACRO(unsigned short); +RGBPIXELSTATICTRAITSMACRO(uint16_t); RGBPIXELSTATICTRAITSMACRO(int); RGBPIXELSTATICTRAITSMACRO(unsigned int); RGBPIXELSTATICTRAITSMACRO(long); diff --git a/Modules/Core/Common/src/itkNumericTraitsTensorPixel.cxx b/Modules/Core/Common/src/itkNumericTraitsTensorPixel.cxx index 26c7e1cdc18..091c11430ac 100644 --- a/Modules/Core/Common/src/itkNumericTraitsTensorPixel.cxx +++ b/Modules/Core/Common/src/itkNumericTraitsTensorPixel.cxx @@ -20,10 +20,10 @@ namespace itk { itkStaticNumericTraitsGenericArrayDimensionsMacro(SymmetricSecondRankTensor, char); -itkStaticNumericTraitsGenericArrayDimensionsMacro(SymmetricSecondRankTensor, unsigned char); -itkStaticNumericTraitsGenericArrayDimensionsMacro(SymmetricSecondRankTensor, signed char); +itkStaticNumericTraitsGenericArrayDimensionsMacro(SymmetricSecondRankTensor, uint8_t); +itkStaticNumericTraitsGenericArrayDimensionsMacro(SymmetricSecondRankTensor, int8_t); itkStaticNumericTraitsGenericArrayDimensionsMacro(SymmetricSecondRankTensor, short); -itkStaticNumericTraitsGenericArrayDimensionsMacro(SymmetricSecondRankTensor, unsigned short); +itkStaticNumericTraitsGenericArrayDimensionsMacro(SymmetricSecondRankTensor, uint16_t); itkStaticNumericTraitsGenericArrayDimensionsMacro(SymmetricSecondRankTensor, int); itkStaticNumericTraitsGenericArrayDimensionsMacro(SymmetricSecondRankTensor, unsigned int); itkStaticNumericTraitsGenericArrayDimensionsMacro(SymmetricSecondRankTensor, long); diff --git a/Modules/Core/Common/src/itkNumericTraitsVectorPixel.cxx b/Modules/Core/Common/src/itkNumericTraitsVectorPixel.cxx index 9c92e05c8c9..409a3ebe5f0 100644 --- a/Modules/Core/Common/src/itkNumericTraitsVectorPixel.cxx +++ b/Modules/Core/Common/src/itkNumericTraitsVectorPixel.cxx @@ -20,10 +20,10 @@ namespace itk { itkStaticNumericTraitsGenericArrayDimensionsMacro(Vector, char); -itkStaticNumericTraitsGenericArrayDimensionsMacro(Vector, unsigned char); -itkStaticNumericTraitsGenericArrayDimensionsMacro(Vector, signed char); +itkStaticNumericTraitsGenericArrayDimensionsMacro(Vector, uint8_t); +itkStaticNumericTraitsGenericArrayDimensionsMacro(Vector, int8_t); itkStaticNumericTraitsGenericArrayDimensionsMacro(Vector, short); -itkStaticNumericTraitsGenericArrayDimensionsMacro(Vector, unsigned short); +itkStaticNumericTraitsGenericArrayDimensionsMacro(Vector, uint16_t); itkStaticNumericTraitsGenericArrayDimensionsMacro(Vector, int); itkStaticNumericTraitsGenericArrayDimensionsMacro(Vector, unsigned int); itkStaticNumericTraitsGenericArrayDimensionsMacro(Vector, long); diff --git a/Modules/Core/Common/test/itkByteSwapTest.cxx b/Modules/Core/Common/test/itkByteSwapTest.cxx index 11f953889cd..efe14790a73 100644 --- a/Modules/Core/Common/test/itkByteSwapTest.cxx +++ b/Modules/Core/Common/test/itkByteSwapTest.cxx @@ -25,8 +25,8 @@ int itkByteSwapTest ( int, char*[] ) std::cout << "Starting test" << std::endl; - unsigned char uc = 'a', uc1 = 'a'; - unsigned short us = 1, us1 = 1; + uint8_t uc = 'a', uc1 = 'a'; + uint16_t us = 1, us1 = 1; unsigned int ui = 1, ui1 = 1; unsigned long ul = 1, ul1 = 1; float f = 1.0, f1 = 1.0; @@ -46,35 +46,35 @@ int itkByteSwapTest ( int, char*[] ) if ( itk::ByteSwapper::SystemIsBigEndian() ) { - itk::ByteSwapper::SwapFromSystemToLittleEndian ( &uc ); - itk::ByteSwapper::SwapFromSystemToLittleEndian ( &uc ); + itk::ByteSwapper::SwapFromSystemToLittleEndian ( &uc ); + itk::ByteSwapper::SwapFromSystemToLittleEndian ( &uc ); } else { - itk::ByteSwapper::SwapFromSystemToBigEndian ( &uc ); - itk::ByteSwapper::SwapFromSystemToBigEndian ( &uc ); + itk::ByteSwapper::SwapFromSystemToBigEndian ( &uc ); + itk::ByteSwapper::SwapFromSystemToBigEndian ( &uc ); } if ( uc != uc1 ) { return EXIT_FAILURE; } - std::cout << "Passed unsigned char: " << uc << std::endl; + std::cout << "Passed uint8_t: " << uc << std::endl; if ( itk::ByteSwapper::SystemIsBE() ) { - itk::ByteSwapper::SwapFromSystemToLittleEndian ( &us ); - itk::ByteSwapper::SwapFromSystemToLittleEndian ( &us ); + itk::ByteSwapper::SwapFromSystemToLittleEndian ( &us ); + itk::ByteSwapper::SwapFromSystemToLittleEndian ( &us ); } else { - itk::ByteSwapper::SwapFromSystemToBigEndian ( &us ); - itk::ByteSwapper::SwapFromSystemToBigEndian ( &us ); + itk::ByteSwapper::SwapFromSystemToBigEndian ( &us ); + itk::ByteSwapper::SwapFromSystemToBigEndian ( &us ); } if ( us != us1 ) { return EXIT_FAILURE; } - std::cout << "Passed unsigned short: " << us << std::endl; + std::cout << "Passed uint16_t: " << us << std::endl; if ( itk::ByteSwapper::SystemIsBigEndian() ) { diff --git a/Modules/Core/Common/test/itkColorTableTest.cxx b/Modules/Core/Common/test/itkColorTableTest.cxx index 04b921e09b7..fd54f2cc5d9 100644 --- a/Modules/Core/Common/test/itkColorTableTest.cxx +++ b/Modules/Core/Common/test/itkColorTableTest.cxx @@ -50,9 +50,9 @@ template void ColorTableTest(const char *name) int itkColorTableTest(int, char* [] ) { - ColorTableTest ("unsigned char"); + ColorTableTest ("uint8_t"); ColorTableTest ("char"); - ColorTableTest("unsigned short"); + ColorTableTest("uint16_t"); ColorTableTest ("short"); ColorTableTest ("unsigned int"); ColorTableTest ("int"); @@ -62,11 +62,11 @@ int itkColorTableTest(int, char* [] ) ColorTableTest ("double"); // Find the closest color for a few colors - typedef itk::ColorTable ColorTableType; + typedef itk::ColorTable ColorTableType; ColorTableType::Pointer colors = ColorTableType::New(); unsigned int id; - itk::RGBPixel pixel; + itk::RGBPixel pixel; colors->UseRandomColors(10000); pixel.Set(255, 0, 0); id = colors->GetClosestColorTableId(pixel[0], pixel[1], pixel[2]); diff --git a/Modules/Core/Common/test/itkExtractImage3Dto2DTest.cxx b/Modules/Core/Common/test/itkExtractImage3Dto2DTest.cxx index 500edc17879..8c2a4e1a854 100644 --- a/Modules/Core/Common/test/itkExtractImage3Dto2DTest.cxx +++ b/Modules/Core/Common/test/itkExtractImage3Dto2DTest.cxx @@ -22,8 +22,8 @@ int itkExtractImage3Dto2DTest(int, char* [] ) { - typedef itk::Image Image3DType; - typedef itk::Image Image2DType; + typedef itk::Image Image3DType; + typedef itk::Image Image2DType; typedef itk::ExtractImageFilter ExtractType; typedef itk::RandomImageSource RandomImageSourceType; diff --git a/Modules/Core/Common/test/itkFactoryTestLib.cxx b/Modules/Core/Common/test/itkFactoryTestLib.cxx index 2dc697cf6b7..cd18c916d7d 100644 --- a/Modules/Core/Common/test/itkFactoryTestLib.cxx +++ b/Modules/Core/Common/test/itkFactoryTestLib.cxx @@ -180,12 +180,12 @@ class ImportImageContainerFactory : public itk::ObjectFactoryBase ImportImageContainerFactory() { OverrideTypeMacro(short); - OverrideTypeMacro(unsigned char); + OverrideTypeMacro(uint8_t); OverrideTypeMacro(float); OverrideTypeMacro(int); OverrideTypeMacro(double); - OverrideTypeMacro(itk::RGBPixel); - OverrideTypeMacro(itk::RGBPixel); + OverrideTypeMacro(itk::RGBPixel); + OverrideTypeMacro(itk::RGBPixel); } }; diff --git a/Modules/Core/Common/test/itkFixedArrayTest.cxx b/Modules/Core/Common/test/itkFixedArrayTest.cxx index 332b40412da..e9c255d58e5 100644 --- a/Modules/Core/Common/test/itkFixedArrayTest.cxx +++ b/Modules/Core/Common/test/itkFixedArrayTest.cxx @@ -133,14 +133,14 @@ int itkFixedArrayTest(int, char* [] ) // Try all index types #define TRY_INDEX_CONST(T) {T in = 10; if (array20[in] != 10) {std::cerr << "index failed" << std::endl; return EXIT_FAILURE;}} TRY_INDEX_CONST(short); - TRY_INDEX_CONST(unsigned short); + TRY_INDEX_CONST(uint16_t); TRY_INDEX_CONST(int); TRY_INDEX_CONST(unsigned int); TRY_INDEX_CONST(long); TRY_INDEX_CONST(unsigned long); #define TRY_INDEX(T) {T in = 10; array20[in] = 10;} TRY_INDEX(short); - TRY_INDEX(unsigned short); + TRY_INDEX(uint16_t); TRY_INDEX(int); TRY_INDEX(unsigned int); TRY_INDEX(long); diff --git a/Modules/Core/Common/test/itkImageDuplicatorTest.cxx b/Modules/Core/Common/test/itkImageDuplicatorTest.cxx index 595fa00aac3..99e19a15a3e 100644 --- a/Modules/Core/Common/test/itkImageDuplicatorTest.cxx +++ b/Modules/Core/Common/test/itkImageDuplicatorTest.cxx @@ -138,7 +138,7 @@ int itkImageDuplicatorTest(int, char* [] ) { /** Create an RGB image image */ - typedef itk::Image,3> RGBImageType; + typedef itk::Image,3> RGBImageType; std::cout << "Creating simulated image: "; RGBImageType::Pointer m_RGBImage = RGBImageType::New(); m_RGBImage->SetRegions( region ); @@ -147,13 +147,13 @@ int itkImageDuplicatorTest(int, char* [] ) itk::ImageRegionIterator it3(m_RGBImage,region); it3.GoToBegin(); - unsigned char r = 0; - unsigned char g = 1; - unsigned char b = 2; + uint8_t r = 0; + uint8_t g = 1; + uint8_t b = 2; while(!it3.IsAtEnd()) { - itk::RGBPixel pixel; + itk::RGBPixel pixel; pixel.SetRed(r); pixel.SetGreen(g); pixel.SetBlue(b); @@ -200,7 +200,7 @@ int itkImageDuplicatorTest(int, char* [] ) while(!it4.IsAtEnd()) { - itk::RGBPixel pixel = it4.Get(); + itk::RGBPixel pixel = it4.Get(); if(pixel.GetRed() != r) { std::cout << "Error: Pixel R value mismatched: " << (float)pixel.GetRed() << " vs. " << (float)r << std::endl; diff --git a/Modules/Core/Common/test/itkImageFillBufferTest.cxx b/Modules/Core/Common/test/itkImageFillBufferTest.cxx index 92d64665e5e..82cd0ea2314 100644 --- a/Modules/Core/Common/test/itkImageFillBufferTest.cxx +++ b/Modules/Core/Common/test/itkImageFillBufferTest.cxx @@ -29,7 +29,7 @@ int itkImageFillBufferTest(int argc, char * argv[]) return EXIT_FAILURE; } - typedef itk::Image ImageType; + typedef itk::Image ImageType; ImageType::Pointer image = ImageType::New(); ImageType::SizeType size; diff --git a/Modules/Core/Common/test/itkImageIteratorTest.cxx b/Modules/Core/Common/test/itkImageIteratorTest.cxx index a9fe0c63065..94406a30462 100644 --- a/Modules/Core/Common/test/itkImageIteratorTest.cxx +++ b/Modules/Core/Common/test/itkImageIteratorTest.cxx @@ -48,20 +48,20 @@ int itkImageIteratorTest(int, char* [] ) const unsigned int ImageDimension = 3; std::cout << "Creating an image" << std::endl; - itk::Image, ImageDimension>::Pointer - o3 = itk::Image, ImageDimension>::New(); + itk::Image, ImageDimension>::Pointer + o3 = itk::Image, ImageDimension>::New(); float origin3D[ImageDimension] = { 5, 2.1, 8.1}; float spacing3D[ImageDimension] = { 1.5, 2.1, 1}; - itk::Image, ImageDimension>::SizeType imageSize3D = {{ 20, 40, 60 }}; + itk::Image, ImageDimension>::SizeType imageSize3D = {{ 20, 40, 60 }}; - itk::Image, ImageDimension>::IndexType startIndex3D = {{5, 4, 1}}; - itk::Image, ImageDimension>::IndexType regionStartIndex3D = {{5, 10, 12}}; - itk::Image, ImageDimension>::IndexType regionEndIndex3D = {{8, 15, 17}}; + itk::Image, ImageDimension>::IndexType startIndex3D = {{5, 4, 1}}; + itk::Image, ImageDimension>::IndexType regionStartIndex3D = {{5, 10, 12}}; + itk::Image, ImageDimension>::IndexType regionEndIndex3D = {{8, 15, 17}}; - itk::Image, ImageDimension>::RegionType region; + itk::Image, ImageDimension>::RegionType region; region.SetSize(imageSize3D); region.SetIndex(startIndex3D); o3->SetRegions( region ); @@ -69,12 +69,12 @@ int itkImageIteratorTest(int, char* [] ) o3->SetSpacing(spacing3D); o3->Allocate(); - itk::Vector fillValue; - fillValue.Fill(itk::NumericTraits::max()); + itk::Vector fillValue; + fillValue.Fill(itk::NumericTraits::max()); o3->FillBuffer(fillValue); std::cout << "Setting/Getting a pixel" << std::endl; - itk::Vector vec; + itk::Vector vec; vec[0] = 5; vec[1] = 4; @@ -86,7 +86,7 @@ int itkImageIteratorTest(int, char* [] ) (*o3)[regionEndIndex3D] = (*o3)[regionStartIndex3D]; TestConstPixelAccess(*o3, *o3); - typedef itk::Vector< unsigned short, 5 > VectorPixelType; + typedef itk::Vector< uint16_t, 5 > VectorPixelType; typedef itk::Image< VectorPixelType, ImageDimension > VectorImageType; typedef itk::ImageIterator< VectorImageType > VectorImageIterator; diff --git a/Modules/Core/Common/test/itkImageIteratorWithIndexTest.cxx b/Modules/Core/Common/test/itkImageIteratorWithIndexTest.cxx index 86614d1e854..746aa31f513 100644 --- a/Modules/Core/Common/test/itkImageIteratorWithIndexTest.cxx +++ b/Modules/Core/Common/test/itkImageIteratorWithIndexTest.cxx @@ -116,8 +116,8 @@ int itkImageIteratorWithIndexTest(int, char* [] ) testPassed = false; } - std::cout << "Testing with Image< unsigned char, 3 > " << std::endl; - itkImageIteratorWithIndexTestIteratorTester< unsigned char > TesterUC( 10 ); + std::cout << "Testing with Image< uint8_t, 3 > " << std::endl; + itkImageIteratorWithIndexTestIteratorTester< uint8_t > TesterUC( 10 ); if( TesterUC.TestIterator() == false ) { testPassed = false; @@ -138,8 +138,8 @@ int itkImageIteratorWithIndexTest(int, char* [] ) testPassed = false; } - std::cout << "Testing with Image< unsigned short, 3 > " << std::endl; - itkImageIteratorWithIndexTestIteratorTester< unsigned short > TesterUS( 10 ); + std::cout << "Testing with Image< uint16_t, 3 > " << std::endl; + itkImageIteratorWithIndexTestIteratorTester< uint16_t > TesterUS( 10 ); if( TesterUS.TestIterator() == false ) { testPassed = false; @@ -207,8 +207,8 @@ int itkImageIteratorWithIndexTest(int, char* [] ) testPassed = false; } - std::cout << "Testing with Image< itk::Vector, 3 > " << std::endl; - typedef itk::Vector VUC; + std::cout << "Testing with Image< itk::Vector, 3 > " << std::endl; + typedef itk::Vector VUC; VUC vuc; vuc.Fill( 10 ); itkImageIteratorWithIndexTestIteratorTester< VUC > TesterVUC( vuc ); @@ -235,8 +235,8 @@ int itkImageIteratorWithIndexTest(int, char* [] ) testPassed = false; } - std::cout << "Testing with Image< itk::Vector, 3 > " << std::endl; - typedef itk::Vector VUS; + std::cout << "Testing with Image< itk::Vector, 3 > " << std::endl; + typedef itk::Vector VUS; VUS vus; vus.Fill( 10 ); itkImageIteratorWithIndexTestIteratorTester< VUS > TesterVUS( vus ); diff --git a/Modules/Core/Common/test/itkImageIteratorsForwardBackwardTest.cxx b/Modules/Core/Common/test/itkImageIteratorsForwardBackwardTest.cxx index a9274f8e94d..e67863a0ea4 100644 --- a/Modules/Core/Common/test/itkImageIteratorsForwardBackwardTest.cxx +++ b/Modules/Core/Common/test/itkImageIteratorsForwardBackwardTest.cxx @@ -27,7 +27,7 @@ int itkImageIteratorsForwardBackwardTest(int, char* [] ) { std::cout << "Creating an image" << std::endl; - typedef itk::Image ImageType; + typedef itk::Image ImageType; ImageType::Pointer myImage = ImageType::New(); diff --git a/Modules/Core/Common/test/itkImageRegionExclusionIteratorWithIndexTest.cxx b/Modules/Core/Common/test/itkImageRegionExclusionIteratorWithIndexTest.cxx index bfcd7499ee9..3051619230c 100644 --- a/Modules/Core/Common/test/itkImageRegionExclusionIteratorWithIndexTest.cxx +++ b/Modules/Core/Common/test/itkImageRegionExclusionIteratorWithIndexTest.cxx @@ -28,7 +28,7 @@ static bool RunTest(const TRegion & region, const TRegion & exclusionRegion) const unsigned int ImageDimension = TRegion::ImageDimension; typedef itk::Index< ImageDimension > IndexPixelType; - typedef unsigned char ValuePixelType; + typedef uint8_t ValuePixelType; typedef itk::Image< IndexPixelType, ImageDimension > IndexImageType; typedef itk::Image< ValuePixelType, ImageDimension > ValueImageType; @@ -50,8 +50,8 @@ static bool RunTest(const TRegion & region, const TRegion & exclusionRegion) typedef itk::ImageRegionIteratorWithIndex< ValueImageType > ValueIteratorType; typedef itk::ImageRegionIteratorWithIndex< IndexImageType > IndexIteratorType; - const unsigned char normalRegionValue = 100; - const unsigned char exclusionRegionValue = 200; + const uint8_t normalRegionValue = 100; + const uint8_t exclusionRegionValue = 200; // Initialize the Image IndexIteratorType ii( myIndexImage, region ); diff --git a/Modules/Core/Common/test/itkImageRegionIteratorTest.cxx b/Modules/Core/Common/test/itkImageRegionIteratorTest.cxx index 46b35b17875..5f68b9de656 100644 --- a/Modules/Core/Common/test/itkImageRegionIteratorTest.cxx +++ b/Modules/Core/Common/test/itkImageRegionIteratorTest.cxx @@ -46,25 +46,25 @@ void TestConstPixelAccess(const itk::Image &in, int itkImageRegionIteratorTest(int, char* [] ) { std::cout << "Creating an image" << std::endl; - itk::Image, 3>::Pointer - o3 = itk::Image, 3>::New(); + itk::Image, 3>::Pointer + o3 = itk::Image, 3>::New(); int status = 0; float origin3D[3] = { 5, 2.1, 8.1}; float spacing3D[3] = { 1.5, 2.1, 1}; - itk::Image, 3>::SizeType imageSize3D = {{ 20, 40, 60 }}; - itk::Image, 3>::SizeType bufferSize3D = {{ 8, 20, 14 }}; - itk::Image, 3>::SizeType regionSize3D = {{ 4, 6, 6 }}; + itk::Image, 3>::SizeType imageSize3D = {{ 20, 40, 60 }}; + itk::Image, 3>::SizeType bufferSize3D = {{ 8, 20, 14 }}; + itk::Image, 3>::SizeType regionSize3D = {{ 4, 6, 6 }}; - itk::Image, 3>::IndexType startIndex3D = {{5, 4, 1}}; - itk::Image, 3>::IndexType bufferStartIndex3D = {{2, 3, 5}}; - itk::Image, 3>::IndexType regionStartIndex3D = {{5, 10, 12}}; - itk::Image, 3>::IndexType regionEndIndex3D = {{8, 15, 17}}; + itk::Image, 3>::IndexType startIndex3D = {{5, 4, 1}}; + itk::Image, 3>::IndexType bufferStartIndex3D = {{2, 3, 5}}; + itk::Image, 3>::IndexType regionStartIndex3D = {{5, 10, 12}}; + itk::Image, 3>::IndexType regionEndIndex3D = {{8, 15, 17}}; - itk::Image, 3>::RegionType region; + itk::Image, 3>::RegionType region; region.SetSize(imageSize3D); region.SetIndex(startIndex3D); o3->SetLargestPossibleRegion( region ); @@ -81,7 +81,7 @@ int itkImageRegionIteratorTest(int, char* [] ) o3->Allocate(); std::cout << "Setting/Getting a pixel" << std::endl; - itk::Vector vec; + itk::Vector vec; vec[0] = 5; vec[1] = 4; @@ -94,40 +94,40 @@ int itkImageRegionIteratorTest(int, char* [] ) TestConstPixelAccess(*o3, *o3); - itk::ImageIterator, 3> > standardIt(o3, region); + itk::ImageIterator, 3> > standardIt(o3, region); // Iterate over a region using a simple for loop - itk::ImageRegionIterator, 3> > it(o3, region); + itk::ImageRegionIterator, 3> > it(o3, region); std::cout << "Simple iterator loop: "; for ( ; !it.IsAtEnd(); ++it) { - itk::Image, 3>::IndexType index = it.GetIndex(); + itk::Image, 3>::IndexType index = it.GetIndex(); std::cout << index << std::endl; } - itk::ImageRegionConstIterator, 3> > standardCIt(o3, region); + itk::ImageRegionConstIterator, 3> > standardCIt(o3, region); // Iterate over a region using a simple for loop and a const iterator - itk::ImageRegionConstIterator, 3> > cit(o3, region); + itk::ImageRegionConstIterator, 3> > cit(o3, region); std::cout << "Simple const iterator loop: "; for ( ; !cit.IsAtEnd(); ++cit) { - itk::Image, 3>::IndexType index = cit.GetIndex(); + itk::Image, 3>::IndexType index = cit.GetIndex(); std::cout << index << std::endl; } // Iterator over the region backwards using a simple for loop - itk::ImageRegionIterator, 3> > backIt(o3, region); + itk::ImageRegionIterator, 3> > backIt(o3, region); backIt.GoToEnd(); // one pixel past the end of the region do { --backIt; - itk::Image, 3>::IndexType index = backIt.GetIndex(); + itk::Image, 3>::IndexType index = backIt.GetIndex(); std::cout << "Simple iterator backwards loop: "; for (unsigned int i=0; i < index.GetIndexDimension(); i++) { diff --git a/Modules/Core/Common/test/itkImageReverseIteratorTest.cxx b/Modules/Core/Common/test/itkImageReverseIteratorTest.cxx index f9c3d893eac..53019881bd4 100644 --- a/Modules/Core/Common/test/itkImageReverseIteratorTest.cxx +++ b/Modules/Core/Common/test/itkImageReverseIteratorTest.cxx @@ -46,7 +46,7 @@ void TestConstPixelAccess(const itk::Image &in, int itkImageReverseIteratorTest(int, char* [] ) { - typedef itk::Vector< unsigned short, 5 > PixelType; + typedef itk::Vector< uint16_t, 5 > PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > ImageType; @@ -178,8 +178,8 @@ int itkImageReverseIteratorTest(int, char* [] ) for ( ; !it.IsAtEnd(); ++it) { --castBackReverseIt; - itk::Image, 3>::IndexType index = it.GetIndex(); - itk::Image, 3>::IndexType rindex = castBackReverseIt.GetIndex(); + itk::Image, 3>::IndexType index = it.GetIndex(); + itk::Image, 3>::IndexType rindex = castBackReverseIt.GetIndex(); for (unsigned int i=0; i < index.GetIndexDimension(); i++) { if (index[i] != rindex[i]) diff --git a/Modules/Core/Common/test/itkIteratorTests.cxx b/Modules/Core/Common/test/itkIteratorTests.cxx index 94561d0f7c4..d97c374b8f8 100644 --- a/Modules/Core/Common/test/itkIteratorTests.cxx +++ b/Modules/Core/Common/test/itkIteratorTests.cxx @@ -27,7 +27,7 @@ int itkIteratorTests(int, char* [] ) { std::cout << "Creating an image" << std::endl; - typedef itk::Image ScalarImage; + typedef itk::Image ScalarImage; ScalarImage::Pointer o3 = ScalarImage::New(); double origin3D[3] = { 5, 2.1, 8.1}; @@ -67,8 +67,8 @@ int itkIteratorTests(int, char* [] ) // memset start = clock(); - unsigned short *ptr = o3->GetBufferPointer(); - memset(ptr, 0, num*sizeof(unsigned short)); + uint16_t *ptr = o3->GetBufferPointer(); + memset(ptr, 0, num*sizeof(uint16_t)); end = clock(); elapsedTime = (end - start) / (double) CLOCKS_PER_SEC; @@ -125,7 +125,7 @@ int itkIteratorTests(int, char* [] ) start = clock(); itk::ImageRegionIterator it(o3, region); - unsigned short scalar; + uint16_t scalar; scalar = 5; i = 0; diff --git a/Modules/Core/Common/test/itkLineIteratorTest.cxx b/Modules/Core/Common/test/itkLineIteratorTest.cxx index 28349329067..0577b57f67f 100644 --- a/Modules/Core/Common/test/itkLineIteratorTest.cxx +++ b/Modules/Core/Common/test/itkLineIteratorTest.cxx @@ -27,7 +27,7 @@ int itkLineIteratorTest(int argc, char*argv[]) { const int Dimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image ImageType; typedef ImageType::RegionType::IndexType IndexType; typedef IndexType::IndexValueType IndexValueType; diff --git a/Modules/Core/Common/test/itkMathCastWithRangeCheckTest.cxx b/Modules/Core/Common/test/itkMathCastWithRangeCheckTest.cxx index cc22ae1d91c..d12ebed261b 100644 --- a/Modules/Core/Common/test/itkMathCastWithRangeCheckTest.cxx +++ b/Modules/Core/Common/test/itkMathCastWithRangeCheckTest.cxx @@ -96,10 +96,10 @@ bool DoCastWithRangeCheckTestForTypes( const T1* = 0 ) // call method for all type to be converted to type T1 bool pass = true; - pass &= DoCastWithRangeCheckTest(); - pass &= DoCastWithRangeCheckTest(); - pass &= DoCastWithRangeCheckTest(); - pass &= DoCastWithRangeCheckTest(); + pass &= DoCastWithRangeCheckTest(); + pass &= DoCastWithRangeCheckTest(); + pass &= DoCastWithRangeCheckTest(); + pass &= DoCastWithRangeCheckTest(); pass &= DoCastWithRangeCheckTest(); pass &= DoCastWithRangeCheckTest(); pass &= DoCastWithRangeCheckTest(); @@ -129,18 +129,18 @@ int itkMathCastWithRangeCheckTest( int, char *[] ) } - DoCastWithRangeCheckTestExulstive(); - DoCastWithRangeCheckTestExulstive(); - DoCastWithRangeCheckTestExulstive(); - DoCastWithRangeCheckTestExulstive(); + DoCastWithRangeCheckTestExulstive(); + DoCastWithRangeCheckTestExulstive(); + DoCastWithRangeCheckTestExulstive(); + DoCastWithRangeCheckTestExulstive(); - DoCastWithRangeCheckTestExulstive(); + DoCastWithRangeCheckTestExulstive(); - pass &= DoCastWithRangeCheckTestForTypes(); - pass &= DoCastWithRangeCheckTestForTypes(); - pass &= DoCastWithRangeCheckTestForTypes(); - pass &= DoCastWithRangeCheckTestForTypes(); + pass &= DoCastWithRangeCheckTestForTypes(); + pass &= DoCastWithRangeCheckTestForTypes(); + pass &= DoCastWithRangeCheckTestForTypes(); + pass &= DoCastWithRangeCheckTestForTypes(); pass &= DoCastWithRangeCheckTestForTypes(); pass &= DoCastWithRangeCheckTestForTypes(); pass &= DoCastWithRangeCheckTestForTypes(); diff --git a/Modules/Core/Common/test/itkMathRoundTest2.cxx b/Modules/Core/Common/test/itkMathRoundTest2.cxx index 3c729ea76d2..77ab5c594c2 100644 --- a/Modules/Core/Common/test/itkMathRoundTest2.cxx +++ b/Modules/Core/Common/test/itkMathRoundTest2.cxx @@ -151,7 +151,7 @@ int itkMathRoundTest2( int, char *[] ) bool ok = true; std::cout << "Testing char type" << std::endl; - ok &= TemplatedRoundTest(); + ok &= TemplatedRoundTest(); std::cout << "Testing short type" << std::endl; ok &= TemplatedRoundTest(); std::cout << "Testing int type" << std::endl; diff --git a/Modules/Core/Common/test/itkNumericTraitsTest.cxx b/Modules/Core/Common/test/itkNumericTraitsTest.cxx index 10a7bb683b6..24630882b17 100644 --- a/Modules/Core/Common/test/itkNumericTraitsTest.cxx +++ b/Modules/Core/Common/test/itkNumericTraitsTest.cxx @@ -115,12 +115,12 @@ template void CheckTraits(const char *name, T t) int itkNumericTraitsTest(int, char* [] ) { CheckTraits("char", static_cast(0)); - CheckTraits("signed char", static_cast(0)); - CheckTraits("unsigned char", static_cast(0)); + CheckTraits("int8_t", static_cast(0)); + CheckTraits("uint8_t", static_cast(0)); CheckTraits("short", static_cast(0)); - CheckTraits("signed short", static_cast(0)); - CheckTraits("unsigned short", static_cast(0)); + CheckTraits("int16_t", static_cast(0)); + CheckTraits("uint16_t", static_cast(0)); CheckTraits("int", static_cast(0)); CheckTraits("signed int", static_cast(0)); @@ -148,12 +148,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::CovariantVector() CheckFixedArrayTraits(itk::CovariantVector()); - CheckFixedArrayTraits(itk::CovariantVector()); - CheckFixedArrayTraits(itk::CovariantVector()); + CheckFixedArrayTraits(itk::CovariantVector()); + CheckFixedArrayTraits(itk::CovariantVector()); CheckFixedArrayTraits(itk::CovariantVector()); - CheckFixedArrayTraits(itk::CovariantVector()); - CheckFixedArrayTraits(itk::CovariantVector()); + CheckFixedArrayTraits(itk::CovariantVector()); + CheckFixedArrayTraits(itk::CovariantVector()); CheckFixedArrayTraits(itk::CovariantVector()); CheckFixedArrayTraits(itk::CovariantVector()); @@ -174,12 +174,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::CovariantVector() CheckFixedArrayTraits(itk::CovariantVector()); - CheckFixedArrayTraits(itk::CovariantVector()); - CheckFixedArrayTraits(itk::CovariantVector()); + CheckFixedArrayTraits(itk::CovariantVector()); + CheckFixedArrayTraits(itk::CovariantVector()); CheckFixedArrayTraits(itk::CovariantVector()); - CheckFixedArrayTraits(itk::CovariantVector()); - CheckFixedArrayTraits(itk::CovariantVector()); + CheckFixedArrayTraits(itk::CovariantVector()); + CheckFixedArrayTraits(itk::CovariantVector()); CheckFixedArrayTraits(itk::CovariantVector()); CheckFixedArrayTraits(itk::CovariantVector()); @@ -200,12 +200,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::CovariantVector() CheckFixedArrayTraits(itk::CovariantVector()); - CheckFixedArrayTraits(itk::CovariantVector()); - CheckFixedArrayTraits(itk::CovariantVector()); + CheckFixedArrayTraits(itk::CovariantVector()); + CheckFixedArrayTraits(itk::CovariantVector()); CheckFixedArrayTraits(itk::CovariantVector()); - CheckFixedArrayTraits(itk::CovariantVector()); - CheckFixedArrayTraits(itk::CovariantVector()); + CheckFixedArrayTraits(itk::CovariantVector()); + CheckFixedArrayTraits(itk::CovariantVector()); CheckFixedArrayTraits(itk::CovariantVector()); CheckFixedArrayTraits(itk::CovariantVector()); @@ -226,12 +226,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::CovariantVector() CheckFixedArrayTraits(itk::CovariantVector()); - CheckFixedArrayTraits(itk::CovariantVector()); - CheckFixedArrayTraits(itk::CovariantVector()); + CheckFixedArrayTraits(itk::CovariantVector()); + CheckFixedArrayTraits(itk::CovariantVector()); CheckFixedArrayTraits(itk::CovariantVector()); - CheckFixedArrayTraits(itk::CovariantVector()); - CheckFixedArrayTraits(itk::CovariantVector()); + CheckFixedArrayTraits(itk::CovariantVector()); + CheckFixedArrayTraits(itk::CovariantVector()); CheckFixedArrayTraits(itk::CovariantVector()); CheckFixedArrayTraits(itk::CovariantVector()); @@ -252,12 +252,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::CovariantVector() CheckFixedArrayTraits(itk::CovariantVector()); - CheckFixedArrayTraits(itk::CovariantVector()); - CheckFixedArrayTraits(itk::CovariantVector()); + CheckFixedArrayTraits(itk::CovariantVector()); + CheckFixedArrayTraits(itk::CovariantVector()); CheckFixedArrayTraits(itk::CovariantVector()); - CheckFixedArrayTraits(itk::CovariantVector()); - CheckFixedArrayTraits(itk::CovariantVector()); + CheckFixedArrayTraits(itk::CovariantVector()); + CheckFixedArrayTraits(itk::CovariantVector()); CheckFixedArrayTraits(itk::CovariantVector()); CheckFixedArrayTraits(itk::CovariantVector()); @@ -278,12 +278,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::FixedArray() CheckFixedArrayTraits(itk::FixedArray()); - CheckFixedArrayTraits(itk::FixedArray()); - CheckFixedArrayTraits(itk::FixedArray()); + CheckFixedArrayTraits(itk::FixedArray()); + CheckFixedArrayTraits(itk::FixedArray()); CheckFixedArrayTraits(itk::FixedArray()); - CheckFixedArrayTraits(itk::FixedArray()); - CheckFixedArrayTraits(itk::FixedArray()); + CheckFixedArrayTraits(itk::FixedArray()); + CheckFixedArrayTraits(itk::FixedArray()); CheckFixedArrayTraits(itk::FixedArray()); CheckFixedArrayTraits(itk::FixedArray()); @@ -304,12 +304,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::FixedArray() CheckFixedArrayTraits(itk::FixedArray()); - CheckFixedArrayTraits(itk::FixedArray()); - CheckFixedArrayTraits(itk::FixedArray()); + CheckFixedArrayTraits(itk::FixedArray()); + CheckFixedArrayTraits(itk::FixedArray()); CheckFixedArrayTraits(itk::FixedArray()); - CheckFixedArrayTraits(itk::FixedArray()); - CheckFixedArrayTraits(itk::FixedArray()); + CheckFixedArrayTraits(itk::FixedArray()); + CheckFixedArrayTraits(itk::FixedArray()); CheckFixedArrayTraits(itk::FixedArray()); CheckFixedArrayTraits(itk::FixedArray()); @@ -330,12 +330,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::FixedArray() CheckFixedArrayTraits(itk::FixedArray()); - CheckFixedArrayTraits(itk::FixedArray()); - CheckFixedArrayTraits(itk::FixedArray()); + CheckFixedArrayTraits(itk::FixedArray()); + CheckFixedArrayTraits(itk::FixedArray()); CheckFixedArrayTraits(itk::FixedArray()); - CheckFixedArrayTraits(itk::FixedArray()); - CheckFixedArrayTraits(itk::FixedArray()); + CheckFixedArrayTraits(itk::FixedArray()); + CheckFixedArrayTraits(itk::FixedArray()); CheckFixedArrayTraits(itk::FixedArray()); CheckFixedArrayTraits(itk::FixedArray()); @@ -356,12 +356,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::FixedArray() CheckFixedArrayTraits(itk::FixedArray()); - CheckFixedArrayTraits(itk::FixedArray()); - CheckFixedArrayTraits(itk::FixedArray()); + CheckFixedArrayTraits(itk::FixedArray()); + CheckFixedArrayTraits(itk::FixedArray()); CheckFixedArrayTraits(itk::FixedArray()); - CheckFixedArrayTraits(itk::FixedArray()); - CheckFixedArrayTraits(itk::FixedArray()); + CheckFixedArrayTraits(itk::FixedArray()); + CheckFixedArrayTraits(itk::FixedArray()); CheckFixedArrayTraits(itk::FixedArray()); CheckFixedArrayTraits(itk::FixedArray()); @@ -382,12 +382,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::FixedArray() CheckFixedArrayTraits(itk::FixedArray()); - CheckFixedArrayTraits(itk::FixedArray()); - CheckFixedArrayTraits(itk::FixedArray()); + CheckFixedArrayTraits(itk::FixedArray()); + CheckFixedArrayTraits(itk::FixedArray()); CheckFixedArrayTraits(itk::FixedArray()); - CheckFixedArrayTraits(itk::FixedArray()); - CheckFixedArrayTraits(itk::FixedArray()); + CheckFixedArrayTraits(itk::FixedArray()); + CheckFixedArrayTraits(itk::FixedArray()); CheckFixedArrayTraits(itk::FixedArray()); CheckFixedArrayTraits(itk::FixedArray()); @@ -408,12 +408,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::Point() CheckFixedArrayTraits(itk::Point()); - CheckFixedArrayTraits(itk::Point()); - CheckFixedArrayTraits(itk::Point()); + CheckFixedArrayTraits(itk::Point()); + CheckFixedArrayTraits(itk::Point()); CheckFixedArrayTraits(itk::Point()); - CheckFixedArrayTraits(itk::Point()); - CheckFixedArrayTraits(itk::Point()); + CheckFixedArrayTraits(itk::Point()); + CheckFixedArrayTraits(itk::Point()); CheckFixedArrayTraits(itk::Point()); CheckFixedArrayTraits(itk::Point()); @@ -434,12 +434,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::Point() CheckFixedArrayTraits(itk::Point()); - CheckFixedArrayTraits(itk::Point()); - CheckFixedArrayTraits(itk::Point()); + CheckFixedArrayTraits(itk::Point()); + CheckFixedArrayTraits(itk::Point()); CheckFixedArrayTraits(itk::Point()); - CheckFixedArrayTraits(itk::Point()); - CheckFixedArrayTraits(itk::Point()); + CheckFixedArrayTraits(itk::Point()); + CheckFixedArrayTraits(itk::Point()); CheckFixedArrayTraits(itk::Point()); CheckFixedArrayTraits(itk::Point()); @@ -460,12 +460,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::Point() CheckFixedArrayTraits(itk::Point()); - CheckFixedArrayTraits(itk::Point()); - CheckFixedArrayTraits(itk::Point()); + CheckFixedArrayTraits(itk::Point()); + CheckFixedArrayTraits(itk::Point()); CheckFixedArrayTraits(itk::Point()); - CheckFixedArrayTraits(itk::Point()); - CheckFixedArrayTraits(itk::Point()); + CheckFixedArrayTraits(itk::Point()); + CheckFixedArrayTraits(itk::Point()); CheckFixedArrayTraits(itk::Point()); CheckFixedArrayTraits(itk::Point()); @@ -486,12 +486,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::Point() CheckFixedArrayTraits(itk::Point()); - CheckFixedArrayTraits(itk::Point()); - CheckFixedArrayTraits(itk::Point()); + CheckFixedArrayTraits(itk::Point()); + CheckFixedArrayTraits(itk::Point()); CheckFixedArrayTraits(itk::Point()); - CheckFixedArrayTraits(itk::Point()); - CheckFixedArrayTraits(itk::Point()); + CheckFixedArrayTraits(itk::Point()); + CheckFixedArrayTraits(itk::Point()); CheckFixedArrayTraits(itk::Point()); CheckFixedArrayTraits(itk::Point()); @@ -512,12 +512,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::Point() CheckFixedArrayTraits(itk::Point()); - CheckFixedArrayTraits(itk::Point()); - CheckFixedArrayTraits(itk::Point()); + CheckFixedArrayTraits(itk::Point()); + CheckFixedArrayTraits(itk::Point()); CheckFixedArrayTraits(itk::Point()); - CheckFixedArrayTraits(itk::Point()); - CheckFixedArrayTraits(itk::Point()); + CheckFixedArrayTraits(itk::Point()); + CheckFixedArrayTraits(itk::Point()); CheckFixedArrayTraits(itk::Point()); CheckFixedArrayTraits(itk::Point()); @@ -538,12 +538,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::RGBPixel() CheckFixedArrayTraits(itk::RGBPixel()); - CheckFixedArrayTraits(itk::RGBPixel()); - CheckFixedArrayTraits(itk::RGBPixel()); + CheckFixedArrayTraits(itk::RGBPixel()); + CheckFixedArrayTraits(itk::RGBPixel()); CheckFixedArrayTraits(itk::RGBPixel()); - CheckFixedArrayTraits(itk::RGBPixel()); - CheckFixedArrayTraits(itk::RGBPixel()); + CheckFixedArrayTraits(itk::RGBPixel()); + CheckFixedArrayTraits(itk::RGBPixel()); CheckFixedArrayTraits(itk::RGBPixel()); CheckFixedArrayTraits(itk::RGBPixel()); @@ -564,12 +564,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::RGBAPixel() CheckFixedArrayTraits(itk::RGBAPixel()); - CheckFixedArrayTraits(itk::RGBAPixel()); - CheckFixedArrayTraits(itk::RGBAPixel()); + CheckFixedArrayTraits(itk::RGBAPixel()); + CheckFixedArrayTraits(itk::RGBAPixel()); CheckFixedArrayTraits(itk::RGBAPixel()); - CheckFixedArrayTraits(itk::RGBAPixel()); - CheckFixedArrayTraits(itk::RGBAPixel()); + CheckFixedArrayTraits(itk::RGBAPixel()); + CheckFixedArrayTraits(itk::RGBAPixel()); CheckFixedArrayTraits(itk::RGBAPixel()); CheckFixedArrayTraits(itk::RGBAPixel()); @@ -590,12 +590,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::SymmetricSecondRankTensor() CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); - CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); - CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); + CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); + CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); - CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); - CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); + CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); + CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); @@ -616,12 +616,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::SymmetricSecondRankTensor() CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); - CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); - CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); + CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); + CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); - CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); - CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); + CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); + CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); @@ -642,12 +642,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::SymmetricSecondRankTensor() CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); - CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); - CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); + CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); + CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); - CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); - CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); + CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); + CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); @@ -668,12 +668,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::SymmetricSecondRankTensor() CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); - CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); - CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); + CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); + CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); - CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); - CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); + CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); + CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); @@ -694,12 +694,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::SymmetricSecondRankTensor() CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); - CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); - CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); + CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); + CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); - CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); - CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); + CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); + CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); CheckFixedArrayTraits(itk::SymmetricSecondRankTensor()); @@ -720,12 +720,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::VariableLengthVector(1) CheckVariableLengthArrayTraits(itk::VariableLengthVector(1)); - CheckVariableLengthArrayTraits(itk::VariableLengthVector(1)); - CheckVariableLengthArrayTraits(itk::VariableLengthVector(1)); + CheckVariableLengthArrayTraits(itk::VariableLengthVector(1)); + CheckVariableLengthArrayTraits(itk::VariableLengthVector(1)); CheckVariableLengthArrayTraits(itk::VariableLengthVector(1)); - CheckVariableLengthArrayTraits(itk::VariableLengthVector(1)); - CheckVariableLengthArrayTraits(itk::VariableLengthVector(1)); + CheckVariableLengthArrayTraits(itk::VariableLengthVector(1)); + CheckVariableLengthArrayTraits(itk::VariableLengthVector(1)); CheckVariableLengthArrayTraits(itk::VariableLengthVector(1)); CheckVariableLengthArrayTraits(itk::VariableLengthVector(1)); @@ -746,12 +746,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::VariableLengthVector(2) CheckVariableLengthArrayTraits(itk::VariableLengthVector(2)); - CheckVariableLengthArrayTraits(itk::VariableLengthVector(2)); - CheckVariableLengthArrayTraits(itk::VariableLengthVector(2)); + CheckVariableLengthArrayTraits(itk::VariableLengthVector(2)); + CheckVariableLengthArrayTraits(itk::VariableLengthVector(2)); CheckVariableLengthArrayTraits(itk::VariableLengthVector(2)); - CheckVariableLengthArrayTraits(itk::VariableLengthVector(2)); - CheckVariableLengthArrayTraits(itk::VariableLengthVector(2)); + CheckVariableLengthArrayTraits(itk::VariableLengthVector(2)); + CheckVariableLengthArrayTraits(itk::VariableLengthVector(2)); CheckVariableLengthArrayTraits(itk::VariableLengthVector(2)); CheckVariableLengthArrayTraits(itk::VariableLengthVector(2)); @@ -772,12 +772,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::VariableLengthVector(3) CheckVariableLengthArrayTraits(itk::VariableLengthVector(3)); - CheckVariableLengthArrayTraits(itk::VariableLengthVector(3)); - CheckVariableLengthArrayTraits(itk::VariableLengthVector(3)); + CheckVariableLengthArrayTraits(itk::VariableLengthVector(3)); + CheckVariableLengthArrayTraits(itk::VariableLengthVector(3)); CheckVariableLengthArrayTraits(itk::VariableLengthVector(3)); - CheckVariableLengthArrayTraits(itk::VariableLengthVector(3)); - CheckVariableLengthArrayTraits(itk::VariableLengthVector(3)); + CheckVariableLengthArrayTraits(itk::VariableLengthVector(3)); + CheckVariableLengthArrayTraits(itk::VariableLengthVector(3)); CheckVariableLengthArrayTraits(itk::VariableLengthVector(3)); CheckVariableLengthArrayTraits(itk::VariableLengthVector(3)); @@ -798,12 +798,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::VariableLengthVector(4) CheckVariableLengthArrayTraits(itk::VariableLengthVector(4)); - CheckVariableLengthArrayTraits(itk::VariableLengthVector(4)); - CheckVariableLengthArrayTraits(itk::VariableLengthVector(4)); + CheckVariableLengthArrayTraits(itk::VariableLengthVector(4)); + CheckVariableLengthArrayTraits(itk::VariableLengthVector(4)); CheckVariableLengthArrayTraits(itk::VariableLengthVector(4)); - CheckVariableLengthArrayTraits(itk::VariableLengthVector(4)); - CheckVariableLengthArrayTraits(itk::VariableLengthVector(4)); + CheckVariableLengthArrayTraits(itk::VariableLengthVector(4)); + CheckVariableLengthArrayTraits(itk::VariableLengthVector(4)); CheckVariableLengthArrayTraits(itk::VariableLengthVector(4)); CheckVariableLengthArrayTraits(itk::VariableLengthVector(4)); @@ -824,12 +824,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::VariableLengthVector(5) CheckVariableLengthArrayTraits(itk::VariableLengthVector(5)); - CheckVariableLengthArrayTraits(itk::VariableLengthVector(5)); - CheckVariableLengthArrayTraits(itk::VariableLengthVector(5)); + CheckVariableLengthArrayTraits(itk::VariableLengthVector(5)); + CheckVariableLengthArrayTraits(itk::VariableLengthVector(5)); CheckVariableLengthArrayTraits(itk::VariableLengthVector(5)); - CheckVariableLengthArrayTraits(itk::VariableLengthVector(5)); - CheckVariableLengthArrayTraits(itk::VariableLengthVector(5)); + CheckVariableLengthArrayTraits(itk::VariableLengthVector(5)); + CheckVariableLengthArrayTraits(itk::VariableLengthVector(5)); CheckVariableLengthArrayTraits(itk::VariableLengthVector(5)); CheckVariableLengthArrayTraits(itk::VariableLengthVector(5)); @@ -850,12 +850,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::Array(1) CheckVariableLengthArrayTraits(itk::Array(1)); - CheckVariableLengthArrayTraits(itk::Array(1)); - CheckVariableLengthArrayTraits(itk::Array(1)); + CheckVariableLengthArrayTraits(itk::Array(1)); + CheckVariableLengthArrayTraits(itk::Array(1)); CheckVariableLengthArrayTraits(itk::Array(1)); - CheckVariableLengthArrayTraits(itk::Array(1)); - CheckVariableLengthArrayTraits(itk::Array(1)); + CheckVariableLengthArrayTraits(itk::Array(1)); + CheckVariableLengthArrayTraits(itk::Array(1)); CheckVariableLengthArrayTraits(itk::Array(1)); CheckVariableLengthArrayTraits(itk::Array(1)); @@ -876,12 +876,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::Array(2) CheckVariableLengthArrayTraits(itk::Array(2)); - CheckVariableLengthArrayTraits(itk::Array(2)); - CheckVariableLengthArrayTraits(itk::Array(2)); + CheckVariableLengthArrayTraits(itk::Array(2)); + CheckVariableLengthArrayTraits(itk::Array(2)); CheckVariableLengthArrayTraits(itk::Array(2)); - CheckVariableLengthArrayTraits(itk::Array(2)); - CheckVariableLengthArrayTraits(itk::Array(2)); + CheckVariableLengthArrayTraits(itk::Array(2)); + CheckVariableLengthArrayTraits(itk::Array(2)); CheckVariableLengthArrayTraits(itk::Array(2)); CheckVariableLengthArrayTraits(itk::Array(2)); @@ -902,12 +902,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::Array(3) CheckVariableLengthArrayTraits(itk::Array(3)); - CheckVariableLengthArrayTraits(itk::Array(3)); - CheckVariableLengthArrayTraits(itk::Array(3)); + CheckVariableLengthArrayTraits(itk::Array(3)); + CheckVariableLengthArrayTraits(itk::Array(3)); CheckVariableLengthArrayTraits(itk::Array(3)); - CheckVariableLengthArrayTraits(itk::Array(3)); - CheckVariableLengthArrayTraits(itk::Array(3)); + CheckVariableLengthArrayTraits(itk::Array(3)); + CheckVariableLengthArrayTraits(itk::Array(3)); CheckVariableLengthArrayTraits(itk::Array(3)); CheckVariableLengthArrayTraits(itk::Array(3)); @@ -928,12 +928,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::Array(4) CheckVariableLengthArrayTraits(itk::Array(4)); - CheckVariableLengthArrayTraits(itk::Array(4)); - CheckVariableLengthArrayTraits(itk::Array(4)); + CheckVariableLengthArrayTraits(itk::Array(4)); + CheckVariableLengthArrayTraits(itk::Array(4)); CheckVariableLengthArrayTraits(itk::Array(4)); - CheckVariableLengthArrayTraits(itk::Array(4)); - CheckVariableLengthArrayTraits(itk::Array(4)); + CheckVariableLengthArrayTraits(itk::Array(4)); + CheckVariableLengthArrayTraits(itk::Array(4)); CheckVariableLengthArrayTraits(itk::Array(4)); CheckVariableLengthArrayTraits(itk::Array(4)); @@ -954,12 +954,12 @@ int itkNumericTraitsTest(int, char* [] ) // itk::Array(5) CheckVariableLengthArrayTraits(itk::Array(5)); - CheckVariableLengthArrayTraits(itk::Array(5)); - CheckVariableLengthArrayTraits(itk::Array(5)); + CheckVariableLengthArrayTraits(itk::Array(5)); + CheckVariableLengthArrayTraits(itk::Array(5)); CheckVariableLengthArrayTraits(itk::Array(5)); - CheckVariableLengthArrayTraits(itk::Array(5)); - CheckVariableLengthArrayTraits(itk::Array(5)); + CheckVariableLengthArrayTraits(itk::Array(5)); + CheckVariableLengthArrayTraits(itk::Array(5)); CheckVariableLengthArrayTraits(itk::Array(5)); CheckVariableLengthArrayTraits(itk::Array(5)); diff --git a/Modules/Core/Common/test/itkObjectFactoryTest2.cxx b/Modules/Core/Common/test/itkObjectFactoryTest2.cxx index 3febed1eed3..6083d698899 100644 --- a/Modules/Core/Common/test/itkObjectFactoryTest2.cxx +++ b/Modules/Core/Common/test/itkObjectFactoryTest2.cxx @@ -166,14 +166,14 @@ int itkObjectFactoryTest2(int argc, char *argv[]) } MakeImage(10, static_cast(0)); - MakeImage(10, static_cast(0)); + MakeImage(10, static_cast(0)); MakeImage(10, static_cast(0)); { MakeImage(10, static_cast(0)); MakeImage(10, static_cast(0)); } - itk::RGBPixel rgbUC; rgbUC.Fill(0); - itk::RGBPixel rgbUS; rgbUS.Fill(0); + itk::RGBPixel rgbUC; rgbUC.Fill(0); + itk::RGBPixel rgbUS; rgbUS.Fill(0); MakeImage(10, rgbUC); MakeImage(10, rgbUS); diff --git a/Modules/Core/Common/test/itkPixelAccessTest.cxx b/Modules/Core/Common/test/itkPixelAccessTest.cxx index dd8b3f90411..7b335d3e326 100644 --- a/Modules/Core/Common/test/itkPixelAccessTest.cxx +++ b/Modules/Core/Common/test/itkPixelAccessTest.cxx @@ -45,21 +45,21 @@ void TestConstPixelAccess(const itk::Image &in, int itkPixelAccessTest(int, char* [] ) { std::cout << "Creating an image" << std::endl; - itk::Image, 3>::Pointer - o3 = itk::Image, 3>::New(); + itk::Image, 3>::Pointer + o3 = itk::Image, 3>::New(); float origin3D[3] = { 5, 2.1, 8.1}; float spacing3D[3] = { 1.5, 2.1, 1}; - itk::Image, 3>::SizeType imageSize3D = {{ 20, 40, 60 }}; - itk::Image, 3>::SizeType bufferSize3D = {{ 8, 20, 14 }}; + itk::Image, 3>::SizeType imageSize3D = {{ 20, 40, 60 }}; + itk::Image, 3>::SizeType bufferSize3D = {{ 8, 20, 14 }}; - itk::Image, 3>::IndexType startIndex3D = {{5, 4, 1}}; - itk::Image, 3>::IndexType bufferStartIndex3D = {{2, 3, 5}}; - itk::Image, 3>::IndexType regionStartIndex3D = {{5, 10, 12}}; - itk::Image, 3>::IndexType regionEndIndex3D = {{8, 15, 17}}; + itk::Image, 3>::IndexType startIndex3D = {{5, 4, 1}}; + itk::Image, 3>::IndexType bufferStartIndex3D = {{2, 3, 5}}; + itk::Image, 3>::IndexType regionStartIndex3D = {{5, 10, 12}}; + itk::Image, 3>::IndexType regionEndIndex3D = {{8, 15, 17}}; - itk::Image, 3>::RegionType region; + itk::Image, 3>::RegionType region; region.SetSize(imageSize3D); region.SetIndex(startIndex3D); o3->SetLargestPossibleRegion( region ); @@ -73,7 +73,7 @@ int itkPixelAccessTest(int, char* [] ) o3->Allocate(); std::cout << "Setting/Getting a pixel" << std::endl; - itk::Vector vec; + itk::Vector vec; vec[0] = 5; vec[1] = 4; vec[2] = 3; diff --git a/Modules/Core/Common/test/itkRGBPixelTest.cxx b/Modules/Core/Common/test/itkRGBPixelTest.cxx index 232c67e33ec..1911cb9cff9 100644 --- a/Modules/Core/Common/test/itkRGBPixelTest.cxx +++ b/Modules/Core/Common/test/itkRGBPixelTest.cxx @@ -26,9 +26,9 @@ int itkRGBPixelTest(int, char* [] ) float val[3] = {1, 0, .5}; itk::RGBPixel pixel(val); - unsigned char pixelInit0[3] = {255, 255, 255}; - unsigned char pixelInit1[3] = {255, 255, 244}; - itk::RGBPixel pixelArray[2]; + uint8_t pixelInit0[3] = {255, 255, 255}; + uint8_t pixelInit1[3] = {255, 255, 244}; + itk::RGBPixel pixelArray[2]; pixelArray[0] = pixelInit0; pixelArray[1] = pixelInit1; diff --git a/Modules/Core/Common/test/itkStreamingImageFilterTest3.cxx b/Modules/Core/Common/test/itkStreamingImageFilterTest3.cxx index e39dc4a6409..294d0c85875 100644 --- a/Modules/Core/Common/test/itkStreamingImageFilterTest3.cxx +++ b/Modules/Core/Common/test/itkStreamingImageFilterTest3.cxx @@ -38,7 +38,7 @@ int itkStreamingImageFilterTest3(int argc, char*argv [] ) const std::string outputFilename = argv[2]; unsigned int numberOfStreamDivisions = atoi(argv[3]); - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, 2 > ImageType; typedef itk::ImageFileReader ReaderType; diff --git a/Modules/Core/Common/test/itkSymmetricSecondRankTensorTest.cxx b/Modules/Core/Common/test/itkSymmetricSecondRankTensorTest.cxx index 05c23efef26..491c1215327 100644 --- a/Modules/Core/Common/test/itkSymmetricSecondRankTensorTest.cxx +++ b/Modules/Core/Common/test/itkSymmetricSecondRankTensorTest.cxx @@ -28,12 +28,12 @@ int itkSymmetricSecondRankTensorTest(int, char* [] ) float val[6] = {1.8, 0.2, 0.5, 3.4, 2.0, 1.2}; typedef itk::SymmetricSecondRankTensor Float3DTensorType; - typedef itk::SymmetricSecondRankTensor Uchar3DTensorType; + typedef itk::SymmetricSecondRankTensor Uchar3DTensorType; Float3DTensorType pixel(val); - unsigned char pixelInit0[6] = {255, 255, 255,128,34,17}; - unsigned char pixelInit1[6] = {255, 255, 244,19,23,29}; + uint8_t pixelInit0[6] = {255, 255, 255,128,34,17}; + uint8_t pixelInit1[6] = {255, 255, 244,19,23,29}; Uchar3DTensorType pixelArray[2]; pixelArray[0] = pixelInit0; diff --git a/Modules/Core/GPUCommon/include/itkGPUImage.h b/Modules/Core/GPUCommon/include/itkGPUImage.h index 94a5424fad5..5b144daf680 100644 --- a/Modules/Core/GPUCommon/include/itkGPUImage.h +++ b/Modules/Core/GPUCommon/include/itkGPUImage.h @@ -239,22 +239,22 @@ class GPUImageFactory : public itk::ObjectFactoryBase if( IsGPUAvailable() ) { // 1/2/3D - OverrideImageTypeMacro(unsigned char, 1); - OverrideImageTypeMacro(signed char, 1); + OverrideImageTypeMacro(uint8_t, 1); + OverrideImageTypeMacro(int8_t, 1); OverrideImageTypeMacro(int, 1); OverrideImageTypeMacro(unsigned int, 1); OverrideImageTypeMacro(float, 1); OverrideImageTypeMacro(double, 1); - OverrideImageTypeMacro(unsigned char, 2); - OverrideImageTypeMacro(signed char, 2); + OverrideImageTypeMacro(uint8_t, 2); + OverrideImageTypeMacro(int8_t, 2); OverrideImageTypeMacro(int, 2); OverrideImageTypeMacro(unsigned int, 2); OverrideImageTypeMacro(float, 2); OverrideImageTypeMacro(double, 2); - OverrideImageTypeMacro(unsigned char, 3); - OverrideImageTypeMacro(signed char, 3); + OverrideImageTypeMacro(uint8_t, 3); + OverrideImageTypeMacro(int8_t, 3); OverrideImageTypeMacro(int, 3); OverrideImageTypeMacro(unsigned int, 3); OverrideImageTypeMacro(float, 3); diff --git a/Modules/Core/GPUCommon/src/itkOpenCLUtil.cxx b/Modules/Core/GPUCommon/src/itkOpenCLUtil.cxx index 038f0242151..a4d2f39e3a8 100644 --- a/Modules/Core/GPUCommon/src/itkOpenCLUtil.cxx +++ b/Modules/Core/GPUCommon/src/itkOpenCLUtil.cxx @@ -370,11 +370,11 @@ bool IsGPUAvailable() std::string GetTypename(const std::type_info& intype) { std::string typestr; - if ( intype == typeid ( unsigned char ) || - intype == typeid ( itk::Vector< unsigned char, 2 > ) || - intype == typeid ( itk::Vector< unsigned char, 3 > ) ) + if ( intype == typeid ( uint8_t ) || + intype == typeid ( itk::Vector< uint8_t, 2 > ) || + intype == typeid ( itk::Vector< uint8_t, 3 > ) ) { - typestr = "unsigned char"; + typestr = "uint8_t"; } else if ( intype == typeid ( char ) || intype == typeid ( itk::Vector< char, 2 > ) || @@ -475,7 +475,7 @@ void GetTypenameInString( const std::type_info& intype, std::ostringstream& ret int GetPixelDimension( const std::type_info& intype ) { - if ( intype == typeid ( unsigned char ) || + if ( intype == typeid ( uint8_t ) || intype == typeid ( char ) || intype == typeid ( short ) || intype == typeid ( int ) || @@ -485,7 +485,7 @@ int GetPixelDimension( const std::type_info& intype ) { return 1; } - else if( intype == typeid ( itk::Vector< unsigned char, 2 > ) || + else if( intype == typeid ( itk::Vector< uint8_t, 2 > ) || intype == typeid ( itk::Vector< char, 2 > ) || intype == typeid ( itk::Vector< short, 2 > ) || intype == typeid ( itk::Vector< int, 2 > ) || @@ -495,7 +495,7 @@ int GetPixelDimension( const std::type_info& intype ) { return 2; } - else if( intype == typeid ( itk::Vector< unsigned char, 3 > ) || + else if( intype == typeid ( itk::Vector< uint8_t, 3 > ) || intype == typeid ( itk::Vector< char, 3 > ) || intype == typeid ( itk::Vector< short, 3 > ) || intype == typeid ( itk::Vector< int, 3 > ) || diff --git a/Modules/Core/ImageFunction/test/itkCovarianceImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkCovarianceImageFunctionTest.cxx index 899df489733..7912611872f 100644 --- a/Modules/Core/ImageFunction/test/itkCovarianceImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkCovarianceImageFunctionTest.cxx @@ -23,7 +23,7 @@ int itkCovarianceImageFunctionTest(int, char* [] ) { const unsigned int Dimension = 3; - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; const unsigned int VectorDimension = 4; typedef itk::FixedArray< PixelComponentType, VectorDimension > PixelType; diff --git a/Modules/Core/ImageFunction/test/itkImageAdaptorInterpolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkImageAdaptorInterpolateImageFunctionTest.cxx index 491a83f96e0..4220cc0af0c 100644 --- a/Modules/Core/ImageFunction/test/itkImageAdaptorInterpolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkImageAdaptorInterpolateImageFunctionTest.cxx @@ -179,7 +179,7 @@ int itkImageAdaptorInterpolateImageFunctionTest(int, char* [] ) Iterator iter( image, region ); IndexType index; - unsigned short value; + uint16_t value; InputPixelType pixel; for( ; !iter.IsAtEnd(); ++iter ) diff --git a/Modules/Core/ImageFunction/test/itkInterpolateTest.cxx b/Modules/Core/ImageFunction/test/itkInterpolateTest.cxx index 07487e94a2a..b1dbc73565a 100644 --- a/Modules/Core/ImageFunction/test/itkInterpolateTest.cxx +++ b/Modules/Core/ImageFunction/test/itkInterpolateTest.cxx @@ -25,7 +25,7 @@ typedef itk::Size<3> SizeType; -typedef itk::Image ImageType; +typedef itk::Image ImageType; typedef double CoordRepType; typedef itk::LinearInterpolateImageFunction InterpolatorType; typedef InterpolatorType::IndexType IndexType; diff --git a/Modules/Core/ImageFunction/test/itkLabelImageGaussianInterpolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkLabelImageGaussianInterpolateImageFunctionTest.cxx index a657b1baaea..f908b3d4ef0 100644 --- a/Modules/Core/ImageFunction/test/itkLabelImageGaussianInterpolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkLabelImageGaussianInterpolateImageFunctionTest.cxx @@ -26,7 +26,7 @@ int itkLabelImageGaussianInterpolateImageFunctionTest( int , char*[] ) { int test_status = EXIT_SUCCESS; const unsigned int Dimension = 2; - typedef unsigned short int PixelType; //Label images should be integer value types + typedef uint16_t PixelType; //Label images should be integer value types typedef itk::Image< PixelType, Dimension > ImageType; typedef ImageType::RegionType RegionType; typedef RegionType::SizeType SizeType; diff --git a/Modules/Core/ImageFunction/test/itkMahalanobisDistanceThresholdImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkMahalanobisDistanceThresholdImageFunctionTest.cxx index 1f8395fd03e..597e22fbb51 100644 --- a/Modules/Core/ImageFunction/test/itkMahalanobisDistanceThresholdImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkMahalanobisDistanceThresholdImageFunctionTest.cxx @@ -24,7 +24,7 @@ int itkMahalanobisDistanceThresholdImageFunctionTest(int, char* [] ) { const unsigned int Dimension = 3; - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; typedef itk::RGBPixel PixelType; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Modules/Core/ImageFunction/test/itkMeanImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkMeanImageFunctionTest.cxx index 83526ddc8d6..dc897b5b88d 100644 --- a/Modules/Core/ImageFunction/test/itkMeanImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkMeanImageFunctionTest.cxx @@ -23,7 +23,7 @@ int itkMeanImageFunctionTest(int, char* [] ) { const unsigned int Dimension = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > ImageType; typedef itk::MeanImageFunction< ImageType > FunctionType; diff --git a/Modules/Core/ImageFunction/test/itkMedianImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkMedianImageFunctionTest.cxx index 20938f381ac..a0f54984950 100644 --- a/Modules/Core/ImageFunction/test/itkMedianImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkMedianImageFunctionTest.cxx @@ -23,7 +23,7 @@ int itkMedianImageFunctionTest(int, char* [] ) { const unsigned int Dimension = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > ImageType; typedef itk::MedianImageFunction< ImageType > FunctionType; @@ -103,7 +103,7 @@ int itkMedianImageFunctionTest(int, char* [] ) // first, put something in the neighborhood outside the current // neighborhood that will change the median result - unsigned char voxelval(28); + uint8_t voxelval(28); ImageType::IndexType index2; for(index2[0] = centerIndex-2; index2[0] < centerIndex+3; index2[0]++) { diff --git a/Modules/Core/ImageFunction/test/itkNearestNeighborExtrapolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkNearestNeighborExtrapolateImageFunctionTest.cxx index 9db494724b7..7b999991f39 100644 --- a/Modules/Core/ImageFunction/test/itkNearestNeighborExtrapolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkNearestNeighborExtrapolateImageFunctionTest.cxx @@ -28,7 +28,7 @@ int itkNearestNeighborExtrapolateImageFunctionTest( int, char *[]) { typedef double CoordRep; const unsigned int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int VectorDimension = 4; typedef itk::Vector< PixelType, VectorDimension > VectorPixelType; typedef itk::Image ImageType; @@ -50,7 +50,7 @@ int itkNearestNeighborExtrapolateImageFunctionTest( int, char *[]) typedef itk::ImageRegionIterator Iterator; Iterator iter( image, imageRegion ); iter.GoToBegin(); - unsigned char counter = 0; + uint8_t counter = 0; while( !iter.IsAtEnd() ) { diff --git a/Modules/Core/ImageFunction/test/itkRGBInterpolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkRGBInterpolateImageFunctionTest.cxx index 6b725062398..022a192ff0e 100644 --- a/Modules/Core/ImageFunction/test/itkRGBInterpolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkRGBInterpolateImageFunctionTest.cxx @@ -25,7 +25,7 @@ namespace RGBInterpolate { enum{ ImageDimension = 3 }; enum{ VectorDimension = 3 }; // RGB is a vector of dimension 3 -typedef itk::RGBPixel PixelType; +typedef itk::RGBPixel PixelType; typedef itk::Image ImageType; typedef double CoordRepType; typedef itk::VectorLinearInterpolateImageFunction InterpolatorType; @@ -195,7 +195,7 @@ int itkRGBInterpolateImageFunctionTest(int, char* [] ) Iterator iter( image, region ); IndexType index; - unsigned short value; + uint16_t value; PixelType pixel; for( ; !iter.IsAtEnd(); ++iter ) diff --git a/Modules/Core/ImageFunction/test/itkRayCastInterpolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkRayCastInterpolateImageFunctionTest.cxx index e4b254764b7..7f1a8a8b88c 100644 --- a/Modules/Core/ImageFunction/test/itkRayCastInterpolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkRayCastInterpolateImageFunctionTest.cxx @@ -31,7 +31,7 @@ itkRayCastInterpolateImageFunctionTest( { std::cout << "Testing RayCastInterpolateImageFunction:\n"; - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int ImageDimension = 3; typedef itk::Image< PixelType, ImageDimension > ImageType; diff --git a/Modules/Core/ImageFunction/test/itkScatterMatrixImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkScatterMatrixImageFunctionTest.cxx index 36dd8b65088..e7c142c9ea1 100644 --- a/Modules/Core/ImageFunction/test/itkScatterMatrixImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkScatterMatrixImageFunctionTest.cxx @@ -23,7 +23,7 @@ int itkScatterMatrixImageFunctionTest(int, char* [] ) { const unsigned int Dimension = 3; - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; const unsigned int VectorDimension = 4; typedef itk::FixedArray< PixelComponentType, VectorDimension > PixelType; diff --git a/Modules/Core/ImageFunction/test/itkVarianceImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkVarianceImageFunctionTest.cxx index 873399b3117..e1555231163 100644 --- a/Modules/Core/ImageFunction/test/itkVarianceImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkVarianceImageFunctionTest.cxx @@ -25,7 +25,7 @@ int itkVarianceImageFunctionTest(int, char* [] ) { const unsigned int Dimension = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > ImageType; typedef itk::VarianceImageFunction< ImageType > FunctionType; diff --git a/Modules/Core/ImageFunction/test/itkVectorInterpolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkVectorInterpolateImageFunctionTest.cxx index d86b5c745c7..49b45090dcb 100644 --- a/Modules/Core/ImageFunction/test/itkVectorInterpolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkVectorInterpolateImageFunctionTest.cxx @@ -22,7 +22,7 @@ enum{ VectorDimension = 3 }; enum{ ImageDimension = 3 }; -typedef itk::Vector PixelType; +typedef itk::Vector PixelType; typedef itk::Image ImageType; typedef double CoordRepType; typedef itk::VectorLinearInterpolateImageFunction InterpolatorType; @@ -181,7 +181,7 @@ int itkVectorInterpolateImageFunctionTest(int, char* [] ) Iterator iter( image, region ); IndexType index; - unsigned short value; + uint16_t value; PixelType pixel; for( ; !iter.IsAtEnd(); ++iter ) diff --git a/Modules/Core/ImageFunction/test/itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest.cxx index c49ce948d34..faa3f6b20e7 100644 --- a/Modules/Core/ImageFunction/test/itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest.cxx @@ -22,7 +22,7 @@ enum{ VectorDimension = 3 }; enum{ ImageDimension = 3 }; -typedef itk::Vector PixelType; +typedef itk::Vector PixelType; typedef itk::Image ImageType; typedef double CoordRepType; @@ -183,7 +183,7 @@ int itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest(int, c Iterator iter( image, region ); IndexType index; - unsigned short value; + uint16_t value; PixelType pixel; for(; !iter.IsAtEnd(); ++iter) diff --git a/Modules/Core/ImageFunction/test/itkVectorMeanImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkVectorMeanImageFunctionTest.cxx index 9ef0d429029..1b1ba0c4f4c 100644 --- a/Modules/Core/ImageFunction/test/itkVectorMeanImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkVectorMeanImageFunctionTest.cxx @@ -23,7 +23,7 @@ int itkVectorMeanImageFunctionTest(int, char* [] ) { const unsigned int Dimension = 3; - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; const unsigned int VectorDimension = 4; typedef itk::FixedArray< PixelComponentType, VectorDimension > PixelType; diff --git a/Modules/Core/ImageFunction/test/itkWindowedSincInterpolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkWindowedSincInterpolateImageFunctionTest.cxx index 84bd842046b..dfc2cb410ac 100644 --- a/Modules/Core/ImageFunction/test/itkWindowedSincInterpolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkWindowedSincInterpolateImageFunctionTest.cxx @@ -27,7 +27,7 @@ namespace SincInterpolate { enum{ ImageDimension = 3 }; enum{ WindowRadius = 2 }; -typedef unsigned char PixelType; +typedef uint8_t PixelType; typedef itk::Image ImageType; typedef double CoordRepType; @@ -164,7 +164,7 @@ int itkWindowedSincInterpolateImageFunctionTest(int, char* [] ) Iterator iter( image, region ); IndexType index; - unsigned short value; + uint16_t value; PixelType pixel; for( ; !iter.IsAtEnd(); ++iter ) diff --git a/Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.h b/Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.h index 40729fd357b..78b2db7469f 100644 --- a/Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.h +++ b/Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.h @@ -165,38 +165,38 @@ class ITK_EXPORT BinaryMask3DMeshSource:public ImageToMeshFilter< TInputImage, T void CreateMesh(); - void XFlip(unsigned char *tp); // 7 kinds of transformation + void XFlip(uint8_t *tp); // 7 kinds of transformation - void YFlip(unsigned char *tp); + void YFlip(uint8_t *tp); - void ZFlip(unsigned char *tp); + void ZFlip(uint8_t *tp); - void XRotation(unsigned char *tp); + void XRotation(uint8_t *tp); - void YRotation(unsigned char *tp); + void YRotation(uint8_t *tp); - void ZRotation(unsigned char *tp); + void ZRotation(uint8_t *tp); - void inverse(unsigned char *tp); + void inverse(uint8_t *tp); void InitializeLUT(); // initialize the look up table before the mesh // construction - void AddCells(unsigned char celltype, unsigned char celltran, int index); + void AddCells(uint8_t celltype, uint8_t celltran, int index); void AddNodes(int index, - unsigned char *nodesid, + uint8_t *nodesid, IdentifierType *globalnodesid, IdentifierType **currentrowtmp, IdentifierType **currentframetmp); - void CellTransfer(unsigned char *nodesid, unsigned char celltran); + void CellTransfer(uint8_t *nodesid, uint8_t celltran); IdentifierType SearchThroughLastRow(int index, int start, int end); IdentifierType SearchThroughLastFrame(int index, int start, int end); - unsigned char m_LUT[256][2]; // the two lookup tables + uint8_t m_LUT[256][2]; // the two lookup tables IdentifierType m_LastVoxel[14]; IdentifierType m_CurrentVoxel[14]; @@ -206,13 +206,13 @@ class ITK_EXPORT BinaryMask3DMeshSource:public ImageToMeshFilter< TInputImage, T IdentifierType **m_CurrentRow; IdentifierType **m_CurrentFrame; - unsigned short m_CurrentRowIndex; - unsigned short m_CurrentFrameIndex; - unsigned short m_LastRowNum; - unsigned short m_LastFrameNum; - unsigned short m_CurrentRowNum; - unsigned short m_CurrentFrameNum; - unsigned char m_AvailableNodes[14]; + uint16_t m_CurrentRowIndex; + uint16_t m_CurrentFrameIndex; + uint16_t m_LastRowNum; + uint16_t m_LastFrameNum; + uint16_t m_CurrentRowNum; + uint16_t m_CurrentFrameNum; + uint8_t m_AvailableNodes[14]; double m_LocationOffset[14][3]; @@ -231,7 +231,7 @@ class ITK_EXPORT BinaryMask3DMeshSource:public ImageToMeshFilter< TInputImage, T int m_LastVoxelIndex; int m_LastFrameIndex; - unsigned char m_PointFound; + uint8_t m_PointFound; InputPixelType m_ObjectValue; /** temporary variables used in CreateMesh to avoid thousands of diff --git a/Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.hxx b/Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.hxx index 5ca321afc87..15c81d27d0b 100644 --- a/Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.hxx +++ b/Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.hxx @@ -133,9 +133,9 @@ BinaryMask3DMeshSource< TInputImage, TOutputMesh > template< class TInputImage, class TOutputMesh > void BinaryMask3DMeshSource< TInputImage, TOutputMesh > -::XFlip(unsigned char *x) +::XFlip(uint8_t *x) { - unsigned char nodeindex; + uint8_t nodeindex; int i = 0; @@ -186,9 +186,9 @@ BinaryMask3DMeshSource< TInputImage, TOutputMesh > template< class TInputImage, class TOutputMesh > void BinaryMask3DMeshSource< TInputImage, TOutputMesh > -::YFlip(unsigned char *x) +::YFlip(uint8_t *x) { - unsigned char nodeindex; + uint8_t nodeindex; int i = 0; @@ -239,9 +239,9 @@ BinaryMask3DMeshSource< TInputImage, TOutputMesh > template< class TInputImage, class TOutputMesh > void BinaryMask3DMeshSource< TInputImage, TOutputMesh > -::ZFlip(unsigned char *x) +::ZFlip(uint8_t *x) { - unsigned char nodeindex; + uint8_t nodeindex; int i = 0; @@ -292,9 +292,9 @@ BinaryMask3DMeshSource< TInputImage, TOutputMesh > template< class TInputImage, class TOutputMesh > void BinaryMask3DMeshSource< TInputImage, TOutputMesh > -::XRotation(unsigned char *x) +::XRotation(uint8_t *x) { - unsigned char nodeindex; + uint8_t nodeindex; int i = 0; @@ -349,9 +349,9 @@ BinaryMask3DMeshSource< TInputImage, TOutputMesh > template< class TInputImage, class TOutputMesh > void BinaryMask3DMeshSource< TInputImage, TOutputMesh > -::YRotation(unsigned char *x) +::YRotation(uint8_t *x) { - unsigned char nodeindex; + uint8_t nodeindex; int i = 0; @@ -406,9 +406,9 @@ BinaryMask3DMeshSource< TInputImage, TOutputMesh > template< class TInputImage, class TOutputMesh > void BinaryMask3DMeshSource< TInputImage, TOutputMesh > -::ZRotation(unsigned char *x) +::ZRotation(uint8_t *x) { - unsigned char nodeindex; + uint8_t nodeindex; int i = 0; @@ -463,9 +463,9 @@ BinaryMask3DMeshSource< TInputImage, TOutputMesh > template< class TInputImage, class TOutputMesh > void BinaryMask3DMeshSource< TInputImage, TOutputMesh > -::inverse(unsigned char *x) +::inverse(uint8_t *x) { - unsigned char tmp; + uint8_t tmp; tmp = x[2]; x[2] = x[1]; @@ -1104,7 +1104,7 @@ BinaryMask3DMeshSource< TInputImage, TOutputMesh > i++; } - unsigned char vertexindex; + uint8_t vertexindex; if ( m_CurrentRow ) { @@ -1195,7 +1195,7 @@ BinaryMask3DMeshSource< TInputImage, TOutputMesh > template< class TInputImage, class TOutputMesh > void BinaryMask3DMeshSource< TInputImage, TOutputMesh > -::AddCells(unsigned char celltype, unsigned char celltran, int index) +::AddCells(uint8_t celltype, uint8_t celltran, int index) { int i; @@ -1389,8 +1389,8 @@ BinaryMask3DMeshSource< TInputImage, TOutputMesh > typename TriCell::CellAutoPointer insertCell; typename OutputMeshType::PointIdentifier tripoints[3]; - unsigned char *tp; - tp = (unsigned char *)malloc( 3 * sizeof( unsigned char ) ); + uint8_t *tp; + tp = (uint8_t *)malloc( 3 * sizeof( uint8_t ) ); IdentifierType *tpl; tpl = (IdentifierType *)malloc( 3 * sizeof( IdentifierType ) ); @@ -2382,7 +2382,7 @@ template< class TInputImage, class TOutputMesh > void BinaryMask3DMeshSource< TInputImage, TOutputMesh > ::AddNodes(int index, - unsigned char *nodesid, + uint8_t *nodesid, IdentifierType *globalnodesid, IdentifierType **currentrowtmp, IdentifierType **currentframetmp) @@ -2542,7 +2542,7 @@ BinaryMask3DMeshSource< TInputImage, TOutputMesh > template< class TInputImage, class TOutputMesh > void BinaryMask3DMeshSource< TInputImage, TOutputMesh > -::CellTransfer(unsigned char *nodesid, unsigned char celltran) +::CellTransfer(uint8_t *nodesid, uint8_t celltran) { if ( ( celltran & 1 ) != 0 ) { @@ -2667,7 +2667,7 @@ BinaryMask3DMeshSource< TInputImage, TOutputMesh > os << indent << "ObjectValue: " - << static_cast< NumericTraits< unsigned char >::PrintType >( m_ObjectValue ) + << static_cast< NumericTraits< uint8_t >::PrintType >( m_ObjectValue ) << std::endl; os << indent diff --git a/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.hxx b/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.hxx index eb062008be4..e0514e6bcaf 100644 --- a/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.hxx +++ b/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.hxx @@ -175,7 +175,7 @@ void SimplexMeshAdaptTopologyFilter< TInputMesh, TOutputMesh > pointIds++; PointIdentifier lineOneSecondIdx = *pointIds; - unsigned short cnt = 0; + uint16_t cnt = 0; while ( cnt < poly->GetNumberOfPoints() / 2 - 1 ) { diff --git a/Modules/Core/Mesh/test/itkBinaryMask3DMeshSourceTest.cxx b/Modules/Core/Mesh/test/itkBinaryMask3DMeshSourceTest.cxx index 0571873f215..788e681580e 100644 --- a/Modules/Core/Mesh/test/itkBinaryMask3DMeshSourceTest.cxx +++ b/Modules/Core/Mesh/test/itkBinaryMask3DMeshSourceTest.cxx @@ -24,7 +24,7 @@ const unsigned int Dimension = 3; // Declare the types of the output images -typedef itk::Image ImageType; +typedef itk::Image ImageType; // Declare the type of the index,size and region to initialize images typedef ImageType::IndexType IndexType; @@ -38,24 +38,24 @@ void CreateCubeConfig( const unsigned int& StartX, const unsigned int& StartY, const unsigned int& StartZ, - const unsigned char& value1, - const unsigned char& value2, - const unsigned char& value3, - const unsigned char& value4, - const unsigned char& value5, - const unsigned char& value6, - const unsigned char& value7, - const unsigned char& value8 ); + const uint8_t& value1, + const uint8_t& value2, + const uint8_t& value3, + const uint8_t& value4, + const uint8_t& value5, + const uint8_t& value6, + const uint8_t& value7, + const uint8_t& value8 ); void Create16CubeConfig( ImagePointerType image, const unsigned int& StartX, const unsigned int& StartY, const unsigned int& StartZ, - const unsigned char& value1, - const unsigned char& value2, - const unsigned char& value3, - const unsigned char& value4 ); + const uint8_t& value1, + const uint8_t& value2, + const uint8_t& value3, + const uint8_t& value4 ); int itkBinaryMask3DMeshSourceTest(int argc, char *argv[] ) { @@ -86,7 +86,7 @@ int itkBinaryMask3DMeshSourceTest(int argc, char *argv[] ) unsigned int i,j,k,l; - for( unsigned char counter = 0; counter < 18; counter++ ) + for( uint8_t counter = 0; counter < 18; counter++ ) { i = ( counter / 1 ) % 2; // 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1. j = ( counter / 2 ) % 2; // 0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1. @@ -136,14 +136,14 @@ void CreateCubeConfig( const unsigned int& StartX, const unsigned int& StartY, const unsigned int& StartZ, - const unsigned char& value1, - const unsigned char& value2, - const unsigned char& value3, - const unsigned char& value4, - const unsigned char& value5, - const unsigned char& value6, - const unsigned char& value7, - const unsigned char& value8 ) + const uint8_t& value1, + const uint8_t& value2, + const uint8_t& value3, + const uint8_t& value4, + const uint8_t& value5, + const uint8_t& value6, + const uint8_t& value7, + const uint8_t& value8 ) { IndexType index; @@ -203,10 +203,10 @@ void Create16CubeConfig( const unsigned int& StartX, const unsigned int& StartY, const unsigned int& StartZ, - const unsigned char& value1, - const unsigned char& value2, - const unsigned char& value3, - const unsigned char& value4 ) + const uint8_t& value1, + const uint8_t& value2, + const uint8_t& value3, + const uint8_t& value4 ) { // Case 0 CreateCubeConfig( diff --git a/Modules/Core/Mesh/test/itkBinaryMaskToNarrowBandPointSetFilterTest.cxx b/Modules/Core/Mesh/test/itkBinaryMaskToNarrowBandPointSetFilterTest.cxx index 0863d5223f4..ebd5fb949fd 100644 --- a/Modules/Core/Mesh/test/itkBinaryMaskToNarrowBandPointSetFilterTest.cxx +++ b/Modules/Core/Mesh/test/itkBinaryMaskToNarrowBandPointSetFilterTest.cxx @@ -26,7 +26,7 @@ int itkBinaryMaskToNarrowBandPointSetFilterTest(int , char *[] ) const unsigned int Dimension = 2; - typedef unsigned char BinaryMaskPixelType; + typedef uint8_t BinaryMaskPixelType; typedef itk::Image< BinaryMaskPixelType, diff --git a/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest.cxx b/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest.cxx index e0b7b902998..04459fddbca 100644 --- a/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest.cxx +++ b/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest.cxx @@ -58,7 +58,7 @@ int itkTriangleMeshToBinaryImageFilterTest(int argc, char * argv [] ) std::cout << "and " << mySphereMeshSource->GetOutput()->GetNumberOfCells() << " cells." << std::endl; std::cout << "Sending triangle mesh to rasterization algorithm. " << std::endl; - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::TriangleMeshToBinaryImageFilter TriangleMeshToBinaryImageFilterType; TriangleMeshToBinaryImageFilterType::Pointer imageFilter = TriangleMeshToBinaryImageFilterType::New(); diff --git a/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest2.cxx b/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest2.cxx index c7f340076ed..ca1095acc33 100644 --- a/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest2.cxx +++ b/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest2.cxx @@ -31,7 +31,7 @@ int itkTriangleMeshToBinaryImageFilterTest2( int argc, char * argv [] ) typedef itk::Mesh TriangleMeshType; typedef itk::SimplexMesh SimplexMeshType; - typedef itk::Image ImageType; + typedef itk::Image ImageType; // declare triangle mesh source typedef itk::RegularSphereMeshSource SphereMeshSourceType; typedef SphereMeshSourceType::PointType PointType; diff --git a/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest3.cxx b/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest3.cxx index f36cb5c6667..166093536d2 100644 --- a/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest3.cxx +++ b/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest3.cxx @@ -54,7 +54,7 @@ int itkTriangleMeshToBinaryImageFilterTest3( int argc, char * argv [] ) return EXIT_FAILURE; } - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::TriangleMeshToBinaryImageFilter< MeshType, ImageType > TriangleImageType; diff --git a/Modules/Core/Mesh/test/itkVTKPolyDataWriterTest01.cxx b/Modules/Core/Mesh/test/itkVTKPolyDataWriterTest01.cxx index c9af1ff6149..d94b1b157a1 100644 --- a/Modules/Core/Mesh/test/itkVTKPolyDataWriterTest01.cxx +++ b/Modules/Core/Mesh/test/itkVTKPolyDataWriterTest01.cxx @@ -28,7 +28,7 @@ int itkVTKPolyDataWriterTest01(int argc, char* argv[]) const unsigned int PointDimension = 3; - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef float PointType; typedef itk::Mesh< PointType, PointDimension > MeshType; diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeCellTraitsInfo.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeCellTraitsInfo.h index 32d34e1a10f..2a1483c8ae4 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeCellTraitsInfo.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeCellTraitsInfo.h @@ -40,7 +40,7 @@ template< int VPointDimension, typename TInterpolationWeight = float, typename TPointIdentifier = IdentifierType, typename TCellIdentifier = IdentifierType, - typename TCellFeatureIdentifier = unsigned char, + typename TCellFeatureIdentifier = uint8_t, typename TPoint = QuadEdgeMeshPoint< TCoordRep, VPointDimension >, typename TPointsContainer = MapContainer< TPointIdentifier, TPoint >, typename TUsingCellsContainer = std::set< TPointIdentifier >, diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTraits.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTraits.h index cb9872275cb..af41bd76b2f 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTraits.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTraits.h @@ -59,7 +59,7 @@ class QuadEdgeMeshTraits typedef ::itk::IdentifierType PointIdentifier; typedef ::itk::IdentifierType CellIdentifier; - typedef unsigned char CellFeatureIdentifier; // made small in purpose + typedef uint8_t CellFeatureIdentifier; // made small in purpose typedef std::set< CellIdentifier > UsingCellsContainer; typedef std::set< CellIdentifier > PointCellLinksContainer; diff --git a/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.h b/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.h index 448e26d45f9..dbfec775042 100644 --- a/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.h @@ -36,7 +36,7 @@ namespace itk template< unsigned int TDimension = 3 > class ITK_EXPORT ImageMaskSpatialObject: - public ImageSpatialObject< TDimension, unsigned char > + public ImageSpatialObject< TDimension, uint8_t > { public: diff --git a/Modules/Core/SpatialObjects/include/itkImageSpatialObject.h b/Modules/Core/SpatialObjects/include/itkImageSpatialObject.h index 072b9fe8ef5..1602c279bd6 100644 --- a/Modules/Core/SpatialObjects/include/itkImageSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkImageSpatialObject.h @@ -35,7 +35,7 @@ namespace itk */ template< unsigned int TDimension = 3, - class TPixelType = unsigned char + class TPixelType = uint8_t > class ITK_EXPORT ImageSpatialObject: public SpatialObject< TDimension > @@ -143,13 +143,13 @@ class ITK_EXPORT ImageSpatialObject: { m_PixelType = "short"; } - void InternalSetPixelType(const unsigned char *) + void InternalSetPixelType(const uint8_t *) { - m_PixelType = "unsigned char"; + m_PixelType = "uint8_t"; } - void InternalSetPixelType(const unsigned short *) + void InternalSetPixelType(const uint16_t *) { - m_PixelType = "unsigned short"; + m_PixelType = "uint16_t"; } void InternalSetPixelType(const float *) { diff --git a/Modules/Core/SpatialObjects/include/itkMetaImageConverter.h b/Modules/Core/SpatialObjects/include/itkMetaImageConverter.h index a7d0d6c450b..b45ca6df6c3 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaImageConverter.h +++ b/Modules/Core/SpatialObjects/include/itkMetaImageConverter.h @@ -34,7 +34,7 @@ namespace itk * \ingroup ITKSpatialObjects */ template< unsigned int NDimensions = 3, - typename TPixel = unsigned char, + typename TPixel = uint8_t, typename TSpatialObjectType = ImageSpatialObject< NDimensions,TPixel > > class ITK_EXPORT MetaImageConverter : public MetaConverterBase< NDimensions > diff --git a/Modules/Core/SpatialObjects/include/itkMetaImageMaskConverter.h b/Modules/Core/SpatialObjects/include/itkMetaImageMaskConverter.h index d86b5964d60..a83c22afbdb 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaImageMaskConverter.h +++ b/Modules/Core/SpatialObjects/include/itkMetaImageMaskConverter.h @@ -35,12 +35,12 @@ namespace itk */ template< unsigned int NDimensions = 3 > class ITK_EXPORT MetaImageMaskConverter : - public MetaImageConverter< NDimensions, unsigned char, ImageMaskSpatialObject< NDimensions > > + public MetaImageConverter< NDimensions, uint8_t, ImageMaskSpatialObject< NDimensions > > { public: /** Standard class typedefs */ typedef MetaImageMaskConverter Self; - typedef MetaImageConverter< NDimensions, unsigned char > Superclass; + typedef MetaImageConverter< NDimensions, uint8_t > Superclass; typedef SmartPointer< Self > Pointer; typedef SmartPointer< const Self > ConstPointer; diff --git a/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.h b/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.h index 2fe6e1c44e4..e8849a33692 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.h +++ b/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.h @@ -31,7 +31,7 @@ namespace itk * \ingroup ITKSpatialObjects */ template< unsigned int NDimensions = 3, - typename PixelType = unsigned char, + typename PixelType = uint8_t, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions > > diff --git a/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.h b/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.h index 644a28ff507..07ae2f6c3d7 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.h +++ b/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.h @@ -39,7 +39,7 @@ namespace itk * \ingroup ITKSpatialObjects */ template< unsigned int NDimensions, - typename PixelType = unsigned char, + typename PixelType = uint8_t, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions > > diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkSpatialObject.hxx index 1d9fd4d6b0a..a43faf4fbdd 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkSpatialObject.hxx @@ -94,7 +94,7 @@ SpatialObject< TDimension > ExceptionObject e(__FILE__); e.SetLocation( "SpatialObject< TDimension >::DerivateAt(\ - const PointType, unsigned short, OutputVectorType & )" ); + const PointType, uint16_t, OutputVectorType & )" ); e.SetDescription("This spatial object is not evaluable at the point"); throw e; } @@ -114,7 +114,7 @@ SpatialObject< TDimension > typename OutputVectorType::Iterator it_v1 = v1.Begin(); typename OutputVectorType::Iterator it_v2 = v2.Begin(); - for ( unsigned short i = 0; i < TDimension; i++, it++, it_v1++, it_v2++ ) + for ( uint16_t i = 0; i < TDimension; i++, it++, it_v1++, it_v2++ ) { p1 = point; p2 = point; diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.hxx b/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.hxx index 383ca35d543..d374a863d76 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.hxx +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.hxx @@ -114,7 +114,7 @@ SpatialObjectToImageStatisticsCalculator< TInputImage, TInputSpatialObject, TSam // iterator if ( !strcmp(m_SpatialObject->GetTypeName(), "ImageMaskSpatialObject") ) { - typedef Image< unsigned char, itkGetStaticConstMacro(ObjectDimension) > MaskImageType; + typedef Image< uint8_t, itkGetStaticConstMacro(ObjectDimension) > MaskImageType; typedef ImageMaskSpatialObject< itkGetStaticConstMacro(ObjectDimension) > MaskSOType; typename MaskSOType::Pointer maskSpatialObject = dynamic_cast< MaskSOType * >( m_SpatialObject.GetPointer() ); diff --git a/Modules/Core/SpatialObjects/include/itkTubeSpatialObjectPoint.h b/Modules/Core/SpatialObjects/include/itkTubeSpatialObjectPoint.h index a910eebdd9b..547170705c1 100644 --- a/Modules/Core/SpatialObjects/include/itkTubeSpatialObjectPoint.h +++ b/Modules/Core/SpatialObjects/include/itkTubeSpatialObjectPoint.h @@ -90,7 +90,7 @@ class ITK_EXPORT TubeSpatialObjectPoint: void SetRadius(const float newR); /** Get number of dimensions */ - unsigned short int GetNumDimensions(void) const; + uint16_t GetNumDimensions(void) const; /** Copy one TubeSpatialObjectPoint to another */ Self & operator=(const TubeSpatialObjectPoint & rhs); @@ -105,7 +105,7 @@ class ITK_EXPORT TubeSpatialObjectPoint: float m_R; /** number of dimensions */ - unsigned short int m_NumDimensions; + uint16_t m_NumDimensions; /** Print the object */ void PrintSelf(std::ostream & os, Indent indent) const; diff --git a/Modules/Core/SpatialObjects/include/itkTubeSpatialObjectPoint.hxx b/Modules/Core/SpatialObjects/include/itkTubeSpatialObjectPoint.hxx index 24ed8cc9541..613576b53ab 100644 --- a/Modules/Core/SpatialObjects/include/itkTubeSpatialObjectPoint.hxx +++ b/Modules/Core/SpatialObjects/include/itkTubeSpatialObjectPoint.hxx @@ -174,7 +174,7 @@ TubeSpatialObjectPoint< TPointDimension > } template< unsigned int TPointDimension > -unsigned short int +uint16_t TubeSpatialObjectPoint< TPointDimension > ::GetNumDimensions(void) const { diff --git a/Modules/Core/SpatialObjects/test/itkBoxSpatialObjectTest.cxx b/Modules/Core/SpatialObjects/test/itkBoxSpatialObjectTest.cxx index 5974de562ab..7ada00f05bd 100644 --- a/Modules/Core/SpatialObjects/test/itkBoxSpatialObjectTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkBoxSpatialObjectTest.cxx @@ -35,7 +35,7 @@ int itkBoxSpatialObjectTest( int argc, char *argv[] ) const unsigned int Dimension = 2; typedef itk::GroupSpatialObject< Dimension > SceneType; typedef itk::BoxSpatialObject< Dimension > BoxType; - typedef itk::Image< unsigned char, Dimension > OutputImageType; + typedef itk::Image< uint8_t, Dimension > OutputImageType; typedef itk::ImageFileWriter< OutputImageType > WriterType; typedef itk::SpatialObjectToImageFilter< SceneType, OutputImageType > SpatialObjectToImageFilterType; diff --git a/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest.cxx b/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest.cxx index d4f2ed27eab..d21989eaf07 100644 --- a/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest.cxx @@ -20,7 +20,7 @@ /* * This is a test file for the itkImageMaskSpatialObject class. * The suported pixel types does not include itkRGBPixel, itkRGBAPixel, etc... -* So far it only allows to manage images of simple types like unsigned short, +* So far it only allows to manage images of simple types like uint16_t, * unsigned int, or itk::Vector<...>. */ diff --git a/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest2.cxx b/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest2.cxx index 917339f0875..0b9f42c4122 100644 --- a/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest2.cxx +++ b/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest2.cxx @@ -20,7 +20,7 @@ /* * This is a test file for the itkImageMaskSpatialObject class. * The suported pixel types does not include itkRGBPixel, itkRGBAPixel, etc... -* So far it only allows to manage images of simple types like unsigned short, +* So far it only allows to manage images of simple types like uint16_t, * unsigned int, or itk::Vector<...>. */ diff --git a/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest3.cxx b/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest3.cxx index 7e01916a9b2..9984ceeb6f7 100644 --- a/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest3.cxx +++ b/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest3.cxx @@ -20,7 +20,7 @@ /* * This is a test file for the itkImageMaskSpatialObject class. * The suported pixel types does not include itkRGBPixel, itkRGBAPixel, etc... -* So far it only allows to manage images of simple types like unsigned short, +* So far it only allows to manage images of simple types like uint16_t, * unsigned int, or itk::Vector<...>. */ diff --git a/Modules/Core/SpatialObjects/test/itkImageSpatialObjectTest.cxx b/Modules/Core/SpatialObjects/test/itkImageSpatialObjectTest.cxx index ed95fba4c3e..cbd9307740d 100644 --- a/Modules/Core/SpatialObjects/test/itkImageSpatialObjectTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkImageSpatialObjectTest.cxx @@ -20,7 +20,7 @@ /* * This is a test file for the itkImageSpatialObject class. * The suported pixel types does not include itkRGBPixel, itkRGBAPixel, etc... -* So far it only allows to manage images of simple types like unsigned short, +* So far it only allows to manage images of simple types like uint16_t, * unsigned int, or itk::Vector<...>. */ @@ -36,7 +36,7 @@ int itkImageSpatialObjectTest(int, char* []) #define NDimensions 3 typedef double ScalarType; - typedef unsigned short Pixel; + typedef uint16_t Pixel; typedef itk::Image ImageType; typedef itk::ImageSpatialObject ImageSpatialObject; typedef ImageSpatialObject::BoundingBoxType BoundingBox; diff --git a/Modules/Core/SpatialObjects/test/itkNewMetaObjectTypeTest.cxx b/Modules/Core/SpatialObjects/test/itkNewMetaObjectTypeTest.cxx index aa6f2b3755e..829c9590765 100644 --- a/Modules/Core/SpatialObjects/test/itkNewMetaObjectTypeTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkNewMetaObjectTypeTest.cxx @@ -210,7 +210,7 @@ int itkNewMetaObjectTypeTest(int, char* []) typedef itk::SceneSpatialObject<3> SceneType; typedef itk::DummySpatialObject<3> DummyType; - typedef itk::MetaSceneConverter<3,unsigned short> MetaSceneConverterType; + typedef itk::MetaSceneConverter<3,uint16_t> MetaSceneConverterType; typedef itk::MetaDummyConverter<3> DummyConverterType; diff --git a/Modules/Core/SpatialObjects/test/itkSpatialObjectToImageStatisticsCalculatorTest.cxx b/Modules/Core/SpatialObjects/test/itkSpatialObjectToImageStatisticsCalculatorTest.cxx index 44896aa6b46..eceb214afac 100644 --- a/Modules/Core/SpatialObjects/test/itkSpatialObjectToImageStatisticsCalculatorTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkSpatialObjectToImageStatisticsCalculatorTest.cxx @@ -24,7 +24,7 @@ int itkSpatialObjectToImageStatisticsCalculatorTest(int, char * [] ) { - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image ImageType; typedef itk::EllipseSpatialObject<2> EllipseType; diff --git a/Modules/Core/SpatialObjects/test/itkTubeSpatialObjectTest.cxx b/Modules/Core/SpatialObjects/test/itkTubeSpatialObjectTest.cxx index bed63b58912..dd90f90de54 100644 --- a/Modules/Core/SpatialObjects/test/itkTubeSpatialObjectTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkTubeSpatialObjectTest.cxx @@ -333,7 +333,7 @@ int itkTubeSpatialObjectTest(int, char * [] ) std::cout<<"DerivativeAt()..."; try { - tubeNet1->DerivativeAt(in,(unsigned short)1,derivative,true); + tubeNet1->DerivativeAt(in,(uint16_t)1,derivative,true); } catch(...) { diff --git a/Modules/Core/TestKernel/include/itkTestDriverInclude.h b/Modules/Core/TestKernel/include/itkTestDriverInclude.h index 66aed371998..6ba0c59a643 100644 --- a/Modules/Core/TestKernel/include/itkTestDriverInclude.h +++ b/Modules/Core/TestKernel/include/itkTestDriverInclude.h @@ -467,8 +467,8 @@ int RegressionTestImage(const char *testImageFilename, // Use the factory mechanism to read the test and baseline files and convert // them to double typedef itk::Image< double, ITK_TEST_DIMENSION_MAX > ImageType; - typedef itk::Image< unsigned char, ITK_TEST_DIMENSION_MAX > OutputType; - typedef itk::Image< unsigned char, 2 > DiffOutputType; + typedef itk::Image< uint8_t, ITK_TEST_DIMENSION_MAX > OutputType; + typedef itk::Image< uint8_t, 2 > DiffOutputType; typedef itk::ImageFileReader< ImageType > ReaderType; // Read the baseline file @@ -565,8 +565,8 @@ int RegressionTestImage(const char *testImageFilename, OutputType::SizeType size; size.Fill(0); RescaleType::Pointer rescale = RescaleType::New(); - rescale->SetOutputMinimum( itk::NumericTraits< unsigned char >::NonpositiveMin() ); - rescale->SetOutputMaximum( itk::NumericTraits< unsigned char >::max() ); + rescale->SetOutputMinimum( itk::NumericTraits< uint8_t >::NonpositiveMin() ); + rescale->SetOutputMaximum( itk::NumericTraits< uint8_t >::max() ); rescale->SetInput( diff->GetOutput() ); rescale->UpdateLargestPossibleRegion(); size = rescale->GetOutput()->GetLargestPossibleRegion().GetSize(); @@ -757,13 +757,13 @@ int HashTestImage( const char *testImageFilename, testMD5 = ComputeHash< itk::VectorImage >( testImageFilename ); break; case itk::ImageIOBase::UCHAR: - testMD5 = ComputeHash< itk::VectorImage >( testImageFilename ); + testMD5 = ComputeHash< itk::VectorImage >( testImageFilename ); break; case itk::ImageIOBase::SHORT: testMD5 = ComputeHash< itk::VectorImage >( testImageFilename ); break; case itk::ImageIOBase::USHORT: - testMD5 = ComputeHash< itk::VectorImage >( testImageFilename ); + testMD5 = ComputeHash< itk::VectorImage >( testImageFilename ); break; case itk::ImageIOBase::INT: testMD5 = ComputeHash< itk::VectorImage >( testImageFilename ); @@ -816,7 +816,7 @@ int HashTestImage( const char *testImageFilename, typedef itk::Image< double, ITK_TEST_DIMENSION_MAX > ImageType; typedef itk::Image< double, 2 > SliceImageType; - typedef itk::Image< unsigned char, 2 > OutputType; + typedef itk::Image< uint8_t, 2 > OutputType; typedef itk::ImageFileReader< ImageType > ReaderType; typedef itk::Testing::StretchIntensityImageFilter< SliceImageType, OutputType > RescaleType; typedef itk::Testing::ExtractSliceImageFilter< ImageType, SliceImageType > ExtractType; @@ -852,8 +852,8 @@ int HashTestImage( const char *testImageFilename, extract->SetExtractionRegion(region); RescaleType::Pointer rescale = RescaleType::New(); - rescale->SetOutputMinimum( itk::NumericTraits< unsigned char >::NonpositiveMin() ); - rescale->SetOutputMaximum( itk::NumericTraits< unsigned char >::max() ); + rescale->SetOutputMinimum( itk::NumericTraits< uint8_t >::NonpositiveMin() ); + rescale->SetOutputMaximum( itk::NumericTraits< uint8_t >::max() ); rescale->SetInput( extract->GetOutput() ); WriterType::Pointer writer = WriterType::New(); diff --git a/Modules/Core/TestKernel/include/itkTestingHashImageFilter.hxx b/Modules/Core/TestKernel/include/itkTestingHashImageFilter.hxx index 2408f306126..cfc03795e1b 100644 --- a/Modules/Core/TestKernel/include/itkTestingHashImageFilter.hxx +++ b/Modules/Core/TestKernel/include/itkTestingHashImageFilter.hxx @@ -110,7 +110,7 @@ HashImageFilter::AfterThreadedGenerateData() Swapper::SwapRangeFromSystemToLittleEndian ( buffer, numberOfValues ); } - itksysMD5_Append( md5, (unsigned char*)buffer, numberOfValues*sizeof(ValueType) ); + itksysMD5_Append( md5, (uint8_t*)buffer, numberOfValues*sizeof(ValueType) ); if ( Swapper::SystemIsBigEndian() ) { diff --git a/Modules/Core/Transform/test/itkBSplineDeformableTransformTest2.cxx b/Modules/Core/Transform/test/itkBSplineDeformableTransformTest2.cxx index 078c3e860c5..50a92793964 100644 --- a/Modules/Core/Transform/test/itkBSplineDeformableTransformTest2.cxx +++ b/Modules/Core/Transform/test/itkBSplineDeformableTransformTest2.cxx @@ -65,7 +65,7 @@ static int RunTest(int argc, char * argv [] ) { const unsigned int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, ImageDimension > FixedImageType; typedef itk::Image< PixelType, ImageDimension > MovingImageType; diff --git a/Modules/Core/Transform/test/itkBSplineDeformableTransformTest3.cxx b/Modules/Core/Transform/test/itkBSplineDeformableTransformTest3.cxx index c0d4bee9a89..a6fe1c6fb95 100644 --- a/Modules/Core/Transform/test/itkBSplineDeformableTransformTest3.cxx +++ b/Modules/Core/Transform/test/itkBSplineDeformableTransformTest3.cxx @@ -66,7 +66,7 @@ static int RunTest(int argc, char * argv [] ) { const unsigned int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, ImageDimension > FixedImageType; typedef itk::Image< PixelType, ImageDimension > MovingImageType; diff --git a/Modules/Core/Transform/test/itkBSplineTransformInitializerTest1.cxx b/Modules/Core/Transform/test/itkBSplineTransformInitializerTest1.cxx index bd5aa416693..32ee1956f84 100644 --- a/Modules/Core/Transform/test/itkBSplineTransformInitializerTest1.cxx +++ b/Modules/Core/Transform/test/itkBSplineTransformInitializerTest1.cxx @@ -41,7 +41,7 @@ int itkBSplineTransformInitializerTest1( int argc, char * argv[] ) const unsigned int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image FixedImageType; typedef itk::Image MovingImageType; diff --git a/Modules/Core/Transform/test/itkBSplineTransformInitializerTest2.cxx b/Modules/Core/Transform/test/itkBSplineTransformInitializerTest2.cxx index 0b6f8a1975c..a613ec49039 100644 --- a/Modules/Core/Transform/test/itkBSplineTransformInitializerTest2.cxx +++ b/Modules/Core/Transform/test/itkBSplineTransformInitializerTest2.cxx @@ -49,7 +49,7 @@ int itkBSplineTransformInitializerTest2( int argc, char * argv[] ) const unsigned int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, ImageDimension > FixedImageType; typedef itk::ImageFileReader< FixedImageType > FixedReaderType; diff --git a/Modules/Core/Transform/test/itkBSplineTransformTest2.cxx b/Modules/Core/Transform/test/itkBSplineTransformTest2.cxx index dc9930dfe14..bd768b5a332 100644 --- a/Modules/Core/Transform/test/itkBSplineTransformTest2.cxx +++ b/Modules/Core/Transform/test/itkBSplineTransformTest2.cxx @@ -65,7 +65,7 @@ static int RunTest(int argc, char * argv [] ) { const unsigned int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, ImageDimension > FixedImageType; typedef itk::Image< PixelType, ImageDimension > MovingImageType; diff --git a/Modules/Core/Transform/test/itkBSplineTransformTest3.cxx b/Modules/Core/Transform/test/itkBSplineTransformTest3.cxx index 3976347b644..c955e8b6c78 100644 --- a/Modules/Core/Transform/test/itkBSplineTransformTest3.cxx +++ b/Modules/Core/Transform/test/itkBSplineTransformTest3.cxx @@ -65,7 +65,7 @@ static int RunTest(int argc, char * argv [] ) { const unsigned int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, ImageDimension > FixedImageType; typedef itk::Image< PixelType, ImageDimension > MovingImageType; diff --git a/Modules/Core/Transform/test/itkCenteredAffineTransformTest.cxx b/Modules/Core/Transform/test/itkCenteredAffineTransformTest.cxx index bd4d0f951b4..8fdcb88a1ad 100644 --- a/Modules/Core/Transform/test/itkCenteredAffineTransformTest.cxx +++ b/Modules/Core/Transform/test/itkCenteredAffineTransformTest.cxx @@ -245,8 +245,8 @@ int itkCenteredAffineTransformTest(int, char *[]) << std::endl; double spacing[3] = {1.0, 2.0, 3.0}; double origin[3] = {4.0, 5.0, 6.0}; - itk::Image::Pointer - image = itk::Image::New(); + itk::Image::Pointer + image = itk::Image::New(); image->SetOrigin(origin); image->SetSpacing(spacing); diff --git a/Modules/Core/Transform/test/itkLandmarkBasedTransformInitializerTest.cxx b/Modules/Core/Transform/test/itkLandmarkBasedTransformInitializerTest.cxx index e2a967972c9..738b17d6986 100644 --- a/Modules/Core/Transform/test/itkLandmarkBasedTransformInitializerTest.cxx +++ b/Modules/Core/Transform/test/itkLandmarkBasedTransformInitializerTest.cxx @@ -90,7 +90,7 @@ int itkLandmarkBasedTransformInitializerTest(int, char * []) // based alignment std::cout << "Testing Landmark alignment with VersorRigid3DTransform" << std::endl; - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > FixedImageType; @@ -196,7 +196,7 @@ int itkLandmarkBasedTransformInitializerTest(int, char * []) //Test landmark alignment using Rigid 2D transform in 2 dimensions std::cout << "Testing Landmark alignment with Rigid2DTransform" << std::endl; - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 2; typedef itk::Image< PixelType, Dimension > FixedImageType; @@ -342,7 +342,7 @@ int itkLandmarkBasedTransformInitializerTest(int, char * []) } { - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 3; typedef itk::Image ImageType; ImageType::Pointer fixedImage = ImageType::New(); diff --git a/Modules/Filtering/AnisotropicSmoothing/test/itkGradientAnisotropicDiffusionImageFilterTest2.cxx b/Modules/Filtering/AnisotropicSmoothing/test/itkGradientAnisotropicDiffusionImageFilterTest2.cxx index 1b4ab593076..3b38d8dceea 100644 --- a/Modules/Filtering/AnisotropicSmoothing/test/itkGradientAnisotropicDiffusionImageFilterTest2.cxx +++ b/Modules/Filtering/AnisotropicSmoothing/test/itkGradientAnisotropicDiffusionImageFilterTest2.cxx @@ -84,7 +84,7 @@ int itkGradientAnisotropicDiffusionImageFilterTest2(int ac, char* av[] ) filter->SetInput(input->GetOutput()); - typedef itk::Image myUCharImage; + typedef itk::Image myUCharImage; itk::CastImageFilter::Pointer caster = itk::CastImageFilter::New(); caster->SetInput(filter->GetOutput()); diff --git a/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.h b/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.h index 2d82eca015f..3afd91e70ff 100644 --- a/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.h +++ b/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.h @@ -88,7 +88,7 @@ namespace itk { */ template, + Image, class TOutputImage = TInputImage> class ITK_EXPORT N4BiasFieldCorrectionImageFilter : public ImageToImageFilter diff --git a/Modules/Filtering/BiasCorrection/test/itkN4BiasFieldCorrectionImageFilterTest.cxx b/Modules/Filtering/BiasCorrection/test/itkN4BiasFieldCorrectionImageFilterTest.cxx index e47d95c3611..b4cbe413c92 100644 --- a/Modules/Filtering/BiasCorrection/test/itkN4BiasFieldCorrectionImageFilterTest.cxx +++ b/Modules/Filtering/BiasCorrection/test/itkN4BiasFieldCorrectionImageFilterTest.cxx @@ -131,7 +131,7 @@ int N4( int argc, char *argv[] ) inputImage->DisconnectPipeline(); // handle the mask image - typedef itk::Image MaskImageType; + typedef itk::Image MaskImageType; typename MaskImageType::Pointer maskImage = NULL; if( argc > 6 ) diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryDilateImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryDilateImageFilter.hxx index afee7a7bdf7..0a545ab586d 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryDilateImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryDilateImageFilter.hxx @@ -113,7 +113,7 @@ BinaryDilateImageFilter< TInputImage, TOutputImage, TKernel > // Create the temp image for surface encoding // The temp image size is equal to the output requested region for thread // padded by max( connectivity neighborhood radius, SE kernel radius ). - typedef itk::Image< unsigned char, TInputImage::ImageDimension > TempImageType; + typedef itk::Image< uint8_t, TInputImage::ImageDimension > TempImageType; typename TempImageType::Pointer tmpImage = TempImageType::New(); // Define regions of temp image @@ -132,10 +132,10 @@ BinaryDilateImageFilter< TInputImage, TOutputImage, TKernel > // one means pixel on but not treated // two means border pixel // three means inner pixel - static const unsigned char backgroundTag = 0; - static const unsigned char onTag = 1; - static const unsigned char borderTag = 2; - static const unsigned char innerTag = 3; + static const uint8_t backgroundTag = 0; + static const uint8_t onTag = 1; + static const uint8_t borderTag = 2; + static const uint8_t innerTag = 3; if ( this->m_BoundaryToForeground ) { diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryErodeImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryErodeImageFilter.hxx index 481fed36946..66b3164d7dd 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryErodeImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryErodeImageFilter.hxx @@ -103,7 +103,7 @@ BinaryErodeImageFilter< TInputImage, TOutputImage, TKernel > // Create the temp image for surface encoding // The temp image size is equal to the output requested region for thread // padded by max( connectivity neighborhood radius, SE kernel radius ). - typedef itk::Image< unsigned char, TInputImage::ImageDimension > TempImageType; + typedef itk::Image< uint8_t, TInputImage::ImageDimension > TempImageType; typename TempImageType::Pointer tmpImage = TempImageType::New(); // Define regions of temp image @@ -122,10 +122,10 @@ BinaryErodeImageFilter< TInputImage, TOutputImage, TKernel > // one means pixel on but not treated // two means border pixel // three means inner pixel - static const unsigned char backgroundTag = 0; - static const unsigned char onTag = 1; - static const unsigned char borderTag = 2; - static const unsigned char innerTag = 3; + static const uint8_t backgroundTag = 0; + static const uint8_t onTag = 1; + static const uint8_t borderTag = 2; + static const uint8_t innerTag = 3; if ( !this->m_BoundaryToForeground ) { @@ -208,7 +208,7 @@ BinaryErodeImageFilter< TInputImage, TOutputImage, TKernel > !tmpRegIndexIt.IsAtEnd(); ++tmpRegIndexIt, ++oNeighbIt ) { - unsigned char tmpValue = tmpRegIndexIt.Get(); + uint8_t tmpValue = tmpRegIndexIt.Get(); // Test current pixel: it is active ( on ) or not? if ( tmpValue == onTag ) diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryClosingByReconstructionImageFilterTest.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryClosingByReconstructionImageFilterTest.cxx index 9c69630a9e2..cdc68922c37 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryClosingByReconstructionImageFilterTest.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryClosingByReconstructionImageFilterTest.cxx @@ -35,7 +35,7 @@ int itkBinaryClosingByReconstructionImageFilterTest(int argc, char * argv[]) const int dim = 2; - typedef itk::Image< unsigned char, dim > IType; + typedef itk::Image< uint8_t, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest.cxx index a97f0e69aed..4b8f800ca52 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest.cxx @@ -28,11 +28,11 @@ int itkBinaryDilateImageFilterTest(int, char* [] ) const unsigned int myDimension = 2; // Define the values of the input images - const unsigned short fgValue = 1; - const unsigned short bgValue = 0; + const uint16_t fgValue = 1; + const uint16_t bgValue = 0; // Declare the types of the images - typedef itk::Image myImageType; + typedef itk::Image myImageType; // Declare the type of the index to access images typedef itk::Index myIndexType; @@ -111,7 +111,7 @@ int itkBinaryDilateImageFilterTest(int, char* [] ) } // Declare the type for the structuring element - typedef itk::BinaryBallStructuringElement + typedef itk::BinaryBallStructuringElement myKernelType; // Declare the type for the morphology Filter @@ -140,7 +140,7 @@ int itkBinaryDilateImageFilterTest(int, char* [] ) // Test the itkGetMacro - unsigned short value = filter->GetDilateValue(); + uint16_t value = filter->GetDilateValue(); std::cout << "filter->GetDilateValue(): " << value << std::endl; // Execute the filter diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest2.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest2.cxx index c7608f6ec5e..9839df256d3 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest2.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest2.cxx @@ -27,11 +27,11 @@ int itkBinaryDilateImageFilterTest2(int, char* [] ) const unsigned int myDimension = 2; // Define the values of the input images - const unsigned short fgValue = 1; - const unsigned short bgValue = 0; + const uint16_t fgValue = 1; + const uint16_t bgValue = 0; // Declare the types of the images - typedef itk::Image myImageType; + typedef itk::Image myImageType; // Declare the type of the index to access images typedef itk::Index myIndexType; @@ -117,7 +117,7 @@ int itkBinaryDilateImageFilterTest2(int, char* [] ) } // Declare the type for the structuring element - typedef itk::BinaryCrossStructuringElement + typedef itk::BinaryCrossStructuringElement myKernelType; // Declare the type for the morphology Filter @@ -142,7 +142,7 @@ int itkBinaryDilateImageFilterTest2(int, char* [] ) // Test the itkGetMacro - unsigned short value = filter->GetDilateValue(); + uint16_t value = filter->GetDilateValue(); std::cout << "filter->GetDilateValue(): " << value << std::endl; // Execute the filter diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest3.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest3.cxx index abba016e84e..2c8bbcac052 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest3.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest3.cxx @@ -33,7 +33,7 @@ int itkBinaryDilateImageFilterTest3(int argc, char * argv[]) } const int dim = 2; - typedef unsigned char PType; + typedef uint8_t PType; typedef itk::Image< PType, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryErodeImageFilterTest.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryErodeImageFilterTest.cxx index b96ca020ba9..6cac50c54d9 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryErodeImageFilterTest.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryErodeImageFilterTest.cxx @@ -28,11 +28,11 @@ int itkBinaryErodeImageFilterTest(int, char* [] ) const unsigned int myDimension = 2; // Define the values of the input images - const unsigned short fgValue = 1; - const unsigned short bgValue = 0; + const uint16_t fgValue = 1; + const uint16_t bgValue = 0; // Declare the types of the images - typedef itk::Image myImageType; + typedef itk::Image myImageType; // Declare the type of the index to access images typedef itk::Index myIndexType; @@ -111,7 +111,7 @@ int itkBinaryErodeImageFilterTest(int, char* [] ) } // Declare the type for the structuring element - typedef itk::BinaryBallStructuringElement + typedef itk::BinaryBallStructuringElement myKernelType; // Declare the type for the morphology Filter @@ -140,7 +140,7 @@ int itkBinaryErodeImageFilterTest(int, char* [] ) // Test the itkGetMacro - unsigned short value = filter->GetErodeValue(); + uint16_t value = filter->GetErodeValue(); std::cout << "filter->GetErodeValue(): " << value << std::endl; // Execute the filter diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryErodeImageFilterTest3.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryErodeImageFilterTest3.cxx index 36436cf6673..e07cdb3a6e8 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryErodeImageFilterTest3.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryErodeImageFilterTest3.cxx @@ -33,7 +33,7 @@ int itkBinaryErodeImageFilterTest3(int argc, char * argv[]) } const int dim = 2; - typedef unsigned char PType; + typedef uint8_t PType; typedef itk::Image< PType, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryMorphologicalClosingImageFilterTest.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryMorphologicalClosingImageFilterTest.cxx index a5f484e23ef..fee6b93d58f 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryMorphologicalClosingImageFilterTest.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryMorphologicalClosingImageFilterTest.cxx @@ -35,10 +35,10 @@ int itkBinaryMorphologicalClosingImageFilterTest(int argc, char * argv[]) const int dim = 2; // Verify that the input and output pixel types can be different - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, dim > InputImageType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, dim > OutputImageType; typedef itk::ImageFileReader< InputImageType > ReaderType; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryMorphologicalOpeningImageFilterTest.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryMorphologicalOpeningImageFilterTest.cxx index 7126b9a1ccb..536d1eb8d11 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryMorphologicalOpeningImageFilterTest.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryMorphologicalOpeningImageFilterTest.cxx @@ -35,10 +35,10 @@ int itkBinaryMorphologicalOpeningImageFilterTest(int argc, char * argv[]) const int dim = 2; // Verify that the input and output pixel types can be different - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, dim > InputImageType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, dim > OutputImageType; typedef itk::ImageFileReader< InputImageType > ReaderType; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryOpeningByReconstructionImageFilterTest.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryOpeningByReconstructionImageFilterTest.cxx index 0d05ff9e138..efac2667a5e 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryOpeningByReconstructionImageFilterTest.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryOpeningByReconstructionImageFilterTest.cxx @@ -35,7 +35,7 @@ int itkBinaryOpeningByReconstructionImageFilterTest(int argc, char * argv[]) const int dim = 2; - typedef itk::Image< unsigned char, dim > IType; + typedef itk::Image< uint8_t, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryThinningImageFilterTest.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryThinningImageFilterTest.cxx index 6382e3368f4..03df490a77c 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryThinningImageFilterTest.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryThinningImageFilterTest.cxx @@ -32,7 +32,7 @@ int itkBinaryThinningImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/Filtering/Colormap/test/itkScalarToRGBColormapImageFilterTest.cxx b/Modules/Filtering/Colormap/test/itkScalarToRGBColormapImageFilterTest.cxx index c9f0b51ffe5..5c2e73de530 100644 --- a/Modules/Filtering/Colormap/test/itkScalarToRGBColormapImageFilterTest.cxx +++ b/Modules/Filtering/Colormap/test/itkScalarToRGBColormapImageFilterTest.cxx @@ -43,7 +43,7 @@ int itkScalarToRGBColormapImageFilterTest( int argc, char *argv[] ) const unsigned int ImageDimension = 2; typedef unsigned int PixelType; - typedef itk::RGBPixel RGBPixelType; + typedef itk::RGBPixel RGBPixelType; typedef itk::Image ImageType; typedef itk::Image RealImageType; @@ -57,7 +57,7 @@ int itkScalarToRGBColormapImageFilterTest( int argc, char *argv[] ) std::string colormapString( argv[3] ); - typedef itk::VectorImage< unsigned char, ImageDimension> VectorImageType; + typedef itk::VectorImage< uint8_t, ImageDimension> VectorImageType; typedef itk::ScalarToRGBColormapImageFilter VectorFilterType; VectorFilterType::Pointer vfilter = VectorFilterType::New(); diff --git a/Modules/Filtering/Convolution/test/itkConvolutionImageFilterDeltaFunctionTest.cxx b/Modules/Filtering/Convolution/test/itkConvolutionImageFilterDeltaFunctionTest.cxx index 69d08d19aa6..cb224811a82 100644 --- a/Modules/Filtering/Convolution/test/itkConvolutionImageFilterDeltaFunctionTest.cxx +++ b/Modules/Filtering/Convolution/test/itkConvolutionImageFilterDeltaFunctionTest.cxx @@ -30,7 +30,7 @@ int itkConvolutionImageFilterDeltaFunctionTest(int argc, char * argv[]) const unsigned int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, ImageDimension > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/Convolution/test/itkConvolutionImageFilterTestInt.cxx b/Modules/Filtering/Convolution/test/itkConvolutionImageFilterTestInt.cxx index 1b12b64bd21..0134252fd8f 100644 --- a/Modules/Filtering/Convolution/test/itkConvolutionImageFilterTestInt.cxx +++ b/Modules/Filtering/Convolution/test/itkConvolutionImageFilterTestInt.cxx @@ -35,7 +35,7 @@ int itkConvolutionImageFilterTestInt(int argc, char * argv[]) const int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; diff --git a/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterDeltaFunctionTest.cxx b/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterDeltaFunctionTest.cxx index 99a6fba2720..053b3ff0403 100644 --- a/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterDeltaFunctionTest.cxx +++ b/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterDeltaFunctionTest.cxx @@ -31,7 +31,7 @@ int itkFFTConvolutionImageFilterDeltaFunctionTest(int argc, char * argv[]) const unsigned int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, ImageDimension > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterTestInt.cxx b/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterTestInt.cxx index bd4de7ee603..1f70fa17b3e 100644 --- a/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterTestInt.cxx +++ b/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterTestInt.cxx @@ -35,7 +35,7 @@ int itkFFTConvolutionImageFilterTestInt(int argc, char * argv[]) const int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; diff --git a/Modules/Filtering/Convolution/test/itkFFTNormalizedCorrelationImageFilterTest.cxx b/Modules/Filtering/Convolution/test/itkFFTNormalizedCorrelationImageFilterTest.cxx index 424b8a4b775..e6d8165b4f0 100644 --- a/Modules/Filtering/Convolution/test/itkFFTNormalizedCorrelationImageFilterTest.cxx +++ b/Modules/Filtering/Convolution/test/itkFFTNormalizedCorrelationImageFilterTest.cxx @@ -34,8 +34,8 @@ int itkFFTNormalizedCorrelationImageFilterTest(int argc, char * argv[] ) return EXIT_FAILURE; } - typedef itk::Image InputImageType; - typedef itk::Image OutputImageType; + typedef itk::Image InputImageType; + typedef itk::Image OutputImageType; // We need the internal type to be either float or double since // the correlation image contains values between -1 and 1. typedef itk::Image RealImageType; diff --git a/Modules/Filtering/Convolution/test/itkMaskedFFTNormalizedCorrelationImageFilterTest.cxx b/Modules/Filtering/Convolution/test/itkMaskedFFTNormalizedCorrelationImageFilterTest.cxx index 8022c5e991f..f9328fef14e 100644 --- a/Modules/Filtering/Convolution/test/itkMaskedFFTNormalizedCorrelationImageFilterTest.cxx +++ b/Modules/Filtering/Convolution/test/itkMaskedFFTNormalizedCorrelationImageFilterTest.cxx @@ -33,9 +33,9 @@ int itkMaskedFFTNormalizedCorrelationImageFilterTest(int argc, char * argv[] ) return EXIT_FAILURE; } - typedef itk::Image< unsigned short, 2 > InputImageType; - typedef itk::Image< unsigned char, 2 > MaskImageType; - typedef itk::Image< unsigned char, 2 > OutputImageType; + typedef itk::Image< uint16_t, 2 > InputImageType; + typedef itk::Image< uint8_t, 2 > MaskImageType; + typedef itk::Image< uint8_t, 2 > OutputImageType; typedef itk::ImageFileReader< InputImageType > ReaderType; typedef itk::ImageFileReader< MaskImageType > MaskReaderType; diff --git a/Modules/Filtering/Convolution/test/itkNormalizedCorrelationImageFilterTest.cxx b/Modules/Filtering/Convolution/test/itkNormalizedCorrelationImageFilterTest.cxx index acb21291c1f..42ded2e4bf3 100644 --- a/Modules/Filtering/Convolution/test/itkNormalizedCorrelationImageFilterTest.cxx +++ b/Modules/Filtering/Convolution/test/itkNormalizedCorrelationImageFilterTest.cxx @@ -35,7 +35,7 @@ int itkNormalizedCorrelationImageFilterTest(int ac, char* av[] ) } const unsigned int Dimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef float CorrelationPixelType; typedef itk::Image InputImageType; diff --git a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.h b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.h index d5d593d465a..94859a967d6 100644 --- a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.h +++ b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.h @@ -101,7 +101,7 @@ class ITK_EXPORT PatchBasedDenoisingImageFilter : typedef typename NumericTraits< PixelValueType >::RealType RealValueType; typedef Array PixelArrayType; typedef Array RealArrayType; - typedef Array ShortArrayType; + typedef Array ShortArrayType; /** Type definition for patch weights type. */ typedef typename Superclass::ListAdaptorType ListAdaptorType; diff --git a/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.h b/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.h index 13c259affb4..4cefa0e8e7b 100644 --- a/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.h +++ b/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.h @@ -123,7 +123,7 @@ namespace itk template< class TReferenceImagePixelType, class TGradientImagePixelType = TReferenceImagePixelType, class TTensorPixelType = double, - class TMaskImageType = Image > + class TMaskImageType = Image > class ITK_EXPORT DiffusionTensor3DReconstructionImageFilter: public ImageToImageFilter< Image< TReferenceImagePixelType, 3 >, Image< DiffusionTensor3D< TTensorPixelType >, 3 > > diff --git a/Modules/Filtering/DiffusionTensorImage/test/itkDiffusionTensor3DTest.cxx b/Modules/Filtering/DiffusionTensorImage/test/itkDiffusionTensor3DTest.cxx index 10161bda7cc..58b26117138 100644 --- a/Modules/Filtering/DiffusionTensorImage/test/itkDiffusionTensor3DTest.cxx +++ b/Modules/Filtering/DiffusionTensorImage/test/itkDiffusionTensor3DTest.cxx @@ -27,12 +27,12 @@ int itkDiffusionTensor3DTest(int, char* [] ) float val[6] = {1.8, 0.2, 0.5, 3.4, 2.0, 1.2}; typedef itk::DiffusionTensor3D Float3DTensorType; - typedef itk::DiffusionTensor3D Uchar3DTensorType; + typedef itk::DiffusionTensor3D Uchar3DTensorType; Float3DTensorType pixel(val); - unsigned char pixelInit0[6] = {255, 255, 255,128,34,17}; - unsigned char pixelInit1[6] = {255, 255, 244,19,23,29}; + uint8_t pixelInit0[6] = {255, 255, 255,128,34,17}; + uint8_t pixelInit1[6] = {255, 255, 244,19,23,29}; Uchar3DTensorType pixelArray[2]; pixelArray[0] = pixelInit0; diff --git a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.h b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.h index bfdfb3c4cf5..f30f91b66bb 100644 --- a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.h +++ b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.h @@ -49,7 +49,7 @@ namespace itk * image type. The pixel type of the input image is assumed to be a vector * (e.g., itk::Vector, itk::RGBPixel, itk::FixedArray). The scalar type of the * vector components must be castable to floating point. Instantiating with an - * image of RGBPixel, for example, is allowed, but the filter + * image of RGBPixel, for example, is allowed, but the filter * will convert it to an image of Vector for processing. * * The second template parameter, TRealType, can be optionally specified to diff --git a/Modules/Filtering/DistanceMap/test/itkApproximateSignedDistanceMapImageFilterTest.cxx b/Modules/Filtering/DistanceMap/test/itkApproximateSignedDistanceMapImageFilterTest.cxx index 23742f3d878..22951113ad5 100644 --- a/Modules/Filtering/DistanceMap/test/itkApproximateSignedDistanceMapImageFilterTest.cxx +++ b/Modules/Filtering/DistanceMap/test/itkApproximateSignedDistanceMapImageFilterTest.cxx @@ -56,7 +56,7 @@ int itkApproximateSignedDistanceMapImageFilterTest(int argc, char* argv[] ) const unsigned int ImageDimension = 2; typedef unsigned int InputPixelType; typedef float OutputPixelType; - typedef unsigned char WriterPixelType; + typedef uint8_t WriterPixelType; typedef itk::Image InputImageType; typedef itk::Image OutputImageType; diff --git a/Modules/Filtering/DistanceMap/test/itkDanielssonDistanceMapImageFilterTest.cxx b/Modules/Filtering/DistanceMap/test/itkDanielssonDistanceMapImageFilterTest.cxx index c661b999b8f..ea82e9c8423 100644 --- a/Modules/Filtering/DistanceMap/test/itkDanielssonDistanceMapImageFilterTest.cxx +++ b/Modules/Filtering/DistanceMap/test/itkDanielssonDistanceMapImageFilterTest.cxx @@ -29,7 +29,7 @@ int itkDanielssonDistanceMapImageFilterTest(int, char* [] ) std::cout << "with a point at (1,6) (value=2)" << std::endl << std::endl; - typedef itk::Image myImageType2D1; + typedef itk::Image myImageType2D1; typedef itk::Image myImageType2D2; /* Allocate the 2D image */ diff --git a/Modules/Filtering/DistanceMap/test/itkDanielssonDistanceMapImageFilterTest1.cxx b/Modules/Filtering/DistanceMap/test/itkDanielssonDistanceMapImageFilterTest1.cxx index 7b05a7ed6f8..8adf7c638bd 100644 --- a/Modules/Filtering/DistanceMap/test/itkDanielssonDistanceMapImageFilterTest1.cxx +++ b/Modules/Filtering/DistanceMap/test/itkDanielssonDistanceMapImageFilterTest1.cxx @@ -29,7 +29,7 @@ int itkDanielssonDistanceMapImageFilterTest1( int argc, char * argv[] ) } const unsigned int ImageDimension = 2; - typedef unsigned char InputPixelType; + typedef uint8_t InputPixelType; typedef float OutputPixelType; typedef itk::Image InputImageType; diff --git a/Modules/Filtering/DistanceMap/test/itkDanielssonDistanceMapImageFilterTest2.cxx b/Modules/Filtering/DistanceMap/test/itkDanielssonDistanceMapImageFilterTest2.cxx index 2455efb0609..4cb10fb74ea 100644 --- a/Modules/Filtering/DistanceMap/test/itkDanielssonDistanceMapImageFilterTest2.cxx +++ b/Modules/Filtering/DistanceMap/test/itkDanielssonDistanceMapImageFilterTest2.cxx @@ -31,8 +31,8 @@ int itkDanielssonDistanceMapImageFilterTest2( int argc, char * argv[] ) } const unsigned int ImageDimension = 2; - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image InputImageType; typedef itk::Image OutputImageType; diff --git a/Modules/Filtering/DistanceMap/test/itkIsoContourDistanceImageFilterTest.cxx b/Modules/Filtering/DistanceMap/test/itkIsoContourDistanceImageFilterTest.cxx index 3a03cf9aac4..752074c76d6 100644 --- a/Modules/Filtering/DistanceMap/test/itkIsoContourDistanceImageFilterTest.cxx +++ b/Modules/Filtering/DistanceMap/test/itkIsoContourDistanceImageFilterTest.cxx @@ -65,7 +65,7 @@ int itkIsoContourDistanceImageFilterTest(int, char* [] ) typedef float PixelType; typedef itk::Image ImageType; - typedef itk::Image OutputImageType; + typedef itk::Image OutputImageType; typedef ImageType::IndexType IndexType; typedef itk::Point PointType; diff --git a/Modules/Filtering/DistanceMap/test/itkSignedDanielssonDistanceMapImageFilterTest.cxx b/Modules/Filtering/DistanceMap/test/itkSignedDanielssonDistanceMapImageFilterTest.cxx index f327403505d..5a9bdf6874d 100644 --- a/Modules/Filtering/DistanceMap/test/itkSignedDanielssonDistanceMapImageFilterTest.cxx +++ b/Modules/Filtering/DistanceMap/test/itkSignedDanielssonDistanceMapImageFilterTest.cxx @@ -39,7 +39,7 @@ void test(int testIdx) const unsigned int Dimension = 2; typedef float PixelType; - typedef itk::Image< unsigned char, Dimension > myImageType2D1; + typedef itk::Image< uint8_t, Dimension > myImageType2D1; typedef itk::Image< PixelType, Dimension > myImageType2D2; /* TEST 1: For a point image, SignedDaniessonDistanceMapImageFilter should diff --git a/Modules/Filtering/DistanceMap/test/itkSignedDanielssonDistanceMapImageFilterTest1.cxx b/Modules/Filtering/DistanceMap/test/itkSignedDanielssonDistanceMapImageFilterTest1.cxx index 211407eae1f..aa82fec380d 100644 --- a/Modules/Filtering/DistanceMap/test/itkSignedDanielssonDistanceMapImageFilterTest1.cxx +++ b/Modules/Filtering/DistanceMap/test/itkSignedDanielssonDistanceMapImageFilterTest1.cxx @@ -29,7 +29,7 @@ int itkSignedDanielssonDistanceMapImageFilterTest1( int argc, char * argv[] ) } const unsigned int ImageDimension = 2; - typedef unsigned char InputPixelType; + typedef uint8_t InputPixelType; typedef float OutputPixelType; typedef itk::Image InputImageType; diff --git a/Modules/Filtering/DistanceMap/test/itkSignedDanielssonDistanceMapImageFilterTest2.cxx b/Modules/Filtering/DistanceMap/test/itkSignedDanielssonDistanceMapImageFilterTest2.cxx index 71972a27eca..2069afe261e 100644 --- a/Modules/Filtering/DistanceMap/test/itkSignedDanielssonDistanceMapImageFilterTest2.cxx +++ b/Modules/Filtering/DistanceMap/test/itkSignedDanielssonDistanceMapImageFilterTest2.cxx @@ -31,8 +31,8 @@ int itkSignedDanielssonDistanceMapImageFilterTest2( int argc, char * argv[] ) } const unsigned int ImageDimension = 2; - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image InputImageType; typedef itk::Image OutputImageType; diff --git a/Modules/Filtering/FFT/test/itkFFTShiftImageFilterTest.cxx b/Modules/Filtering/FFT/test/itkFFTShiftImageFilterTest.cxx index 0c5324b075c..e4b246cb9d2 100644 --- a/Modules/Filtering/FFT/test/itkFFTShiftImageFilterTest.cxx +++ b/Modules/Filtering/FFT/test/itkFFTShiftImageFilterTest.cxx @@ -37,7 +37,7 @@ int itkFFTShiftImageFilterTest(int argc, char * argv[]) const int dim = 3; - typedef itk::RGBPixel< unsigned char > PType; + typedef itk::RGBPixel< uint8_t > PType; typedef itk::Image< PType, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingBase.h b/Modules/Filtering/FastMarching/include/itkFastMarchingBase.h index 309345bca7c..6960d7b5e33 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingBase.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingBase.h @@ -259,7 +259,7 @@ class FastMarchingBase : public FastMarchingTraits::SuperclassT /** \brief Get the LabelType Value for a given node \param[in] iNode \return its label value */ - virtual unsigned char + virtual uint8_t GetLabelValueForGivenNode( const NodeType& iNode ) const = 0; /** \brief Set the Label Value for a given node diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.h b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.h index eab2e03fda3..f32e6811ba4 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.h @@ -169,7 +169,7 @@ class ITK_EXPORT FastMarchingImageFilter: TrialPoint, InitialTrialPoint, OutsidePoint }; /** LabelImage typedef support. */ - typedef Image< unsigned char, itkGetStaticConstMacro(SetDimension) > LabelImageType; + typedef Image< uint8_t, itkGetStaticConstMacro(SetDimension) > LabelImageType; /** LabelImagePointer typedef support. */ typedef typename LabelImageType::Pointer LabelImagePointer; diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.hxx index 2a507e50b4f..7922bc4cee8 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.hxx @@ -363,7 +363,7 @@ FastMarchingImageFilter< TLevelSet, TSpeedImage > LevelSetImageType *output) { IndexType neighIndex = index; - unsigned char label; + uint8_t label; for ( unsigned int j = 0; j < SetDimension; j++ ) { diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.h b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.h index 07be18cd9cb..8aa038f5b7e 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.h @@ -118,7 +118,7 @@ class FastMarchingImageFilterBase : itkStaticConstMacro( ImageDimension, unsigned int, Traits::ImageDimension ); - typedef Image< unsigned char, ImageDimension > LabelImageType; + typedef Image< uint8_t, ImageDimension > LabelImageType; typedef typename LabelImageType::Pointer LabelImagePointer; typedef Image< unsigned int, ImageDimension > @@ -193,7 +193,7 @@ class FastMarchingImageFilterBase : const NodeType& iNode ) const; /** Returns the label value for a given node */ - unsigned char + uint8_t GetLabelValueForGivenNode( const NodeType& iNode ) const; /** Set the label value for a given node */ @@ -238,8 +238,8 @@ class FastMarchingImageFilterBase : bool IsCriticalC3Configuration2D( const std::vector& ) const; bool IsCriticalC4Configuration2D( const std::vector& ) const; - Array m_RotationIndices[4]; - Array m_ReflectionIndices[2]; + Array m_RotationIndices[4]; + Array m_ReflectionIndices[2]; // Functions/data for the 3-D case void InitializeIndices3D(); @@ -247,8 +247,8 @@ class FastMarchingImageFilterBase : unsigned int IsCriticalC2Configuration3D( const std::vector& ) const; bool IsChangeWellComposed3D( const NodeType& ) const; - Array m_C1Indices[12]; - Array m_C2Indices[8]; + Array m_C1Indices[12]; + Array m_C2Indices[8]; // Functions for both 2D/3D cases bool DoesVoxelChangeViolateWellComposedness( const NodeType& ) const; diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx index 61d28372088..62a6d1122af 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx @@ -162,7 +162,7 @@ GetOutputValue( OutputImageType* oImage, const NodeType& iNode ) const // ----------------------------------------------------------------------------- template< class TInput, class TOutput > -unsigned char +uint8_t FastMarchingImageFilterBase< TInput, TOutput >:: GetLabelValueForGivenNode( const NodeType& iNode ) const { @@ -189,7 +189,7 @@ UpdateNeighbors( OutputImageType* oImage, const NodeType& iNode ) { NodeType neighIndex = iNode; - unsigned char label; + uint8_t label; typename NodeType::IndexValueType v, start, last; diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.h b/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.h index 3b3dc1214c6..2982a61da1d 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.h @@ -120,7 +120,7 @@ class FastMarchingQuadEdgeMeshFilterBase : const OutputPixelType GetOutputValue( OutputMeshType* oMesh, const NodeType& iNode ) const; - unsigned char GetLabelValueForGivenNode( const NodeType& iNode ) const; + uint8_t GetLabelValueForGivenNode( const NodeType& iNode ) const; void SetLabelValueForGivenNode( const NodeType& iNode, const LabelType& iLabel ); diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.hxx index 99576f54328..fd1e33cf0cd 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.hxx @@ -71,7 +71,7 @@ FastMarchingQuadEdgeMeshFilterBase< TInput, TOutput > template< class TInput, class TOutput > -unsigned char +uint8_t FastMarchingQuadEdgeMeshFilterBase< TInput, TOutput > ::GetLabelValueForGivenNode( const NodeType& iNode ) const { diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingBaseTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingBaseTest.cxx index 2ec80a11467..ca9c9383d56 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingBaseTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingBaseTest.cxx @@ -64,7 +64,7 @@ class FastMarchingBaseTestHelper : return NumericTraits< OutputPixelType >::Zero; } - unsigned char GetLabelValueForGivenNode( const NodeType& ) const + uint8_t GetLabelValueForGivenNode( const NodeType& ) const { return Traits::Far; } diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingExtensionImageFilterTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingExtensionImageFilterTest.cxx index 996d12e14f7..86eb02e9738 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingExtensionImageFilterTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingExtensionImageFilterTest.cxx @@ -50,7 +50,7 @@ int itkFastMarchingExtensionImageFilterTest(int, char* [] ) criterion->SetThreshold( 100. ); typedef itk::FastMarchingExtensionImageFilterBase< - FloatImageType, FloatImageType, unsigned char, 1 > + FloatImageType, FloatImageType, uint8_t, 1 > MarcherType; MarcherType::Pointer marcher = MarcherType::New(); diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingImageTopologicalTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingImageTopologicalTest.cxx index 6e86231d5cb..3d055053170 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingImageTopologicalTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingImageTopologicalTest.cxx @@ -31,7 +31,7 @@ int FastMarchingImageFilter( unsigned int argc, char *argv[] ) typedef itk::Image< InternalPixelType, VDimension > InternalImageType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image OutputImageType; diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientAnisotropicDiffusionImageFilter.h b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientAnisotropicDiffusionImageFilter.h index 79b50dee2b0..15b73b0c555 100644 --- a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientAnisotropicDiffusionImageFilter.h +++ b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientAnisotropicDiffusionImageFilter.h @@ -152,21 +152,21 @@ class GPUGradientAnisotropicDiffusionImageFilterFactory : public ObjectFactoryBa { if( IsGPUAvailable() ) { - GradientAnisotropicDiffusionImageFilterTypeMacro(unsigned char, unsigned char, 1); + GradientAnisotropicDiffusionImageFilterTypeMacro(uint8_t, uint8_t, 1); GradientAnisotropicDiffusionImageFilterTypeMacro(char, char, 1); GradientAnisotropicDiffusionImageFilterTypeMacro(float,float,1); GradientAnisotropicDiffusionImageFilterTypeMacro(int,int,1); GradientAnisotropicDiffusionImageFilterTypeMacro(unsigned int,unsigned int,1); GradientAnisotropicDiffusionImageFilterTypeMacro(double,double,1); - GradientAnisotropicDiffusionImageFilterTypeMacro(unsigned char, unsigned char, 2); + GradientAnisotropicDiffusionImageFilterTypeMacro(uint8_t, uint8_t, 2); GradientAnisotropicDiffusionImageFilterTypeMacro(char, char, 2); GradientAnisotropicDiffusionImageFilterTypeMacro(float,float,2); GradientAnisotropicDiffusionImageFilterTypeMacro(int,int,2); GradientAnisotropicDiffusionImageFilterTypeMacro(unsigned int,unsigned int,2); GradientAnisotropicDiffusionImageFilterTypeMacro(double,double,2); - GradientAnisotropicDiffusionImageFilterTypeMacro(unsigned char, unsigned char, 3); + GradientAnisotropicDiffusionImageFilterTypeMacro(uint8_t, uint8_t, 3); GradientAnisotropicDiffusionImageFilterTypeMacro(char, char, 3); GradientAnisotropicDiffusionImageFilterTypeMacro(float,float,3); GradientAnisotropicDiffusionImageFilterTypeMacro(int,int,3); diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.hxx b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.hxx index f2ef86d507c..dd4ef2137b8 100644 --- a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.hxx +++ b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.hxx @@ -95,13 +95,13 @@ GPUGradientNDAnisotropicDiffusionFunction< TImage > defines << "#define PIXELTYPE " << pixeltypename << "\n"; #ifdef __APPLE__ // This is to work around a bug in the OpenCL compiler on Mac OS 10.6 and 10.7 with NVidia drivers - // where the compiler was not handling unsigned char arguments correctly. + // where the compiler was not handling uint8_t arguments correctly. // be sure to define the kernel arguments as ArgType in the kernel source - // Using unsigned short instead of unsigned char in the kernel definition + // Using uint16_t instead of uint8_t in the kernel definition // is a known workaround to this problem. - if (pixeltypename == "unsigned char") + if (pixeltypename == "uint8_t") { - defines << "#define ARGTYPE unsigned short\n"; + defines << "#define ARGTYPE uint16_t\n"; } else { diff --git a/Modules/Filtering/GPUSmoothing/include/itkGPUMeanImageFilter.h b/Modules/Filtering/GPUSmoothing/include/itkGPUMeanImageFilter.h index 72fdb69aa45..2344bfbcdc2 100644 --- a/Modules/Filtering/GPUSmoothing/include/itkGPUMeanImageFilter.h +++ b/Modules/Filtering/GPUSmoothing/include/itkGPUMeanImageFilter.h @@ -147,21 +147,21 @@ class GPUMeanImageFilterFactory : public ObjectFactoryBase { if( IsGPUAvailable() ) { - OverrideMeanFilterTypeMacro(unsigned char, unsigned char, 1); + OverrideMeanFilterTypeMacro(uint8_t, uint8_t, 1); OverrideMeanFilterTypeMacro(char, char, 1); OverrideMeanFilterTypeMacro(float,float,1); OverrideMeanFilterTypeMacro(int,int,1); OverrideMeanFilterTypeMacro(unsigned int,unsigned int,1); OverrideMeanFilterTypeMacro(double,double,1); - OverrideMeanFilterTypeMacro(unsigned char, unsigned char, 2); + OverrideMeanFilterTypeMacro(uint8_t, uint8_t, 2); OverrideMeanFilterTypeMacro(char, char, 2); OverrideMeanFilterTypeMacro(float,float,2); OverrideMeanFilterTypeMacro(int,int,2); OverrideMeanFilterTypeMacro(unsigned int,unsigned int,2); OverrideMeanFilterTypeMacro(double,double,2); - OverrideMeanFilterTypeMacro(unsigned char, unsigned char, 3); + OverrideMeanFilterTypeMacro(uint8_t, uint8_t, 3); OverrideMeanFilterTypeMacro(char, char, 3); OverrideMeanFilterTypeMacro(float,float,3); OverrideMeanFilterTypeMacro(int,int,3); diff --git a/Modules/Filtering/GPUSmoothing/test/itkGPUMeanImageFilterTest.cxx b/Modules/Filtering/GPUSmoothing/test/itkGPUMeanImageFilterTest.cxx index 42a4b7aaf69..9ec251aa7e4 100644 --- a/Modules/Filtering/GPUSmoothing/test/itkGPUMeanImageFilterTest.cxx +++ b/Modules/Filtering/GPUSmoothing/test/itkGPUMeanImageFilterTest.cxx @@ -40,8 +40,8 @@ template< unsigned int VImageDimension > int runGPUMeanImageFilterTest(const std::string& inFile, const std::string& outFile) { - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; typedef itk::GPUImage< InputPixelType, VImageDimension > InputImageType; typedef itk::GPUImage< OutputPixelType, VImageDimension > OutputImageType; diff --git a/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h b/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h index 12d33c9c92c..b602833592a 100644 --- a/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h +++ b/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h @@ -196,22 +196,22 @@ class GPUBinaryThresholdImageFilterFactory : public ObjectFactoryBase { if( IsGPUAvailable() ) { - OverrideThresholdFilterTypeMacro(unsigned char, unsigned char, 1); + OverrideThresholdFilterTypeMacro(uint8_t, uint8_t, 1); OverrideThresholdFilterTypeMacro(char, char, 1); OverrideThresholdFilterTypeMacro(float,float,1); OverrideThresholdFilterTypeMacro(int,int,1); OverrideThresholdFilterTypeMacro(unsigned int,unsigned int,1); OverrideThresholdFilterTypeMacro(double,double,1); - OverrideThresholdFilterTypeMacro(unsigned char, unsigned char, 2); + OverrideThresholdFilterTypeMacro(uint8_t, uint8_t, 2); OverrideThresholdFilterTypeMacro(char, char, 2); OverrideThresholdFilterTypeMacro(float,float,2); OverrideThresholdFilterTypeMacro(int,int,2); OverrideThresholdFilterTypeMacro(unsigned int,unsigned int,2); OverrideThresholdFilterTypeMacro(double,double,2); - OverrideThresholdFilterTypeMacro(unsigned char, unsigned char, 3); - OverrideThresholdFilterTypeMacro(unsigned short, unsigned short, 3); + OverrideThresholdFilterTypeMacro(uint8_t, uint8_t, 3); + OverrideThresholdFilterTypeMacro(uint16_t, uint16_t, 3); OverrideThresholdFilterTypeMacro(char, char, 3); OverrideThresholdFilterTypeMacro(float,float,3); OverrideThresholdFilterTypeMacro(int,int,3); diff --git a/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.hxx b/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.hxx index aa1a4b0bd6d..a0c9578335b 100644 --- a/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.hxx +++ b/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.hxx @@ -20,8 +20,8 @@ GPUBinaryThresholdImageFilter< TInputImage, TOutputImage > } std::vector validTypes; - validTypes.push_back( "unsigned char" ); - validTypes.push_back( "unsigned short" ); + validTypes.push_back( "uint8_t" ); + validTypes.push_back( "uint16_t" ); validTypes.push_back( "char" ); validTypes.push_back( "int" ); validTypes.push_back( "unsigned int" ); @@ -38,14 +38,14 @@ GPUBinaryThresholdImageFilter< TInputImage, TOutputImage > defines << "#define OutPixelType " << validTypeName << "\n"; #ifdef __APPLE__ // This is to work around a bug in the OpenCL compiler on Mac OS 10.6 and 10.7 with NVidia drivers - // where the compiler was not handling unsigned char arguments correctly. + // where the compiler was not handling uint8_t arguments correctly. // be sure to define the kernel arguments as InArgType and OutArgType in the kernel source - // Using unsigned short instead of unsigned char in the kernel definition + // Using uint16_t instead of uint8_t in the kernel definition // is a known workaround to this problem. - if (validTypeName == "unsigned char") + if (validTypeName == "uint8_t") { - defines << "#define InArgType unsigned short\n"; - defines << "#define OutArgType unsigned short\n"; + defines << "#define InArgType uint16_t\n"; + defines << "#define OutArgType uint16_t\n"; } else { diff --git a/Modules/Filtering/GPUThresholding/test/itkGPUBinaryThresholdImageFilterTest.cxx b/Modules/Filtering/GPUThresholding/test/itkGPUBinaryThresholdImageFilterTest.cxx index ffdbb3e27f4..a339476a0e4 100644 --- a/Modules/Filtering/GPUThresholding/test/itkGPUBinaryThresholdImageFilterTest.cxx +++ b/Modules/Filtering/GPUThresholding/test/itkGPUBinaryThresholdImageFilterTest.cxx @@ -36,8 +36,8 @@ template< unsigned int VImageDimension > int runGPUBinaryThresholdImageFilterTest(const std::string& inFile, const std::string& outFile) { - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; typedef itk::GPUImage< InputPixelType, VImageDimension > InputImageType; typedef itk::GPUImage< OutputPixelType, VImageDimension > OutputImageType; diff --git a/Modules/Filtering/GPUThresholding/test/itkGPUImageFilterTest.cxx b/Modules/Filtering/GPUThresholding/test/itkGPUImageFilterTest.cxx index 12a348ca4bf..b884563f288 100644 --- a/Modules/Filtering/GPUThresholding/test/itkGPUImageFilterTest.cxx +++ b/Modules/Filtering/GPUThresholding/test/itkGPUImageFilterTest.cxx @@ -40,8 +40,8 @@ template< unsigned int VImageDimension > int runGPUImageFilterTest(const std::string& inFile, const std::string& outFile) { - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, VImageDimension > InputImageType; typedef itk::Image< OutputPixelType, VImageDimension > OutputImageType; diff --git a/Modules/Filtering/ImageCompare/test/itkConstrainedValueDifferenceImageFilterTest.cxx b/Modules/Filtering/ImageCompare/test/itkConstrainedValueDifferenceImageFilterTest.cxx index 2356a6e95e0..24e56e112eb 100644 --- a/Modules/Filtering/ImageCompare/test/itkConstrainedValueDifferenceImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompare/test/itkConstrainedValueDifferenceImageFilterTest.cxx @@ -29,7 +29,7 @@ int itkConstrainedValueDifferenceImageFilterTest(int, char* [] ) // Declare the types of the images typedef itk::Image myImageType1; typedef itk::Image myImageType2; - typedef itk::Image myImageType3; + typedef itk::Image myImageType3; // Declare the type of the index to access images typedef itk::Index myIndexType; diff --git a/Modules/Filtering/ImageCompare/test/itkSTAPLEImageFilterTest.cxx b/Modules/Filtering/ImageCompare/test/itkSTAPLEImageFilterTest.cxx index 545610ce09d..5acb26d30b8 100644 --- a/Modules/Filtering/ImageCompare/test/itkSTAPLEImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompare/test/itkSTAPLEImageFilterTest.cxx @@ -50,8 +50,8 @@ class StaplerBase virtual double GetSensitivity( unsigned int ) = 0; virtual double GetSpecificity( unsigned int ) = 0; - virtual unsigned short GetForeground() const = 0; - virtual void SetForeground( unsigned short ) = 0; + virtual uint16_t GetForeground() const = 0; + virtual void SetForeground( uint16_t ) = 0; virtual void SetConfidenceWeight( double ) = 0; virtual double GetConfidenceWeight() const = 0; @@ -69,7 +69,7 @@ class Stapler : public StaplerBase { public: typedef itk::Image< double, VDimension > OutputImageType; - typedef itk::Image< unsigned short, VDimension > InputImageType; + typedef itk::Image< uint16_t, VDimension > InputImageType; typedef itk::STAPLEImageFilter StapleFilterType; Stapler() @@ -89,9 +89,9 @@ class Stapler : public StaplerBase virtual double GetSpecificity( unsigned int i ) { return m_Stapler->GetSpecificity(i); } - virtual unsigned short GetForeground() const + virtual uint16_t GetForeground() const { return m_Stapler->GetForegroundValue(); } - virtual void SetForeground( unsigned short l ) + virtual void SetForeground( uint16_t l ) { m_Stapler->SetForegroundValue( l ); } virtual unsigned int GetElapsedIterations() @@ -182,7 +182,7 @@ int itkSTAPLEImageFilterTest( int argc, char * argv[]) stapler->SetConfidenceWeight( static_cast( atof(argv[4]) )); stapler->SetOutputFileName( argv[2] ); - stapler->SetForeground( static_cast( atoi(argv[3])) ); + stapler->SetForeground( static_cast( atoi(argv[3])) ); // Execute the stapler int ret = stapler->Execute(); diff --git a/Modules/Filtering/ImageCompare/test/itkSimilarityIndexImageFilterTest.cxx b/Modules/Filtering/ImageCompare/test/itkSimilarityIndexImageFilterTest.cxx index c49533e7e39..7e32100f08a 100644 --- a/Modules/Filtering/ImageCompare/test/itkSimilarityIndexImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompare/test/itkSimilarityIndexImageFilterTest.cxx @@ -21,7 +21,7 @@ int itkSimilarityIndexImageFilterTest(int, char* [] ) { - typedef unsigned char Pixel1Type; + typedef uint8_t Pixel1Type; typedef float Pixel2Type; enum { ImageDimension = 2 }; diff --git a/Modules/Filtering/ImageCompare/test/itkTestingComparisonImageFilterTest.cxx b/Modules/Filtering/ImageCompare/test/itkTestingComparisonImageFilterTest.cxx index c6c7831d35b..aae59ceee6c 100644 --- a/Modules/Filtering/ImageCompare/test/itkTestingComparisonImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompare/test/itkTestingComparisonImageFilterTest.cxx @@ -39,8 +39,8 @@ int itkTestingComparisonImageFilterTest(int argc, char *argv [] ) // Test using an unsigned integral pixel type and generate a signed // integral pixel type - typedef signed short InputPixelType; - typedef unsigned short OutputPixelType; + typedef int16_t InputPixelType; + typedef uint16_t OutputPixelType; const unsigned int Dimension = 2; diff --git a/Modules/Filtering/ImageCompose/include/itkJoinImageFilter.h b/Modules/Filtering/ImageCompose/include/itkJoinImageFilter.h index 9398213f8c9..63584865c81 100644 --- a/Modules/Filtering/ImageCompose/include/itkJoinImageFilter.h +++ b/Modules/Filtering/ImageCompose/include/itkJoinImageFilter.h @@ -34,7 +34,7 @@ namespace Functor * the components of the other pixel. The output pixel type is an * itk::Vector. The ValueType of the vector is the smallest scalar * type that can represent the dynamic range of the both the input - * pixel value types. Hence, joining a char and unsigned char + * pixel value types. Hence, joining a char and uint8_t * results in a short since that is the smallest datatype with a * large enough dynamic range. To define a consistent behavior * across different architectures, the join of an int and an @@ -179,7 +179,7 @@ struct MakeJoin { * image to the components of another image. The output image type is always * a itk::Vector image and the vector value type will the smallest type * that can represent the dynamic range of both the input value types. - * Hence, joining an image of char and unsigned char results in an image + * Hence, joining an image of char and uint8_t results in an image * of shorts since that is the smallest datatype with a large enough * dynamic range. To define a consistent behavior across different * architectures, the join of an int and an unsigned int is float. On a diff --git a/Modules/Filtering/ImageCompose/test/itkCompose2DCovariantVectorImageFilterTest.cxx b/Modules/Filtering/ImageCompose/test/itkCompose2DCovariantVectorImageFilterTest.cxx index 2878c2793ce..94c2807256a 100644 --- a/Modules/Filtering/ImageCompose/test/itkCompose2DCovariantVectorImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkCompose2DCovariantVectorImageFilterTest.cxx @@ -23,7 +23,7 @@ int itkCompose2DCovariantVectorImageFilterTest(int , char * []) { - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, 3 > InputImageType; typedef itk::CovariantVector OutputPixelType; diff --git a/Modules/Filtering/ImageCompose/test/itkCompose2DVectorImageFilterTest.cxx b/Modules/Filtering/ImageCompose/test/itkCompose2DVectorImageFilterTest.cxx index 19e34995ecc..28ce4a73f48 100644 --- a/Modules/Filtering/ImageCompose/test/itkCompose2DVectorImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkCompose2DVectorImageFilterTest.cxx @@ -23,7 +23,7 @@ int itkCompose2DVectorImageFilterTest(int , char * []) { - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, 3 > InputImageType; typedef itk::Vector OutputPixelType; diff --git a/Modules/Filtering/ImageCompose/test/itkCompose3DCovariantVectorImageFilterTest.cxx b/Modules/Filtering/ImageCompose/test/itkCompose3DCovariantVectorImageFilterTest.cxx index 8ab193e9ac6..0a4b4781ba5 100644 --- a/Modules/Filtering/ImageCompose/test/itkCompose3DCovariantVectorImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkCompose3DCovariantVectorImageFilterTest.cxx @@ -23,7 +23,7 @@ int itkCompose3DCovariantVectorImageFilterTest(int , char * []) { - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, 3 > InputImageType; typedef itk::CovariantVector OutputPixelType; diff --git a/Modules/Filtering/ImageCompose/test/itkCompose3DVectorImageFilterTest.cxx b/Modules/Filtering/ImageCompose/test/itkCompose3DVectorImageFilterTest.cxx index 3744f6bf8b4..a4a22d60130 100644 --- a/Modules/Filtering/ImageCompose/test/itkCompose3DVectorImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkCompose3DVectorImageFilterTest.cxx @@ -23,7 +23,7 @@ int itkCompose3DVectorImageFilterTest(int , char * []) { - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, 3 > InputImageType; typedef itk::CovariantVector OutputPixelType; diff --git a/Modules/Filtering/ImageCompose/test/itkComposeRGBAImageFilterTest.cxx b/Modules/Filtering/ImageCompose/test/itkComposeRGBAImageFilterTest.cxx index b55d4965e60..c794e2b029c 100644 --- a/Modules/Filtering/ImageCompose/test/itkComposeRGBAImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkComposeRGBAImageFilterTest.cxx @@ -52,7 +52,7 @@ int itkComposeRGBAImageFilterTest(int argc, char* argv[]) char* Input4Filename = argv[5]; // Typedefs - typedef unsigned char ScalarPixelType; + typedef uint8_t ScalarPixelType; const unsigned int Dimension = 2; typedef itk::RGBAPixel< ScalarPixelType > RGBAPixelType; typedef itk::Image< ScalarPixelType, Dimension > ScalarImageType; diff --git a/Modules/Filtering/ImageCompose/test/itkComposeRGBImageFilterTest.cxx b/Modules/Filtering/ImageCompose/test/itkComposeRGBImageFilterTest.cxx index 446c9b76894..76b0f32313d 100644 --- a/Modules/Filtering/ImageCompose/test/itkComposeRGBImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkComposeRGBImageFilterTest.cxx @@ -24,10 +24,10 @@ int itkComposeRGBImageFilterTest(int , char * []) { - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, 3 > InputImageType; - typedef itk::RGBPixel RGBPixelType; + typedef itk::RGBPixel RGBPixelType; typedef itk::Image< RGBPixelType, 3 > OutputImageType; diff --git a/Modules/Filtering/ImageCompose/test/itkImageToVectorImageFilterTest.cxx b/Modules/Filtering/ImageCompose/test/itkImageToVectorImageFilterTest.cxx index cf21e11a542..dc7dffd1f4e 100644 --- a/Modules/Filtering/ImageCompose/test/itkImageToVectorImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkImageToVectorImageFilterTest.cxx @@ -24,7 +24,7 @@ int itkImageToVectorImageFilterTest(int argc, char *argv[] ) { - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image ScalarImageType; typedef itk::VectorImage VectorImageType; diff --git a/Modules/Filtering/ImageCompose/test/itkJoinImageFilterTest.cxx b/Modules/Filtering/ImageCompose/test/itkJoinImageFilterTest.cxx index 08cf7ada4a4..f111ecb131f 100644 --- a/Modules/Filtering/ImageCompose/test/itkJoinImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkJoinImageFilterTest.cxx @@ -27,7 +27,7 @@ int itkJoinImageFilterTest(int, char* [] ) // Declare the types of the images typedef itk::Image myImageType1; - typedef itk::Image, myDimension> myImageType2; + typedef itk::Image, myDimension> myImageType2; typedef itk::Image, myDimension> myImageType3; // Declare the type of the index to access images @@ -98,11 +98,11 @@ int itkJoinImageFilterTest(int, char* [] ) // Initialize the content of Image B std::cout << std::endl; std::cout << "Image #2 " << std::endl; - itk::Vector vec; + itk::Vector vec; while( !it2.IsAtEnd() ) { - vec[0] = (unsigned short) vnl_sample_uniform(0, 32765); - vec[1] = (unsigned short) vnl_sample_uniform(0, 32765); + vec[0] = (uint16_t) vnl_sample_uniform(0, 32765); + vec[1] = (uint16_t) vnl_sample_uniform(0, 32765); it2.Set( vec ); std::cout << it2.Get() << std::endl; ++it2; diff --git a/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterStreamingTest.cxx b/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterStreamingTest.cxx index 0c1f013341e..e0a723e860f 100644 --- a/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterStreamingTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterStreamingTest.cxx @@ -25,8 +25,8 @@ int itkJoinSeriesImageFilterStreamingTest(int argc, char* argv[] ) { - typedef itk::Image< unsigned char, 3> ImageType; - typedef itk::Image< unsigned char, 2> SliceImageType; + typedef itk::Image< uint8_t, 3> ImageType; + typedef itk::Image< uint8_t, 2> SliceImageType; typedef itk::ImageFileReader ImageFileReaderType; typedef itk::ExtractImageFilter SliceExtractorFilterType; diff --git a/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx b/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx index f74b344ec1f..2d82c9fed18 100644 --- a/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx @@ -38,7 +38,7 @@ int itkJoinSeriesImageFilterTest(int, char* [] ) // itk::OutputWindow::SetInstance( itk::FileOutputWindow::New() ); const unsigned int streamDivisions = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, 2 > InputImageType; // typedef itk::Image< PixelType, 3 > OutputImageType; typedef itk::Image< PixelType, 4 > OutputImageType; diff --git a/Modules/Filtering/ImageFeature/include/itkMaskFeaturePointSelectionFilter.hxx b/Modules/Filtering/ImageFeature/include/itkMaskFeaturePointSelectionFilter.hxx index c288faca370..50f323936f5 100644 --- a/Modules/Filtering/ImageFeature/include/itkMaskFeaturePointSelectionFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkMaskFeaturePointSelectionFilter.hxx @@ -138,7 +138,7 @@ MaskFeaturePointSelectionFilter< TImage, TMask, TFeatures > PointDataContainerPointer pointData = PointDataContainer::New(); // initialize selectionMap - typedef unsigned char MapPixelType; + typedef uint8_t MapPixelType; typedef Image< MapPixelType, ImageDimension> SelectionMapType; typename SelectionMapType::Pointer selectionMap = SelectionMapType::New(); diff --git a/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest2.cxx b/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest2.cxx index 6b2cd8e3112..be8862ffde6 100644 --- a/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest2.cxx +++ b/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest2.cxx @@ -30,7 +30,7 @@ int itkBilateralImageFilterTest2(int ac, char* av[] ) return -1; } - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int dimension = 2; typedef itk::Image myImage; itk::ImageFileReader::Pointer input diff --git a/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest3.cxx b/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest3.cxx index b3a976b3e3b..e1d62b7080d 100644 --- a/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest3.cxx +++ b/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest3.cxx @@ -30,7 +30,7 @@ int itkBilateralImageFilterTest3(int ac, char* av[] ) return -1; } - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image myImage; itk::ImageFileReader::Pointer input = itk::ImageFileReader::New(); diff --git a/Modules/Filtering/ImageFeature/test/itkCannyEdgeDetectionImageFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkCannyEdgeDetectionImageFilterTest.cxx index 94226bbfcdd..11ed961787a 100644 --- a/Modules/Filtering/ImageFeature/test/itkCannyEdgeDetectionImageFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkCannyEdgeDetectionImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkCannyEdgeDetectionImageFilterTest(int argc, char * argv[] ) const unsigned int dimension = 2; typedef float PixelType; typedef itk::Image InputImage; - typedef itk::Image OutputImage; + typedef itk::Image OutputImage; itk::ImageFileReader::Pointer input = itk::ImageFileReader::New(); diff --git a/Modules/Filtering/ImageFeature/test/itkCannyEdgeDetectionImageFilterTest2.cxx b/Modules/Filtering/ImageFeature/test/itkCannyEdgeDetectionImageFilterTest2.cxx index b172ad2ee3d..4d02b05fb62 100644 --- a/Modules/Filtering/ImageFeature/test/itkCannyEdgeDetectionImageFilterTest2.cxx +++ b/Modules/Filtering/ImageFeature/test/itkCannyEdgeDetectionImageFilterTest2.cxx @@ -38,7 +38,7 @@ int itkCannyEdgeDetectionImageFilterTest2(int argc, char * argv[] ) const unsigned int dimension = 2; typedef float PixelType; typedef itk::Image InputImage; - typedef itk::Image OutputImage; + typedef itk::Image OutputImage; itk::ImageFileReader::Pointer input = itk::ImageFileReader::New(); diff --git a/Modules/Filtering/ImageFeature/test/itkDerivativeImageFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkDerivativeImageFilterTest.cxx index 29a74f4854d..bb485ab8543 100644 --- a/Modules/Filtering/ImageFeature/test/itkDerivativeImageFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkDerivativeImageFilterTest.cxx @@ -36,7 +36,7 @@ int itkDerivativeImageFilterTest(int argc, char *argv [] ) // Test using an unsigned integral pixel type and generate a signed // integral pixel type - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef short OutputPixelType; const unsigned int Dimension = 2; @@ -67,7 +67,7 @@ int itkDerivativeImageFilterTest(int argc, char *argv [] ) filter->SetInput( reader->GetOutput() ); // Write the output - typedef itk::Image< unsigned char, Dimension > WriteImageType; + typedef itk::Image< uint8_t, Dimension > WriteImageType; typedef itk::RescaleIntensityImageFilter< OutputImageType, diff --git a/Modules/Filtering/ImageFeature/test/itkHoughTransform2DCirclesImageTest.cxx b/Modules/Filtering/ImageFeature/test/itkHoughTransform2DCirclesImageTest.cxx index 4e7fa2760cb..3d19b29224b 100644 --- a/Modules/Filtering/ImageFeature/test/itkHoughTransform2DCirclesImageTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkHoughTransform2DCirclesImageTest.cxx @@ -24,7 +24,7 @@ int itkHoughTransform2DCirclesImageTest(int, char* []) { /** Typedefs */ - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef double HoughSpacePixelType; typedef itk::Image< HoughSpacePixelType, 2> HoughImageType; typedef itk::Image< PixelType, 2> ImageType; @@ -118,8 +118,8 @@ int itkHoughTransform2DCirclesImageTest(int, char* []) ThresholdFilterType::Pointer threshFilter = ThresholdFilterType::New(); threshFilter->SetInput(gradFilter->GetOutput()); threshFilter->SetOutsideValue(0); - unsigned char thresh_below = 10; - unsigned char thresh_above = 255; + uint8_t thresh_below = 10; + uint8_t thresh_above = 255; threshFilter->ThresholdOutside(thresh_below,thresh_above); threshFilter->Update(); diff --git a/Modules/Filtering/ImageFeature/test/itkHoughTransform2DLinesImageTest.cxx b/Modules/Filtering/ImageFeature/test/itkHoughTransform2DLinesImageTest.cxx index 4ac3d565f05..88dc050ae77 100644 --- a/Modules/Filtering/ImageFeature/test/itkHoughTransform2DLinesImageTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkHoughTransform2DLinesImageTest.cxx @@ -42,7 +42,7 @@ struct houghPoint int itkHoughTransform2DLinesImageTest(int, char* []) { /** Typedefs */ - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef double HoughSpacePixelType; typedef itk::Image< HoughSpacePixelType, 2> HoughImageType; typedef itk::Image< PixelType, 2> ImageType; @@ -118,8 +118,8 @@ int itkHoughTransform2DLinesImageTest(int, char* []) ThresholdFilterType::Pointer threshFilter = ThresholdFilterType::New(); threshFilter->SetInput(gradFilter->GetOutput()); threshFilter->SetOutsideValue(0); - unsigned char thresh_below = 10; - unsigned char thresh_above = 200; + uint8_t thresh_below = 10; + uint8_t thresh_above = 200; threshFilter->ThresholdOutside(thresh_below,thresh_above); threshFilter->Update(); diff --git a/Modules/Filtering/ImageFeature/test/itkLaplacianRecursiveGaussianImageFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkLaplacianRecursiveGaussianImageFilterTest.cxx index bfceb54e9ef..a3b9664ab82 100644 --- a/Modules/Filtering/ImageFeature/test/itkLaplacianRecursiveGaussianImageFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkLaplacianRecursiveGaussianImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkLaplacianRecursiveGaussianImageFilterTest(int argc, char* argv[]) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef unsigned char CharPixelType; //IO + typedef uint8_t CharPixelType; //IO typedef double RealPixelType; //Operations const unsigned int Dimension = 2; diff --git a/Modules/Filtering/ImageFeature/test/itkMaskFeaturePointSelectionFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkMaskFeaturePointSelectionFilterTest.cxx index a8cb8cd4ebd..9d4d3a14620 100644 --- a/Modules/Filtering/ImageFeature/test/itkMaskFeaturePointSelectionFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkMaskFeaturePointSelectionFilterTest.cxx @@ -37,7 +37,7 @@ int itkMaskFeaturePointSelectionFilterTest( int argc, char * argv[] ) return EXIT_FAILURE; } - typedef unsigned char InputPixelType; + typedef uint8_t InputPixelType; typedef itk::RGBPixel OutputPixelType; typedef itk::Matrix< double, 3, 3 > PointSetPixelType; diff --git a/Modules/Filtering/ImageFeature/test/itkSimpleContourExtractorImageFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkSimpleContourExtractorImageFilterTest.cxx index 9b0517d0119..baa34721d3d 100644 --- a/Modules/Filtering/ImageFeature/test/itkSimpleContourExtractorImageFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkSimpleContourExtractorImageFilterTest.cxx @@ -35,7 +35,7 @@ int itkSimpleContourExtractorImageFilterTest(int argc, char* argv [] ) const unsigned int Dimension = 2; // Define the pixel type - typedef unsigned char PixelType; + typedef uint8_t PixelType; // Declare the types of the images typedef itk::Image ImageType; diff --git a/Modules/Filtering/ImageFilterBase/test/itkCastImageFilterTest.cxx b/Modules/Filtering/ImageFilterBase/test/itkCastImageFilterTest.cxx index 41b40fd4938..43beb462b52 100644 --- a/Modules/Filtering/ImageFilterBase/test/itkCastImageFilterTest.cxx +++ b/Modules/Filtering/ImageFilterBase/test/itkCastImageFilterTest.cxx @@ -119,9 +119,9 @@ bool TestCastFrom() { bool success = TestCastFromTo< TInputPixelType, char >() && - TestCastFromTo< TInputPixelType, unsigned char >() && + TestCastFromTo< TInputPixelType, uint8_t >() && TestCastFromTo< TInputPixelType, short >() && - TestCastFromTo< TInputPixelType, unsigned short >() && + TestCastFromTo< TInputPixelType, uint16_t >() && TestCastFromTo< TInputPixelType, int >() && TestCastFromTo< TInputPixelType, unsigned int >() && TestCastFromTo< TInputPixelType, long >() && @@ -137,11 +137,11 @@ bool TestCastFrom() bool TestVectorImageCast() { // This function casts a VectorImage - // to a VectorImage + // to a VectorImage std::cout << "Casting from a VectorImage \ - to VectorImage ..." << std::endl; + to VectorImage ..." << std::endl; - typedef itk::VectorImage UnsignedCharVectorImageType; + typedef itk::VectorImage UnsignedCharVectorImageType; typedef itk::VectorImage FloatVectorImageType; // Create a 1x3 image of 2D vectors @@ -185,9 +185,9 @@ bool TestVectorImageCast() bool success = true; while(!originalImageIterator.IsAtEnd()) { - if(static_cast(originalImageIterator.Get()[0]) != + if(static_cast(originalImageIterator.Get()[0]) != castedImageIterator.Get()[0] || - static_cast(originalImageIterator.Get()[1]) != + static_cast(originalImageIterator.Get()[1]) != castedImageIterator.Get()[1]) { std::cerr << "Error in TestVectorImageCast!" << std::endl; @@ -216,9 +216,9 @@ int itkCastImageFilterTest( int, char* [] ) bool success = TestCastFrom< char >() && - TestCastFrom< unsigned char >() && + TestCastFrom< uint8_t >() && TestCastFrom< short >() && - TestCastFrom< unsigned short >() && + TestCastFrom< uint16_t >() && TestCastFrom< int >() && TestCastFrom< unsigned int >() && TestCastFrom< long >() && diff --git a/Modules/Filtering/ImageFilterBase/test/itkClampImageFilterTest.cxx b/Modules/Filtering/ImageFilterBase/test/itkClampImageFilterTest.cxx index 8c67cfba103..aa71337c1d2 100644 --- a/Modules/Filtering/ImageFilterBase/test/itkClampImageFilterTest.cxx +++ b/Modules/Filtering/ImageFilterBase/test/itkClampImageFilterTest.cxx @@ -132,9 +132,9 @@ bool TestClampFrom() { bool success = TestClampFromTo< TInputPixelType, char >() && - TestClampFromTo< TInputPixelType, unsigned char >() && + TestClampFromTo< TInputPixelType, uint8_t >() && TestClampFromTo< TInputPixelType, short >() && - TestClampFromTo< TInputPixelType, unsigned short >() && + TestClampFromTo< TInputPixelType, uint16_t >() && TestClampFromTo< TInputPixelType, int >() && TestClampFromTo< TInputPixelType, unsigned int >() && TestClampFromTo< TInputPixelType, long >() && @@ -154,9 +154,9 @@ int itkClampImageFilterTest( int, char* [] ) bool success = TestClampFrom< char >() && - TestClampFrom< unsigned char >() && + TestClampFrom< uint8_t >() && TestClampFrom< short >() && - TestClampFrom< unsigned short >() && + TestClampFrom< uint16_t >() && TestClampFrom< int >() && TestClampFrom< unsigned int >() && TestClampFrom< long >() && diff --git a/Modules/Filtering/ImageFilterBase/test/itkImageToImageFilterTest.cxx b/Modules/Filtering/ImageFilterBase/test/itkImageToImageFilterTest.cxx index 199f7247f0c..5c444c56211 100644 --- a/Modules/Filtering/ImageFilterBase/test/itkImageToImageFilterTest.cxx +++ b/Modules/Filtering/ImageFilterBase/test/itkImageToImageFilterTest.cxx @@ -41,8 +41,8 @@ int itkImageToImageFilterTest(int, char* [] ) { const unsigned int ImageDimension = 3; - typedef unsigned char InputPixelType; - typedef signed short OutputPixelType; + typedef uint8_t InputPixelType; + typedef int16_t OutputPixelType; typedef itk::Image< InputPixelType, ImageDimension > InputImageType; typedef itk::Image< OutputPixelType, ImageDimension > OutputImageType; diff --git a/Modules/Filtering/ImageFilterBase/test/itkMaskNeighborhoodOperatorImageFilterTest.cxx b/Modules/Filtering/ImageFilterBase/test/itkMaskNeighborhoodOperatorImageFilterTest.cxx index 1e2f5f99d5f..8d02e00074b 100644 --- a/Modules/Filtering/ImageFilterBase/test/itkMaskNeighborhoodOperatorImageFilterTest.cxx +++ b/Modules/Filtering/ImageFilterBase/test/itkMaskNeighborhoodOperatorImageFilterTest.cxx @@ -33,7 +33,7 @@ int itkMaskNeighborhoodOperatorImageFilterTest(int ac, char* av[] ) const unsigned int Dimension = 2; typedef float PixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image InputImageType; typedef itk::Image OutputImageType; @@ -44,7 +44,7 @@ int itkMaskNeighborhoodOperatorImageFilterTest(int ac, char* av[] ) input->Update(); // create a mask the size of the input file - typedef itk::Image MaskImageType; + typedef itk::Image MaskImageType; MaskImageType::Pointer mask1 = MaskImageType::New(); MaskImageType::Pointer mask2 = MaskImageType::New(); MaskImageType::RegionType region; diff --git a/Modules/Filtering/ImageFusion/include/itkLabelMapToRGBImageFilter.h b/Modules/Filtering/ImageFusion/include/itkLabelMapToRGBImageFilter.h index a2347f6d19a..b1fec042927 100644 --- a/Modules/Filtering/ImageFusion/include/itkLabelMapToRGBImageFilter.h +++ b/Modules/Filtering/ImageFusion/include/itkLabelMapToRGBImageFilter.h @@ -39,7 +39,7 @@ namespace itk { * \ingroup ImageEnhancement MathematicalMorphologyImageFilters * \ingroup ITKImageFusion */ -template, TInputImage::ImageDimension > > +template, TInputImage::ImageDimension > > class ITK_EXPORT LabelMapToRGBImageFilter : public LabelMapFilter { diff --git a/Modules/Filtering/ImageFusion/include/itkLabelToRGBFunctor.h b/Modules/Filtering/ImageFusion/include/itkLabelToRGBFunctor.h index 7dae2dd535e..68d564d53c0 100644 --- a/Modules/Filtering/ImageFusion/include/itkLabelToRGBFunctor.h +++ b/Modules/Filtering/ImageFusion/include/itkLabelToRGBFunctor.h @@ -123,7 +123,7 @@ class LabelToRGBFunctor return m_Colors[p % m_Colors.size()]; } - void AddColor(unsigned char r, unsigned char g, unsigned char b) + void AddColor(uint8_t r, uint8_t g, uint8_t b) { TRGBPixel rgbPixel; NumericTraits::SetLength(rgbPixel, 3); diff --git a/Modules/Filtering/ImageFusion/include/itkScalarToRGBPixelFunctor.h b/Modules/Filtering/ImageFusion/include/itkScalarToRGBPixelFunctor.h index da4b09c1598..9399da5d8e6 100644 --- a/Modules/Filtering/ImageFusion/include/itkScalarToRGBPixelFunctor.h +++ b/Modules/Filtering/ImageFusion/include/itkScalarToRGBPixelFunctor.h @@ -47,7 +47,7 @@ class ITK_EXPORT ScalarToRGBPixelFunctor ScalarToRGBPixelFunctor(); ~ScalarToRGBPixelFunctor() {} - typedef unsigned char RGBComponentType; + typedef uint8_t RGBComponentType; typedef RGBPixel< RGBComponentType > RGBPixelType; typedef TScalar ScalarType; diff --git a/Modules/Filtering/ImageFusion/include/itkScalarToRGBPixelFunctor.hxx b/Modules/Filtering/ImageFusion/include/itkScalarToRGBPixelFunctor.hxx index ba6dcbb28b8..d59e6ef9b34 100644 --- a/Modules/Filtering/ImageFusion/include/itkScalarToRGBPixelFunctor.hxx +++ b/Modules/Filtering/ImageFusion/include/itkScalarToRGBPixelFunctor.hxx @@ -53,7 +53,7 @@ ScalarToRGBPixelFunctor< TScalar > int j; TScalar buf = v; - unsigned char *bytes = (unsigned char *)( &buf ); + uint8_t *bytes = (uint8_t *)( &buf ); RGBPixelType ans; @@ -62,7 +62,7 @@ ScalarToRGBPixelFunctor< TScalar > TScalar tmp; for ( j = sizeof( TScalar ) - 1, i = 0; j >= 0; j--, i++ ) { - ( (unsigned char *)( &tmp ) )[i] = bytes[j]; + ( (uint8_t *)( &tmp ) )[i] = bytes[j]; } buf = tmp; } diff --git a/Modules/Filtering/ImageFusion/test/itkLabelMapContourOverlayImageFilterTest1.cxx b/Modules/Filtering/ImageFusion/test/itkLabelMapContourOverlayImageFilterTest1.cxx index d8f8dfa946c..dacba5bc889 100644 --- a/Modules/Filtering/ImageFusion/test/itkLabelMapContourOverlayImageFilterTest1.cxx +++ b/Modules/Filtering/ImageFusion/test/itkLabelMapContourOverlayImageFilterTest1.cxx @@ -33,7 +33,7 @@ int itkLabelMapContourOverlayImageFilterTest1(int argc, char * argv[]) const int dim = 2; - typedef itk::Image< unsigned char, dim > IType; + typedef itk::Image< uint8_t, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); @@ -46,7 +46,7 @@ int itkLabelMapContourOverlayImageFilterTest1(int argc, char * argv[]) ReaderType::Pointer reader2 = ReaderType::New(); reader2->SetFileName( argv[2] ); -// typedef itk::RGBPixel< unsigned char > RGBPixelType; +// typedef itk::RGBPixel< uint8_t > RGBPixelType; // typedef itk::Image< RGBPixelType, dim > RGBImageType; typedef itk::LabelMapContourOverlayImageFilter< ConverterType::OutputImageType, IType > ColorizerType; diff --git a/Modules/Filtering/ImageFusion/test/itkLabelMapContourOverlayImageFilterTest2.cxx b/Modules/Filtering/ImageFusion/test/itkLabelMapContourOverlayImageFilterTest2.cxx index dfa29df7d6a..16f50f330d2 100644 --- a/Modules/Filtering/ImageFusion/test/itkLabelMapContourOverlayImageFilterTest2.cxx +++ b/Modules/Filtering/ImageFusion/test/itkLabelMapContourOverlayImageFilterTest2.cxx @@ -33,8 +33,8 @@ int itkLabelMapContourOverlayImageFilterTest2(int argc, char * argv[]) const int dim = 2; - typedef itk::Image< unsigned char, dim > IType; - typedef itk::VectorImage< unsigned char, dim > OType; + typedef itk::Image< uint8_t, dim > IType; + typedef itk::VectorImage< uint8_t, dim > OType; typedef itk::ImageFileReader< IType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); @@ -47,7 +47,7 @@ int itkLabelMapContourOverlayImageFilterTest2(int argc, char * argv[]) ReaderType::Pointer reader2 = ReaderType::New(); reader2->SetFileName( argv[2] ); -// typedef itk::RGBPixel< unsigned char > RGBPixelType; +// typedef itk::RGBPixel< uint8_t > RGBPixelType; // typedef itk::Image< RGBPixelType, dim > RGBImageType; typedef itk::LabelMapContourOverlayImageFilter< ConverterType::OutputImageType, IType,OType > ColorizerType; diff --git a/Modules/Filtering/ImageFusion/test/itkLabelMapOverlayImageFilterTest1.cxx b/Modules/Filtering/ImageFusion/test/itkLabelMapOverlayImageFilterTest1.cxx index d755379f1ce..cfc6949cda5 100644 --- a/Modules/Filtering/ImageFusion/test/itkLabelMapOverlayImageFilterTest1.cxx +++ b/Modules/Filtering/ImageFusion/test/itkLabelMapOverlayImageFilterTest1.cxx @@ -34,7 +34,7 @@ int itkLabelMapOverlayImageFilterTest1(int argc, char * argv[]) const int dim = 2; - typedef itk::Image< unsigned char, dim > IType; + typedef itk::Image< uint8_t, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); @@ -47,7 +47,7 @@ int itkLabelMapOverlayImageFilterTest1(int argc, char * argv[]) ReaderType::Pointer reader2 = ReaderType::New(); reader2->SetFileName( argv[2] ); -// typedef itk::RGBPixel< unsigned char > RGBPixelType; +// typedef itk::RGBPixel< uint8_t > RGBPixelType; // typedef itk::Image< RGBPixelType, dim > RGBImageType; typedef itk::LabelMapOverlayImageFilter< ConverterType::OutputImageType, IType > ColorizerType; diff --git a/Modules/Filtering/ImageFusion/test/itkLabelMapOverlayImageFilterTest2.cxx b/Modules/Filtering/ImageFusion/test/itkLabelMapOverlayImageFilterTest2.cxx index 6bfe881f7d0..364f5da6d2b 100644 --- a/Modules/Filtering/ImageFusion/test/itkLabelMapOverlayImageFilterTest2.cxx +++ b/Modules/Filtering/ImageFusion/test/itkLabelMapOverlayImageFilterTest2.cxx @@ -33,8 +33,8 @@ int itkLabelMapOverlayImageFilterTest2(int argc, char * argv[]) const int dim = 2; - typedef itk::Image< unsigned char, dim > IType; - typedef itk::VectorImage< unsigned char, dim > OType; + typedef itk::Image< uint8_t, dim > IType; + typedef itk::VectorImage< uint8_t, dim > OType; typedef itk::ImageFileReader< IType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Filtering/ImageFusion/test/itkLabelMapToRGBImageFilterTest1.cxx b/Modules/Filtering/ImageFusion/test/itkLabelMapToRGBImageFilterTest1.cxx index 0abe8db8e64..a8b54c519e2 100644 --- a/Modules/Filtering/ImageFusion/test/itkLabelMapToRGBImageFilterTest1.cxx +++ b/Modules/Filtering/ImageFusion/test/itkLabelMapToRGBImageFilterTest1.cxx @@ -34,7 +34,7 @@ int itkLabelMapToRGBImageFilterTest1(int argc, char * argv[]) const int dim = 2; - typedef itk::Image< unsigned char, dim > IType; + typedef itk::Image< uint8_t, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); @@ -44,7 +44,7 @@ int itkLabelMapToRGBImageFilterTest1(int argc, char * argv[]) ConverterType::Pointer converter = ConverterType::New(); converter->SetInput( reader->GetOutput() ); -// typedef itk::RGBPixel< unsigned char > RGBPixelType; +// typedef itk::RGBPixel< uint8_t > RGBPixelType; // typedef itk::Image< RGBPixelType, dim > RGBImageType; typedef itk::LabelMapToRGBImageFilter< ConverterType::OutputImageType > ColorizerType; diff --git a/Modules/Filtering/ImageFusion/test/itkLabelMapToRGBImageFilterTest2.cxx b/Modules/Filtering/ImageFusion/test/itkLabelMapToRGBImageFilterTest2.cxx index d11755b77e8..62787fb6e56 100644 --- a/Modules/Filtering/ImageFusion/test/itkLabelMapToRGBImageFilterTest2.cxx +++ b/Modules/Filtering/ImageFusion/test/itkLabelMapToRGBImageFilterTest2.cxx @@ -33,8 +33,8 @@ int itkLabelMapToRGBImageFilterTest2(int argc, char * argv[]) const int dim = 2; - typedef itk::Image< unsigned char, dim > IType; - typedef itk::VectorImage< unsigned char, dim > OType; + typedef itk::Image< uint8_t, dim > IType; + typedef itk::VectorImage< uint8_t, dim > OType; typedef itk::ImageFileReader< IType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Filtering/ImageFusion/test/itkLabelOverlayImageFilterTest.cxx b/Modules/Filtering/ImageFusion/test/itkLabelOverlayImageFilterTest.cxx index 557ee37e16b..2bc9abb2a77 100644 --- a/Modules/Filtering/ImageFusion/test/itkLabelOverlayImageFilterTest.cxx +++ b/Modules/Filtering/ImageFusion/test/itkLabelOverlayImageFilterTest.cxx @@ -35,9 +35,9 @@ int itkLabelOverlayImageFilterTest(int argc, char * argv[]) return 1; } - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > ImageType; - typedef itk::RGBPixel ColorPixelType; + typedef itk::RGBPixel ColorPixelType; typedef itk::Image< ColorPixelType, Dimension > ColorImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/ImageFusion/test/itkLabelToRGBImageFilterTest.cxx b/Modules/Filtering/ImageFusion/test/itkLabelToRGBImageFilterTest.cxx index 4da23d4e1b2..6bbc3a26a63 100644 --- a/Modules/Filtering/ImageFusion/test/itkLabelToRGBImageFilterTest.cxx +++ b/Modules/Filtering/ImageFusion/test/itkLabelToRGBImageFilterTest.cxx @@ -34,9 +34,9 @@ int itkLabelToRGBImageFilterTest(int argc, char * argv[]) return 1; } - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > ImageType; - typedef itk::RGBPixel ColorPixelType; + typedef itk::RGBPixel ColorPixelType; typedef itk::Image< ColorPixelType, Dimension > ColorImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/ImageFusion/test/itkScalarToRGBPixelFunctorTest.cxx b/Modules/Filtering/ImageFusion/test/itkScalarToRGBPixelFunctorTest.cxx index 1d8c97114a1..74ed9f2ff62 100644 --- a/Modules/Filtering/ImageFusion/test/itkScalarToRGBPixelFunctorTest.cxx +++ b/Modules/Filtering/ImageFusion/test/itkScalarToRGBPixelFunctorTest.cxx @@ -22,7 +22,7 @@ int itkScalarToRGBPixelFunctorTest(int, char* [] ) { - itk::RGBPixel pixel; + itk::RGBPixel pixel; // Test with unsigned long. itk::Functor::ScalarToRGBPixelFunctor ulf; @@ -50,10 +50,10 @@ int itkScalarToRGBPixelFunctorTest(int, char* [] ) << std::endl; } - // Test with unsigned char. - itk::Functor::ScalarToRGBPixelFunctor ucf; + // Test with uint8_t. + itk::Functor::ScalarToRGBPixelFunctor ucf; - std::cout << "Testing unsigned char" << std::endl; + std::cout << "Testing uint8_t" << std::endl; for (char c = 0; c < 100; ++c) { pixel = ucf(c); diff --git a/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.h b/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.h index 80b18c630fc..3d0c0d6656f 100644 --- a/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.h +++ b/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.h @@ -60,7 +60,7 @@ namespace itk * image type. The pixel type of the input image is assumed to be a vector * (e.g., itk::Vector, itk::RGBPixel, itk::FixedArray). The scalar type of the * vector components must be castable to floating point. Instantiating with an - * image of RGBPixel, for example, is allowed, but the filter + * image of RGBPixel, for example, is allowed, but the filter * will convert it to an image of Vector for processing. * * The second template parameter, TRealType, can be optionally specified to define the diff --git a/Modules/Filtering/ImageGradient/test/itkDifferenceOfGaussiansGradientTest.cxx b/Modules/Filtering/ImageGradient/test/itkDifferenceOfGaussiansGradientTest.cxx index c8db1279a4d..5d298d9d1c0 100644 --- a/Modules/Filtering/ImageGradient/test/itkDifferenceOfGaussiansGradientTest.cxx +++ b/Modules/Filtering/ImageGradient/test/itkDifferenceOfGaussiansGradientTest.cxx @@ -39,7 +39,7 @@ int itkDifferenceOfGaussiansGradientTest(int, char* [] ) const unsigned int dim = 3; // Image typedef - typedef itk::Image< unsigned char, dim > TImageType; + typedef itk::Image< uint8_t, dim > TImageType; //-----------------Create a new input image-------------------- // Image size and spacing parameters @@ -179,7 +179,7 @@ int itkDifferenceOfGaussiansGradientTest(int, char* [] ) //-------------Test vector magnitude------------- typedef itk::VectorMagnitudeImageFilter > VectorMagType; + itk::Image > VectorMagType; VectorMagType::Pointer vectorMagFilter = VectorMagType::New(); diff --git a/Modules/Filtering/ImageGradient/test/itkGradientImageFilterTest.cxx b/Modules/Filtering/ImageGradient/test/itkGradientImageFilterTest.cxx index 2778e343afe..78c1175aae3 100644 --- a/Modules/Filtering/ImageGradient/test/itkGradientImageFilterTest.cxx +++ b/Modules/Filtering/ImageGradient/test/itkGradientImageFilterTest.cxx @@ -31,7 +31,7 @@ int itkGradientImageFilterTest(int , char * [] ) { try { - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::GradientImageFilter FilterType; typedef FilterType::OutputImageType OutputImageType; diff --git a/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest1.cxx b/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest1.cxx index fb3fbd73e7a..e28ed7a6c22 100644 --- a/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest1.cxx +++ b/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest1.cxx @@ -24,8 +24,8 @@ int itkVectorGradientMagnitudeImageFilterTest1(int ac, char* av[] ) { - typedef itk::RGBPixel RGBPixelType; - typedef itk::Image CharImageType; + typedef itk::RGBPixel RGBPixelType; + typedef itk::Image CharImageType; typedef itk::Image RGBImageType; typedef itk::VectorGradientMagnitudeImageFilter FilterType; typedef itk::ImageFileReader ReaderType; diff --git a/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest2.cxx b/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest2.cxx index fe39f3f71ca..5135f43e340 100644 --- a/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest2.cxx +++ b/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest2.cxx @@ -25,10 +25,10 @@ int itkVectorGradientMagnitudeImageFilterTest2(int ac, char* av[] ) { - typedef itk::RGBPixel RGBPixelType; + typedef itk::RGBPixel RGBPixelType; typedef itk::Image RGBImageType; - typedef itk::Image CharImage3Type; - typedef itk::Image CharImage2Type; + typedef itk::Image CharImage3Type; + typedef itk::Image CharImage2Type; typedef itk::VectorGradientMagnitudeImageFilter FilterType; typedef itk::ImageFileReader ReaderType; typedef itk::RescaleIntensityImageFilter diff --git a/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest3.cxx b/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest3.cxx index cffd54e4cf0..9938eb0bf5e 100644 --- a/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest3.cxx +++ b/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest3.cxx @@ -23,7 +23,7 @@ int itkVectorGradientMagnitudeImageFilterTest3(int ac, char* av[] ) { - typedef itk::RGBPixel RGBPixelType; + typedef itk::RGBPixel RGBPixelType; typedef itk::Image RGBImageType; typedef itk::PipelineMonitorImageFilter Monitor1Filter; diff --git a/Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.h b/Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.h index 41855a5e494..df8a118c713 100644 --- a/Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.h +++ b/Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.h @@ -125,7 +125,7 @@ class ITK_EXPORT CoxDeBoorBSplineKernelFunction: * See, for example, L. Piegl, L. Tiller, "The NURBS Book," * Springer 1997, p. 50. */ - PolynomialType CoxDeBoor( const unsigned short, const VectorType, + PolynomialType CoxDeBoor( const uint16_t, const VectorType, const unsigned int, const unsigned int ); MatrixType m_BSplineShapeFunctions; diff --git a/Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.hxx b/Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.hxx index bd2fe522ba2..df26ad8a557 100644 --- a/Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.hxx +++ b/Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.hxx @@ -76,14 +76,14 @@ CoxDeBoorBSplineKernelFunction template typename CoxDeBoorBSplineKernelFunction::PolynomialType CoxDeBoorBSplineKernelFunction -::CoxDeBoor( const unsigned short order, const VectorType knots, +::CoxDeBoor( const uint16_t order, const VectorType knots, const unsigned int whichBasisFunction, const unsigned int whichPiece ) { VectorType tmp( 2 ); PolynomialType poly1( NumericTraits< TRealValueType >::Zero ); PolynomialType poly2( NumericTraits< TRealValueType >::Zero ); - const unsigned short p = order - 1; - const unsigned short i = whichBasisFunction; + const uint16_t p = order - 1; + const uint16_t i = whichBasisFunction; if ( p == 0 && whichBasisFunction == whichPiece ) { diff --git a/Modules/Filtering/ImageGrid/include/itkOrientImageFilter.h b/Modules/Filtering/ImageGrid/include/itkOrientImageFilter.h index 7776a793f50..255023334a3 100644 --- a/Modules/Filtering/ImageGrid/include/itkOrientImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkOrientImageFilter.h @@ -81,7 +81,7 @@ namespace itk * #include "itkMetaDataObject.h" * #include "itkImage.h" * #include "itkOrientImageFilter.h" - * typedef itk::Image ImageType; + * typedef itk::Image ImageType; * typedef itk::ImageFileReader< TstImageType > ImageReaderType; * ImageType::Pointer ReadAnalyzeFile(const char *path) * { @@ -113,7 +113,7 @@ namespace itk * #include "itkAnalyzeImageIO.h" * #include "itkImage.h" * #include "itkOrientImageFilter.h" - * typedef itk::Image ImageType; + * typedef itk::Image ImageType; * typedef itk::ImageFileReader< TstImageType > ImageReaderType; * ImageType::Pointer ReadAnalyzeFile(const char *path) * { diff --git a/Modules/Filtering/ImageGrid/test/itkBSplineDownsampleImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkBSplineDownsampleImageFilterTest.cxx index f0d24a73856..46de20ff328 100644 --- a/Modules/Filtering/ImageGrid/test/itkBSplineDownsampleImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBSplineDownsampleImageFilterTest.cxx @@ -44,7 +44,7 @@ int itkBSplineDownsampleImageFilterTest( int argc, char * argv [] ) return EXIT_FAILURE; } - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Modules/Filtering/ImageGrid/test/itkBSplineUpsampleImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkBSplineUpsampleImageFilterTest.cxx index 69768d08a20..2a566d926d1 100644 --- a/Modules/Filtering/ImageGrid/test/itkBSplineUpsampleImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBSplineUpsampleImageFilterTest.cxx @@ -44,7 +44,7 @@ int itkBSplineUpsampleImageFilterTest( int argc, char * argv [] ) return EXIT_FAILURE; } - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Modules/Filtering/ImageGrid/test/itkCropImageFilter3DTest.cxx b/Modules/Filtering/ImageGrid/test/itkCropImageFilter3DTest.cxx index 676b9241c28..0dcc93087a8 100644 --- a/Modules/Filtering/ImageGrid/test/itkCropImageFilter3DTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkCropImageFilter3DTest.cxx @@ -21,7 +21,7 @@ int itkCropImageFilter3DTest(int, char* [] ) { - typedef itk::Image ImageType; + typedef itk::Image ImageType; ImageType::RegionType region; const unsigned int dimSize(8); @@ -34,7 +34,7 @@ int itkCropImageFilter3DTest(int, char* [] ) image->Allocate(); itk::ImageRegionIterator it(image,region); - for(unsigned short i = 0; !it.IsAtEnd(); ++it, ++i) + for(uint16_t i = 0; !it.IsAtEnd(); ++it, ++i) { it.Set(i); } diff --git a/Modules/Filtering/ImageGrid/test/itkCyclicShiftImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkCyclicShiftImageFilterTest.cxx index 9fd12a5dfdf..848cf95880d 100644 --- a/Modules/Filtering/ImageGrid/test/itkCyclicShiftImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkCyclicShiftImageFilterTest.cxx @@ -32,7 +32,7 @@ int itkCyclicShiftImageFilterTest(int argc, char * argv[]) const unsigned int Dimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; typedef itk::ChangeInformationImageFilter< ImageType > ChangeInfoFilterType; diff --git a/Modules/Filtering/ImageGrid/test/itkFlipImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkFlipImageFilterTest.cxx index 50bcac297f0..4eccc1efc74 100644 --- a/Modules/Filtering/ImageGrid/test/itkFlipImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkFlipImageFilterTest.cxx @@ -25,7 +25,7 @@ int itkFlipImageFilterTest(int, char* [] ) itk::OutputWindow::SetInstance(itk::TextOutput::New()); - typedef unsigned char PixelType; + typedef uint8_t PixelType; enum { ImageDimension = 3 }; typedef itk::Image ImageType; typedef itk::FlipImageFilter FlipperType; diff --git a/Modules/Filtering/ImageGrid/test/itkOrientedImage2DTest.cxx b/Modules/Filtering/ImageGrid/test/itkOrientedImage2DTest.cxx index 84957c37c8d..2811d66f872 100644 --- a/Modules/Filtering/ImageGrid/test/itkOrientedImage2DTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkOrientedImage2DTest.cxx @@ -36,7 +36,7 @@ int itkOrientedImage2DTest( int ac, char * av[] ) } const unsigned int Dimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/ImageGrid/test/itkOrientedImage3DTest.cxx b/Modules/Filtering/ImageGrid/test/itkOrientedImage3DTest.cxx index 5ad5214b8bf..f20657a4260 100644 --- a/Modules/Filtering/ImageGrid/test/itkOrientedImage3DTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkOrientedImage3DTest.cxx @@ -37,7 +37,7 @@ int itkOrientedImage3DTest( int ac, char * av[] ) } const unsigned int Dimension = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/ImageGrid/test/itkOrientedImageProfileTest1.cxx b/Modules/Filtering/ImageGrid/test/itkOrientedImageProfileTest1.cxx index e536d0edf2b..da6b968018d 100644 --- a/Modules/Filtering/ImageGrid/test/itkOrientedImageProfileTest1.cxx +++ b/Modules/Filtering/ImageGrid/test/itkOrientedImageProfileTest1.cxx @@ -23,7 +23,7 @@ int itkOrientedImageProfileTest1( int, char *[] ) { const unsigned int Dimension = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image ImageType; diff --git a/Modules/Filtering/ImageGrid/test/itkOrientedImageProfileTest2.cxx b/Modules/Filtering/ImageGrid/test/itkOrientedImageProfileTest2.cxx index 9598092afe2..95d318fa25e 100644 --- a/Modules/Filtering/ImageGrid/test/itkOrientedImageProfileTest2.cxx +++ b/Modules/Filtering/ImageGrid/test/itkOrientedImageProfileTest2.cxx @@ -23,7 +23,7 @@ int itkOrientedImageProfileTest2( int, char *[] ) { const unsigned int Dimension = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; // // Yes, on purpose we are using here the itk::Image, so we can compare it diff --git a/Modules/Filtering/ImageGrid/test/itkOrientedImageProfileTest3.cxx b/Modules/Filtering/ImageGrid/test/itkOrientedImageProfileTest3.cxx index 44675b00ac7..146b904e6ee 100644 --- a/Modules/Filtering/ImageGrid/test/itkOrientedImageProfileTest3.cxx +++ b/Modules/Filtering/ImageGrid/test/itkOrientedImageProfileTest3.cxx @@ -24,7 +24,7 @@ int itkOrientedImageProfileTest3( int , char *[] ) { const unsigned int Dimension = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; // // Yes, on purpose we are using here the itk::VectorImage, so we can compare it diff --git a/Modules/Filtering/ImageGrid/test/itkPasteImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkPasteImageFilterTest.cxx index 5fefe16e4ec..3509015aa1b 100644 --- a/Modules/Filtering/ImageGrid/test/itkPasteImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkPasteImageFilterTest.cxx @@ -31,7 +31,7 @@ int itkPasteImageFilterTest(int ac, char* av[] ) return -1; } - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image myImage; itk::ImageFileReader::Pointer dest = itk::ImageFileReader::New(); diff --git a/Modules/Filtering/ImageGrid/test/itkPermuteAxesImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkPermuteAxesImageFilterTest.cxx index 477be20066f..d95228d416b 100644 --- a/Modules/Filtering/ImageGrid/test/itkPermuteAxesImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkPermuteAxesImageFilterTest.cxx @@ -38,7 +38,7 @@ int itkPermuteAxesImageFilterTest(int, char* [] ) itk::OutputWindow::SetInstance( itk::TextOutput::New() ); - typedef unsigned char PixelType; + typedef uint8_t PixelType; enum { ImageDimension = 4 }; typedef itk::Image ImageType; typedef itk::PermuteAxesImageFilter PermuterType; diff --git a/Modules/Filtering/ImageGrid/test/itkPushPopTileImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkPushPopTileImageFilterTest.cxx index 775da954c5b..7a244a2af93 100644 --- a/Modules/Filtering/ImageGrid/test/itkPushPopTileImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkPushPopTileImageFilterTest.cxx @@ -23,7 +23,7 @@ int itkPushPopTileImageFilterTest(int argc, char *argv[] ) { - typedef itk::RGBPixel PixelType; + typedef itk::RGBPixel PixelType; enum { InputImageDimension = 2 }; enum { OutputImageDimension = 2 }; @@ -51,8 +51,8 @@ int itkPushPopTileImageFilterTest(int argc, char *argv[] ) TilerType::Pointer tiler4 = TilerType::New(); TilerType::Pointer tiler = TilerType::New(); - unsigned char yellow[3] = {255, 255, 127}; - itk::RGBPixel fillPixel = yellow; + uint8_t yellow[3] = {255, 255, 127}; + itk::RGBPixel fillPixel = yellow; tiler1->SetDefaultPixelValue(fillPixel); tiler1->SetLayout(layout); diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest2.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest2.cxx index 1e77b166463..2617aa80a76 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest2.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest2.cxx @@ -77,7 +77,7 @@ int itkResampleImageTest2(int argc, char * argv [] ) const unsigned int NDimensions = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image ImageType; typedef ImageType::IndexType ImageIndexType; typedef ImageType::Pointer ImagePointerType; diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest3.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest3.cxx index 0e11cd06968..eda7f2c9066 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest3.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest3.cxx @@ -42,7 +42,7 @@ int itkResampleImageTest3(int argc, char * argv [] ) const unsigned int NDimensions = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image ImageType; typedef ImageType::IndexType ImageIndexType; typedef ImageType::Pointer ImagePointerType; diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest5.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest5.cxx index 1641c60dd89..c376ba6050d 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest5.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest5.cxx @@ -29,8 +29,8 @@ int itkResampleImageTest5(int argc, char * argv [] ) // Resample an RGB image const unsigned int NDimensions = 2; - typedef unsigned char PixelType; - typedef itk::RGBPixel RGBPixelType; + typedef uint8_t PixelType; + typedef itk::RGBPixel RGBPixelType; typedef itk::Image ImageType; typedef ImageType::IndexType ImageIndexType; diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest6.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest6.cxx index 09c3e2485ea..5f36d5cdd38 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest6.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest6.cxx @@ -29,7 +29,7 @@ int itkResampleImageTest6(int argc, char * argv [] ) // Resample a Vector image const unsigned int NDimensions = 2; - typedef unsigned char ValueType; + typedef uint8_t ValueType; typedef itk::VectorImage ImageType; typedef ImageType::PixelType PixelType; diff --git a/Modules/Filtering/ImageGrid/test/itkShrinkImagePreserveObjectPhysicalLocations.cxx b/Modules/Filtering/ImageGrid/test/itkShrinkImagePreserveObjectPhysicalLocations.cxx index 735949b7a7f..9124d67c15a 100644 --- a/Modules/Filtering/ImageGrid/test/itkShrinkImagePreserveObjectPhysicalLocations.cxx +++ b/Modules/Filtering/ImageGrid/test/itkShrinkImagePreserveObjectPhysicalLocations.cxx @@ -34,9 +34,9 @@ #include "itkImageMomentsCalculator.h" #include "itkMultiResolutionPyramidImageFilter.h" -//typedef itk::Image TImageType; -typedef itk::Image WImageType; -//typedef itk::Image TImageType; +//typedef itk::Image TImageType; +typedef itk::Image WImageType; +//typedef itk::Image TImageType; typedef itk::Image TImageType; //typedef itk::Image TImageType; diff --git a/Modules/Filtering/ImageGrid/test/itkSliceBySliceImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkSliceBySliceImageFilterTest.cxx index 8bb48b6f17c..ad955af4951 100644 --- a/Modules/Filtering/ImageGrid/test/itkSliceBySliceImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkSliceBySliceImageFilterTest.cxx @@ -28,7 +28,7 @@ void sliceCallBack(itk::Object* object, const itk::EventObject &, void*) { // the same typedefs than in the main function - should be done in a nicer way const int Dimension = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > ImageType; typedef itk::SliceBySliceImageFilter< ImageType, ImageType > FilterType; @@ -58,7 +58,7 @@ int itkSliceBySliceImageFilterTest(int argc, char * argv[]) } const int Dimension = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Modules/Filtering/ImageGrid/test/itkTileImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkTileImageFilterTest.cxx index 3c0a456b972..e69739279c0 100644 --- a/Modules/Filtering/ImageGrid/test/itkTileImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkTileImageFilterTest.cxx @@ -23,7 +23,7 @@ int itkTileImageFilterTest(int argc, char *argv[] ) { - typedef itk::RGBPixel PixelType; + typedef itk::RGBPixel PixelType; enum { InputImageDimension = 2 }; enum { OutputImageDimension = 3 }; @@ -56,8 +56,8 @@ int itkTileImageFilterTest(int argc, char *argv[] ) tiler->SetInput(f++,reader->GetOutput()); } tiler->SetLayout(layout); - unsigned char yellow[3] = {255, 255, 127}; - itk::RGBPixel fillPixel = yellow; + uint8_t yellow[3] = {255, 255, 127}; + itk::RGBPixel fillPixel = yellow; tiler->SetDefaultPixelValue(fillPixel); tiler->Update(); tiler->GetOutput()->Print(std::cout); diff --git a/Modules/Filtering/ImageGrid/test/itkVectorResampleImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkVectorResampleImageFilterTest.cxx index 2877b465ed2..67158468b9d 100644 --- a/Modules/Filtering/ImageGrid/test/itkVectorResampleImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkVectorResampleImageFilterTest.cxx @@ -33,7 +33,7 @@ int itkVectorResampleImageFilterTest( int argc, char * argv[] ) } const unsigned int Dimension = 2; - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; typedef itk::RGBPixel< PixelComponentType > PixelType; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Modules/Filtering/ImageIntensity/test/itkAndImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkAndImageFilterTest.cxx index c76b6e8b4db..fa46a1dfde7 100644 --- a/Modules/Filtering/ImageIntensity/test/itkAndImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkAndImageFilterTest.cxx @@ -27,7 +27,7 @@ int itkAndImageFilterTest(int, char* [] ) const unsigned int myDimension = 3; // Declare the types of the images - typedef unsigned char myPixelType; + typedef uint8_t myPixelType; typedef itk::Image myImageType1; typedef itk::Image myImageType2; typedef itk::Image myImageType3; diff --git a/Modules/Filtering/ImageIntensity/test/itkConstrainedValueAdditionImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkConstrainedValueAdditionImageFilterTest.cxx index dcc36e2381f..957bf7b560d 100644 --- a/Modules/Filtering/ImageIntensity/test/itkConstrainedValueAdditionImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkConstrainedValueAdditionImageFilterTest.cxx @@ -29,7 +29,7 @@ int itkConstrainedValueAdditionImageFilterTest(int, char* [] ) // Declare the types of the images typedef itk::Image myImageType1; typedef itk::Image myImageType2; - typedef itk::Image myImageType3; + typedef itk::Image myImageType3; // Declare the type of the index to access images typedef itk::Index myIndexType; diff --git a/Modules/Filtering/ImageIntensity/test/itkInvertIntensityImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkInvertIntensityImageFilterTest.cxx index 2067dca68a4..8e2393a3c6d 100644 --- a/Modules/Filtering/ImageIntensity/test/itkInvertIntensityImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkInvertIntensityImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkInvertIntensityImageFilterTest(int argc, char * argv[]) const int dim = 2; - typedef unsigned char PType; + typedef uint8_t PType; typedef itk::Image< PType, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; diff --git a/Modules/Filtering/ImageIntensity/test/itkMaskImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkMaskImageFilterTest.cxx index 2d755c6c690..2f4b9d18a48 100644 --- a/Modules/Filtering/ImageIntensity/test/itkMaskImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkMaskImageFilterTest.cxx @@ -29,7 +29,7 @@ int itkMaskImageFilterTest(int, char* [] ) // Declare the types of the images typedef itk::Image myImageType1; - typedef itk::Image myImageType2; + typedef itk::Image myImageType2; typedef itk::Image myImageType3; // Declare the type of the index to access images diff --git a/Modules/Filtering/ImageIntensity/test/itkMaskNegatedImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkMaskNegatedImageFilterTest.cxx index 19dcee35024..ebed84775a1 100644 --- a/Modules/Filtering/ImageIntensity/test/itkMaskNegatedImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkMaskNegatedImageFilterTest.cxx @@ -28,7 +28,7 @@ int itkMaskNegatedImageFilterTest(int, char* [] ) // Declare the types of the images typedef itk::Image InputImageType; - typedef itk::Image MaskImageType; + typedef itk::Image MaskImageType; typedef itk::Image OutputImageType; // Declare the type of the index to access images diff --git a/Modules/Filtering/ImageIntensity/test/itkMatrixIndexSelectionImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkMatrixIndexSelectionImageFilterTest.cxx index 3b54451b183..23ade3ec99f 100644 --- a/Modules/Filtering/ImageIntensity/test/itkMatrixIndexSelectionImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkMatrixIndexSelectionImageFilterTest.cxx @@ -31,8 +31,8 @@ int itkMatrixIndexSelectionImageFilterTest(int argc, char* argv[] ) } const unsigned int Dimension = 2; - typedef itk::Matrix PixelType; - typedef unsigned char OutputPixelType; + typedef itk::Matrix PixelType; + typedef uint8_t OutputPixelType; typedef itk::Image ImageType; typedef itk::Image OutputImageType; diff --git a/Modules/Filtering/ImageIntensity/test/itkModulusImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkModulusImageFilterTest.cxx index eb7112edcd4..f19b44a0f5a 100644 --- a/Modules/Filtering/ImageIntensity/test/itkModulusImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkModulusImageFilterTest.cxx @@ -35,7 +35,7 @@ int itkModulusImageFilterTest(int argc, char * argv[]) const int dim = 2; - typedef unsigned char PType; + typedef uint8_t PType; typedef itk::Image< PType, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; diff --git a/Modules/Filtering/ImageIntensity/test/itkOrImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkOrImageFilterTest.cxx index 3c35a4cc550..6d74316b748 100644 --- a/Modules/Filtering/ImageIntensity/test/itkOrImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkOrImageFilterTest.cxx @@ -27,7 +27,7 @@ int itkOrImageFilterTest(int, char* [] ) const unsigned int myDimension = 3; // Declare the types of the images - typedef unsigned char myPixelType; + typedef uint8_t myPixelType; typedef itk::Image myImageType1; typedef itk::Image myImageType2; typedef itk::Image myImageType3; diff --git a/Modules/Filtering/ImageIntensity/test/itkPolylineMask2DImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkPolylineMask2DImageFilterTest.cxx index 418a759c127..365a6788054 100644 --- a/Modules/Filtering/ImageIntensity/test/itkPolylineMask2DImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkPolylineMask2DImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkPolylineMask2DImageFilterTest(int argc, char * argv [] ) // Declare the types of the images const unsigned int Dimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image InputImageType; typedef itk::Image OutputImageType; diff --git a/Modules/Filtering/ImageIntensity/test/itkPolylineMaskImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkPolylineMaskImageFilterTest.cxx index c92e09b6b76..4b4b4e539b1 100644 --- a/Modules/Filtering/ImageIntensity/test/itkPolylineMaskImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkPolylineMaskImageFilterTest.cxx @@ -41,8 +41,8 @@ int itkPolylineMaskImageFilterTest(int , char * [] ) // Declare the types of the images - typedef itk::Image inputImageType; - typedef itk::Image outputImageType; + typedef itk::Image inputImageType; + typedef itk::Image outputImageType; typedef itk::Vector inputVectorType; typedef itk::PolyLineParametricPath inputPolylineType; diff --git a/Modules/Filtering/ImageIntensity/test/itkPromoteDimensionImageTest.cxx b/Modules/Filtering/ImageIntensity/test/itkPromoteDimensionImageTest.cxx index 960b16d8725..01d9c2b572f 100644 --- a/Modules/Filtering/ImageIntensity/test/itkPromoteDimensionImageTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkPromoteDimensionImageTest.cxx @@ -33,7 +33,7 @@ int itkPromoteDimensionImageTest(int argc, char* argv[]) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef unsigned char CharPixelType; //IO + typedef uint8_t CharPixelType; //IO typedef double RealPixelType; //Operations const unsigned int InDimension = 2; diff --git a/Modules/Filtering/ImageIntensity/test/itkShiftScaleImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkShiftScaleImageFilterTest.cxx index 33be1ecfa68..c17b86f63a3 100644 --- a/Modules/Filtering/ImageIntensity/test/itkShiftScaleImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkShiftScaleImageFilterTest.cxx @@ -28,7 +28,7 @@ int itkShiftScaleImageFilterTest(int, char* [] ) std::cout << "itkShiftScaleImageFilterTest Start" << std::endl; typedef itk::Image TestInputImage; - typedef itk::Image TestOutputImage; + typedef itk::Image TestOutputImage; typedef itk::NumericTraits::RealType RealType; TestInputImage::Pointer inputImage = TestInputImage::New(); diff --git a/Modules/Filtering/ImageIntensity/test/itkVectorIndexSelectionCastImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkVectorIndexSelectionCastImageFilterTest.cxx index 15f263af4a5..649f6bba3f7 100644 --- a/Modules/Filtering/ImageIntensity/test/itkVectorIndexSelectionCastImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkVectorIndexSelectionCastImageFilterTest.cxx @@ -34,8 +34,8 @@ int itkVectorIndexSelectionCastImageFilterTest(int argc, char * argv [] ) return EXIT_FAILURE; } - typedef unsigned short InputPixelType; - typedef unsigned short OutputPixelType; + typedef uint16_t InputPixelType; + typedef uint16_t OutputPixelType; const unsigned int ImageDimension = 2; diff --git a/Modules/Filtering/ImageIntensity/test/itkXorImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkXorImageFilterTest.cxx index 6f63030727a..866b7c3edf5 100644 --- a/Modules/Filtering/ImageIntensity/test/itkXorImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkXorImageFilterTest.cxx @@ -27,7 +27,7 @@ int itkXorImageFilterTest(int, char* [] ) const unsigned int myDimension = 3; // Declare the types of the images - typedef unsigned char myPixelType; + typedef uint8_t myPixelType; typedef itk::Image myImageType1; typedef itk::Image myImageType2; typedef itk::Image myImageType3; diff --git a/Modules/Filtering/ImageLabel/test/itkBinaryContourImageFilterTest.cxx b/Modules/Filtering/ImageLabel/test/itkBinaryContourImageFilterTest.cxx index d897f0363ab..baa59192239 100644 --- a/Modules/Filtering/ImageLabel/test/itkBinaryContourImageFilterTest.cxx +++ b/Modules/Filtering/ImageLabel/test/itkBinaryContourImageFilterTest.cxx @@ -36,7 +36,7 @@ int itkBinaryContourImageFilterTest(int argc, char * argv[]) const unsigned int dim = 3; - typedef unsigned char PType; + typedef uint8_t PType; typedef itk::Image< PType, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; diff --git a/Modules/Filtering/ImageLabel/test/itkChangeLabelImageFilterTest.cxx b/Modules/Filtering/ImageLabel/test/itkChangeLabelImageFilterTest.cxx index be20b429913..e2f1f24cf4c 100644 --- a/Modules/Filtering/ImageLabel/test/itkChangeLabelImageFilterTest.cxx +++ b/Modules/Filtering/ImageLabel/test/itkChangeLabelImageFilterTest.cxx @@ -27,8 +27,8 @@ int itkChangeLabelImageFilterTest(int, char* [] ) const unsigned int ImageDimension = 3; // Declare the types of the images - typedef itk::Image InputImageType; - typedef itk::Image OutputImageType; + typedef itk::Image InputImageType; + typedef itk::Image OutputImageType; typedef InputImageType::PixelType InputPixelType; typedef OutputImageType::PixelType OutputPixelType; diff --git a/Modules/Filtering/ImageLabel/test/itkLabelContourImageFilterTest.cxx b/Modules/Filtering/ImageLabel/test/itkLabelContourImageFilterTest.cxx index 20429baa5af..aee39bdea15 100644 --- a/Modules/Filtering/ImageLabel/test/itkLabelContourImageFilterTest.cxx +++ b/Modules/Filtering/ImageLabel/test/itkLabelContourImageFilterTest.cxx @@ -36,7 +36,7 @@ int itkLabelContourImageFilterTest(int argc, char * argv[]) const int dim = 3; - typedef unsigned char PType; + typedef uint8_t PType; typedef itk::Image< PType, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; diff --git a/Modules/Filtering/ImageSources/test/itkGaussianImageSourceTest.cxx b/Modules/Filtering/ImageSources/test/itkGaussianImageSourceTest.cxx index 2ec6ef6fb1c..51d0cc611fd 100644 --- a/Modules/Filtering/ImageSources/test/itkGaussianImageSourceTest.cxx +++ b/Modules/Filtering/ImageSources/test/itkGaussianImageSourceTest.cxx @@ -24,7 +24,7 @@ int itkGaussianImageSourceTest(int, char* [] ) { // This can be changed! const unsigned int Dimension = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; // Image typedef typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Modules/Filtering/ImageStatistics/test/itkAccumulateImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkAccumulateImageFilterTest.cxx index 0dcb05bb35a..579d8700a23 100644 --- a/Modules/Filtering/ImageStatistics/test/itkAccumulateImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkAccumulateImageFilterTest.cxx @@ -29,7 +29,7 @@ int itkAccumulateImageFilterTest(int argc, char *argv[] ) typedef itk::Image InputImageType; typedef itk::Image OutputImageType; - typedef itk::Image WriteImageType; + typedef itk::Image WriteImageType; typedef itk::ImageSeriesReader< InputImageType > ReaderType ; typedef itk::AccumulateImageFilter AccumulaterType; typedef itk::ImageSeriesWriter WriterType; diff --git a/Modules/Filtering/ImageStatistics/test/itkAdaptiveHistogramEqualizationImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkAdaptiveHistogramEqualizationImageFilterTest.cxx index 0fec0f18d61..8e21f76bb07 100644 --- a/Modules/Filtering/ImageStatistics/test/itkAdaptiveHistogramEqualizationImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkAdaptiveHistogramEqualizationImageFilterTest.cxx @@ -63,7 +63,7 @@ int itkAdaptiveHistogramEqualizationImageFilterTest( int argc, char * argv[] ) // execution of both filters. // - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; diff --git a/Modules/Filtering/ImageStatistics/test/itkBinaryProjectionImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkBinaryProjectionImageFilterTest.cxx index ed1a8d42f8d..0ce3a734440 100644 --- a/Modules/Filtering/ImageStatistics/test/itkBinaryProjectionImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkBinaryProjectionImageFilterTest.cxx @@ -35,7 +35,7 @@ int itkBinaryProjectionImageFilterTest(int argc, char * argv[]) const int dim = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/ImageStatistics/test/itkGetAverageSliceImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkGetAverageSliceImageFilterTest.cxx index 37c9186e86f..b9699c1b9ed 100644 --- a/Modules/Filtering/ImageStatistics/test/itkGetAverageSliceImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkGetAverageSliceImageFilterTest.cxx @@ -29,7 +29,7 @@ int itkGetAverageSliceImageFilterTest(int argc, char *argv[] ) typedef itk::Image InputImageType; typedef itk::Image OutputImageType; - typedef itk::Image WriteImageType; + typedef itk::Image WriteImageType; typedef itk::ImageSeriesReader< InputImageType > ReaderType ; typedef itk::GetAverageSliceImageFilter GetAveragerType; typedef itk::ImageSeriesWriter WriterType; diff --git a/Modules/Filtering/ImageStatistics/test/itkHistogramToEntropyImageFilterTest1.cxx b/Modules/Filtering/ImageStatistics/test/itkHistogramToEntropyImageFilterTest1.cxx index 78024fd86b6..d5b8bc85255 100644 --- a/Modules/Filtering/ImageStatistics/test/itkHistogramToEntropyImageFilterTest1.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkHistogramToEntropyImageFilterTest1.cxx @@ -33,7 +33,7 @@ int itkHistogramToEntropyImageFilterTest1( int argc, char * argv [] ) const unsigned int Dimension = 2; - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; typedef itk::Image< PixelComponentType, Dimension > ScalarImageType; typedef itk::ImageFileReader< ScalarImageType > ReaderType; diff --git a/Modules/Filtering/ImageStatistics/test/itkHistogramToEntropyImageFilterTest2.cxx b/Modules/Filtering/ImageStatistics/test/itkHistogramToEntropyImageFilterTest2.cxx index 921ee662711..079015faa06 100644 --- a/Modules/Filtering/ImageStatistics/test/itkHistogramToEntropyImageFilterTest2.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkHistogramToEntropyImageFilterTest2.cxx @@ -35,7 +35,7 @@ int itkHistogramToEntropyImageFilterTest2( int argc, char * argv [] ) const unsigned int Dimension = 2; - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; typedef itk::Image< PixelComponentType, Dimension > ScalarImageType; typedef itk::ImageFileReader< ScalarImageType > ReaderType; diff --git a/Modules/Filtering/ImageStatistics/test/itkHistogramToIntensityImageFilterTest1.cxx b/Modules/Filtering/ImageStatistics/test/itkHistogramToIntensityImageFilterTest1.cxx index 89021b08ce5..9d84947cbff 100644 --- a/Modules/Filtering/ImageStatistics/test/itkHistogramToIntensityImageFilterTest1.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkHistogramToIntensityImageFilterTest1.cxx @@ -33,7 +33,7 @@ int itkHistogramToIntensityImageFilterTest1( int argc, char * argv [] ) const unsigned int Dimension = 2; - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; typedef itk::Image< PixelComponentType, Dimension > ScalarImageType; typedef itk::ImageFileReader< ScalarImageType > ReaderType; diff --git a/Modules/Filtering/ImageStatistics/test/itkHistogramToIntensityImageFilterTest2.cxx b/Modules/Filtering/ImageStatistics/test/itkHistogramToIntensityImageFilterTest2.cxx index 51d334f7431..562c39fb639 100644 --- a/Modules/Filtering/ImageStatistics/test/itkHistogramToIntensityImageFilterTest2.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkHistogramToIntensityImageFilterTest2.cxx @@ -35,7 +35,7 @@ int itkHistogramToIntensityImageFilterTest2( int argc, char * argv [] ) const unsigned int Dimension = 2; - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; typedef itk::Image< PixelComponentType, Dimension > ScalarImageType; typedef itk::ImageFileReader< ScalarImageType > ReaderType; diff --git a/Modules/Filtering/ImageStatistics/test/itkHistogramToLogProbabilityImageFilterTest1.cxx b/Modules/Filtering/ImageStatistics/test/itkHistogramToLogProbabilityImageFilterTest1.cxx index fe3e4962abb..eaa27773ce2 100644 --- a/Modules/Filtering/ImageStatistics/test/itkHistogramToLogProbabilityImageFilterTest1.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkHistogramToLogProbabilityImageFilterTest1.cxx @@ -33,7 +33,7 @@ int itkHistogramToLogProbabilityImageFilterTest1( int argc, char * argv [] ) const unsigned int Dimension = 2; - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; typedef itk::Image< PixelComponentType, Dimension > ScalarImageType; typedef itk::ImageFileReader< ScalarImageType > ReaderType; diff --git a/Modules/Filtering/ImageStatistics/test/itkHistogramToLogProbabilityImageFilterTest2.cxx b/Modules/Filtering/ImageStatistics/test/itkHistogramToLogProbabilityImageFilterTest2.cxx index 776b28c3d87..f4b7362e3e0 100644 --- a/Modules/Filtering/ImageStatistics/test/itkHistogramToLogProbabilityImageFilterTest2.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkHistogramToLogProbabilityImageFilterTest2.cxx @@ -35,7 +35,7 @@ int itkHistogramToLogProbabilityImageFilterTest2( int argc, char * argv [] ) const unsigned int Dimension = 2; - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; typedef itk::Image< PixelComponentType, Dimension > ScalarImageType; typedef itk::ImageFileReader< ScalarImageType > ReaderType; diff --git a/Modules/Filtering/ImageStatistics/test/itkHistogramToProbabilityImageFilterTest1.cxx b/Modules/Filtering/ImageStatistics/test/itkHistogramToProbabilityImageFilterTest1.cxx index 67ff6788a35..56f3f052136 100644 --- a/Modules/Filtering/ImageStatistics/test/itkHistogramToProbabilityImageFilterTest1.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkHistogramToProbabilityImageFilterTest1.cxx @@ -33,7 +33,7 @@ int itkHistogramToProbabilityImageFilterTest1( int argc, char * argv [] ) const unsigned int Dimension = 2; - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; typedef itk::Image< PixelComponentType, Dimension > ScalarImageType; typedef itk::ImageFileReader< ScalarImageType > ReaderType; diff --git a/Modules/Filtering/ImageStatistics/test/itkHistogramToProbabilityImageFilterTest2.cxx b/Modules/Filtering/ImageStatistics/test/itkHistogramToProbabilityImageFilterTest2.cxx index 36a79cf7391..859c71e3be4 100644 --- a/Modules/Filtering/ImageStatistics/test/itkHistogramToProbabilityImageFilterTest2.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkHistogramToProbabilityImageFilterTest2.cxx @@ -35,7 +35,7 @@ int itkHistogramToProbabilityImageFilterTest2( int argc, char * argv [] ) const unsigned int Dimension = 2; - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; typedef itk::Image< PixelComponentType, Dimension > ScalarImageType; typedef itk::ImageFileReader< ScalarImageType > ReaderType; diff --git a/Modules/Filtering/ImageStatistics/test/itkImageMomentsTest.cxx b/Modules/Filtering/ImageStatistics/test/itkImageMomentsTest.cxx index 90c87df6c1d..8b79b56ef6c 100644 --- a/Modules/Filtering/ImageStatistics/test/itkImageMomentsTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkImageMomentsTest.cxx @@ -19,7 +19,7 @@ #include "itkImageMomentsCalculator.h" -typedef unsigned short PixelType; +typedef uint16_t PixelType; typedef itk::Vector VectorType; typedef itk::Matrix MatrixType; typedef itk::Image ImageType; @@ -47,7 +47,7 @@ itkImageMomentsTest( int itkNotUsed(argc), char * itkNotUsed(argv) [] ) double spacing[3] = { 0.1, 0.05 , 0.025}; /* Define positions of the test masses in index coordinates */ - unsigned short mass = 1; // Test mass + uint16_t mass = 1; // Test mass itk::Index<3>::IndexValueType point[8][3] = { { 10+8, 20+12, 40+0}, { 10-8, 20-12, 40-0}, diff --git a/Modules/Filtering/ImageStatistics/test/itkImageToHistogramFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkImageToHistogramFilterTest.cxx index d4b68e6237a..6f8a2e86add 100644 --- a/Modules/Filtering/ImageStatistics/test/itkImageToHistogramFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkImageToHistogramFilterTest.cxx @@ -25,7 +25,7 @@ int itkImageToHistogramFilterTest( int , char * [] ) { - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; typedef itk::RGBPixel< PixelComponentType > RGBPixelType; diff --git a/Modules/Filtering/ImageStatistics/test/itkImageToHistogramFilterTest2.cxx b/Modules/Filtering/ImageStatistics/test/itkImageToHistogramFilterTest2.cxx index a4059e0196d..edd358f6c26 100644 --- a/Modules/Filtering/ImageStatistics/test/itkImageToHistogramFilterTest2.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkImageToHistogramFilterTest2.cxx @@ -31,7 +31,7 @@ int itkImageToHistogramFilterTest2( int argc, char * argv [] ) } - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; typedef itk::RGBPixel< PixelComponentType > RGBPixelType; diff --git a/Modules/Filtering/ImageStatistics/test/itkImageToHistogramFilterTest3.cxx b/Modules/Filtering/ImageStatistics/test/itkImageToHistogramFilterTest3.cxx index 6fc2d14c984..fbae8681d3b 100644 --- a/Modules/Filtering/ImageStatistics/test/itkImageToHistogramFilterTest3.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkImageToHistogramFilterTest3.cxx @@ -32,7 +32,7 @@ int itkImageToHistogramFilterTest3( int argc, char * argv [] ) const unsigned int Dimension = 2; - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; typedef itk::Image< PixelComponentType, Dimension > ScalarImageType; typedef itk::ImageFileReader< ScalarImageType > ReaderType; diff --git a/Modules/Filtering/ImageStatistics/test/itkLabelStatisticsImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkLabelStatisticsImageFilterTest.cxx index f4481788eb9..4b1d610470f 100644 --- a/Modules/Filtering/ImageStatistics/test/itkLabelStatisticsImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkLabelStatisticsImageFilterTest.cxx @@ -35,7 +35,7 @@ int itkLabelStatisticsImageFilterTest(int argc, char* argv [] ) std::cerr << argv[0] << " inputImage labeledImage " << std::endl; return EXIT_FAILURE; } - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/ImageStatistics/test/itkMaximumProjectionImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkMaximumProjectionImageFilterTest.cxx index b794795a9ea..00198b44290 100644 --- a/Modules/Filtering/ImageStatistics/test/itkMaximumProjectionImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkMaximumProjectionImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkMaximumProjectionImageFilterTest(int argc, char * argv[]) const int dim = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/ImageStatistics/test/itkMaximumProjectionImageFilterTest2.cxx b/Modules/Filtering/ImageStatistics/test/itkMaximumProjectionImageFilterTest2.cxx index ceb60a24d20..ceb989d7e01 100644 --- a/Modules/Filtering/ImageStatistics/test/itkMaximumProjectionImageFilterTest2.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkMaximumProjectionImageFilterTest2.cxx @@ -34,7 +34,7 @@ int itkMaximumProjectionImageFilterTest2(int argc, char * argv[]) int dim = atoi(argv[1]); - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, 3 > ImageType; diff --git a/Modules/Filtering/ImageStatistics/test/itkMaximumProjectionImageFilterTest3.cxx b/Modules/Filtering/ImageStatistics/test/itkMaximumProjectionImageFilterTest3.cxx index c47b79d5713..6e72f0cb564 100644 --- a/Modules/Filtering/ImageStatistics/test/itkMaximumProjectionImageFilterTest3.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkMaximumProjectionImageFilterTest3.cxx @@ -34,7 +34,7 @@ int itkMaximumProjectionImageFilterTest3(int argc, char * argv[]) int dim = atoi(argv[1]); - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, 3 > ImageType; typedef itk::Image< PixelType, 2 > Image2DType; diff --git a/Modules/Filtering/ImageStatistics/test/itkMeanProjectionImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkMeanProjectionImageFilterTest.cxx index b986d3cef03..e20dde06b03 100644 --- a/Modules/Filtering/ImageStatistics/test/itkMeanProjectionImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkMeanProjectionImageFilterTest.cxx @@ -33,7 +33,7 @@ int itkMeanProjectionImageFilterTest(int argc, char * argv[]) const int dim = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/ImageStatistics/test/itkMedianProjectionImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkMedianProjectionImageFilterTest.cxx index 2c3ba9eac35..f67e040d41c 100644 --- a/Modules/Filtering/ImageStatistics/test/itkMedianProjectionImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkMedianProjectionImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkMedianProjectionImageFilterTest(int argc, char * argv[]) const int dim = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/ImageStatistics/test/itkMinimumProjectionImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkMinimumProjectionImageFilterTest.cxx index afbbdc75b31..39cc89be938 100644 --- a/Modules/Filtering/ImageStatistics/test/itkMinimumProjectionImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkMinimumProjectionImageFilterTest.cxx @@ -33,7 +33,7 @@ int itkMinimumProjectionImageFilterTest(int argc, char * argv[]) const int dim = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/ImageStatistics/test/itkProjectionImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkProjectionImageFilterTest.cxx index 5b74fac748b..4d0da525b54 100644 --- a/Modules/Filtering/ImageStatistics/test/itkProjectionImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkProjectionImageFilterTest.cxx @@ -81,7 +81,7 @@ int itkProjectionImageFilterTest(int argc, char * argv[]) const int dim = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/ImageStatistics/test/itkStandardDeviationProjectionImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkStandardDeviationProjectionImageFilterTest.cxx index 04d855808cd..11bfc90dae2 100644 --- a/Modules/Filtering/ImageStatistics/test/itkStandardDeviationProjectionImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkStandardDeviationProjectionImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkStandardDeviationProjectionImageFilterTest(int argc, char * argv[]) const int dim = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/ImageStatistics/test/itkSumProjectionImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkSumProjectionImageFilterTest.cxx index 9cc9078fd64..598c1115cac 100644 --- a/Modules/Filtering/ImageStatistics/test/itkSumProjectionImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkSumProjectionImageFilterTest.cxx @@ -33,10 +33,10 @@ int itkSumProjectionImageFilterTest(int argc, char * argv[]) const int dim = 3; - typedef unsigned char InputPixelType; + typedef uint8_t InputPixelType; typedef itk::Image< InputPixelType, dim > InputImageType; - typedef unsigned short OutpuPixelType; + typedef uint16_t OutpuPixelType; typedef itk::Image< OutpuPixelType, dim > OutputImageType; typedef itk::ImageFileReader< InputImageType > ReaderType; diff --git a/Modules/Filtering/LabelMap/include/itkObjectByObjectLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkObjectByObjectLabelMapFilter.h index 194943a8900..f4a802f3782 100644 --- a/Modules/Filtering/LabelMap/include/itkObjectByObjectLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkObjectByObjectLabelMapFilter.h @@ -71,8 +71,8 @@ namespace itk { */ template, - Image< unsigned char, TOutputImage::ImageDimension > >, + Image< uint8_t, TInputImage::ImageDimension >, + Image< uint8_t, TOutputImage::ImageDimension > >, class TOutputFilter=typename TInputFilter::Superclass, class TInternalInputImage=typename TInputFilter::InputImageType, class TInternalOutputImage=typename TOutputFilter::OutputImageType > diff --git a/Modules/Filtering/LabelMap/test/itkAggregateLabelMapFilterTest.cxx b/Modules/Filtering/LabelMap/test/itkAggregateLabelMapFilterTest.cxx index 9db888c196c..ddde0ae3aa3 100644 --- a/Modules/Filtering/LabelMap/test/itkAggregateLabelMapFilterTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkAggregateLabelMapFilterTest.cxx @@ -37,9 +37,9 @@ int itkAggregateLabelMapFilterTest(int argc, char * argv[]) const int dim = 2; - typedef itk::Image< unsigned char, dim > ImageType; + typedef itk::Image< uint8_t, dim > ImageType; - typedef itk::LabelObject< unsigned char, dim > LabelObjectType; + typedef itk::LabelObject< uint8_t, dim > LabelObjectType; typedef itk::LabelMap< LabelObjectType > LabelMapType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/LabelMap/test/itkAttributeKeepNObjectsLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkAttributeKeepNObjectsLabelMapFilterTest1.cxx index eeaf22a25fa..83b9fa7aa6c 100644 --- a/Modules/Filtering/LabelMap/test/itkAttributeKeepNObjectsLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkAttributeKeepNObjectsLabelMapFilterTest1.cxx @@ -39,7 +39,7 @@ int itkAttributeKeepNObjectsLabelMapFilterTest1(int argc, char * argv[]) const unsigned int dim = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; diff --git a/Modules/Filtering/LabelMap/test/itkAttributeLabelObjectAccessorsTest1.cxx b/Modules/Filtering/LabelMap/test/itkAttributeLabelObjectAccessorsTest1.cxx index e2ced14f0ed..5eb07e248c9 100644 --- a/Modules/Filtering/LabelMap/test/itkAttributeLabelObjectAccessorsTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkAttributeLabelObjectAccessorsTest1.cxx @@ -34,7 +34,7 @@ int itkAttributeLabelObjectAccessorsTest1(int argc, char * argv[]) // declare the dimension used, and the type of the input image const int dim = 2; - typedef unsigned char PType; + typedef uint8_t PType; typedef itk::Image< PType, dim > IType; // The AttributeLabelObject class take 3 template parameters: the 2 ones diff --git a/Modules/Filtering/LabelMap/test/itkAttributeOpeningLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkAttributeOpeningLabelMapFilterTest1.cxx index 2c018363fb4..b70f9f57846 100644 --- a/Modules/Filtering/LabelMap/test/itkAttributeOpeningLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkAttributeOpeningLabelMapFilterTest1.cxx @@ -39,7 +39,7 @@ int itkAttributeOpeningLabelMapFilterTest1(int argc, char * argv[]) const unsigned int dim = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; diff --git a/Modules/Filtering/LabelMap/test/itkAttributePositionLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkAttributePositionLabelMapFilterTest1.cxx index 532cdd96476..a3e3f2b7e14 100644 --- a/Modules/Filtering/LabelMap/test/itkAttributePositionLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkAttributePositionLabelMapFilterTest1.cxx @@ -51,7 +51,7 @@ int itkAttributePositionLabelMapFilterTest1(int argc, char * argv[]) // declare the dimension used, and the type of the input image const int dim = 3; - typedef unsigned char PType; + typedef uint8_t PType; typedef itk::Image< PType, dim > IType; // We read the input image. diff --git a/Modules/Filtering/LabelMap/test/itkAttributeRelabelLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkAttributeRelabelLabelMapFilterTest1.cxx index 8cc209cb238..1af77a9adc9 100644 --- a/Modules/Filtering/LabelMap/test/itkAttributeRelabelLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkAttributeRelabelLabelMapFilterTest1.cxx @@ -39,7 +39,7 @@ int itkAttributeRelabelLabelMapFilterTest1(int argc, char * argv[]) const unsigned int dim = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; diff --git a/Modules/Filtering/LabelMap/test/itkAttributeUniqueLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkAttributeUniqueLabelMapFilterTest1.cxx index 4873481966a..ed8e14bb92b 100644 --- a/Modules/Filtering/LabelMap/test/itkAttributeUniqueLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkAttributeUniqueLabelMapFilterTest1.cxx @@ -39,9 +39,9 @@ int itkAttributeUniqueLabelMapFilterTest1(int argc, char * argv[]) const int dim = 2; - typedef itk::Image< unsigned char, dim > ImageType; + typedef itk::Image< uint8_t, dim > ImageType; - typedef itk::ShapeLabelObject< unsigned char, dim > LabelObjectType; + typedef itk::ShapeLabelObject< uint8_t, dim > LabelObjectType; typedef itk::LabelMap< LabelObjectType > LabelMapType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/LabelMap/test/itkAutoCropLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkAutoCropLabelMapFilterTest1.cxx index 91393de7ef8..574ce6071b4 100644 --- a/Modules/Filtering/LabelMap/test/itkAutoCropLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkAutoCropLabelMapFilterTest1.cxx @@ -46,7 +46,7 @@ int itkAutoCropLabelMapFilterTest1( int argc, char * argv [] ) } const unsigned int dim = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; diff --git a/Modules/Filtering/LabelMap/test/itkAutoCropLabelMapFilterTest2.cxx b/Modules/Filtering/LabelMap/test/itkAutoCropLabelMapFilterTest2.cxx index a0cd2267c84..6f5321c9be7 100644 --- a/Modules/Filtering/LabelMap/test/itkAutoCropLabelMapFilterTest2.cxx +++ b/Modules/Filtering/LabelMap/test/itkAutoCropLabelMapFilterTest2.cxx @@ -47,7 +47,7 @@ int itkAutoCropLabelMapFilterTest2( int argc, char * argv [] ) } const unsigned int dim = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; diff --git a/Modules/Filtering/LabelMap/test/itkBinaryFillholeImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkBinaryFillholeImageFilterTest1.cxx index de9f01ba171..f4b0cbd38db 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryFillholeImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryFillholeImageFilterTest1.cxx @@ -34,7 +34,7 @@ int itkBinaryFillholeImageFilterTest1(int argc, char * argv[]) const int dim = 2; - typedef itk::Image< unsigned char, dim > IType; + typedef itk::Image< uint8_t, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Filtering/LabelMap/test/itkBinaryGrindPeakImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkBinaryGrindPeakImageFilterTest1.cxx index 6855fa2196e..739cb52db96 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryGrindPeakImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryGrindPeakImageFilterTest1.cxx @@ -34,7 +34,7 @@ int itkBinaryGrindPeakImageFilterTest1(int argc, char * argv[]) const int dim = 2; - typedef itk::Image< unsigned char, dim > IType; + typedef itk::Image< uint8_t, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Filtering/LabelMap/test/itkBinaryImageToLabelMapFilterTest.cxx b/Modules/Filtering/LabelMap/test/itkBinaryImageToLabelMapFilterTest.cxx index 5d267749120..f75edf7cf13 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryImageToLabelMapFilterTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryImageToLabelMapFilterTest.cxx @@ -39,8 +39,8 @@ int itkBinaryImageToLabelMapFilterTest( int argc, char * argv [] ) const unsigned int Dimension = 3; - typedef unsigned char BinaryPixelType; - typedef unsigned char LabelPixelType; + typedef uint8_t BinaryPixelType; + typedef uint8_t LabelPixelType; typedef itk::Image< BinaryPixelType, Dimension > ImageType; diff --git a/Modules/Filtering/LabelMap/test/itkBinaryImageToShapeLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkBinaryImageToShapeLabelMapFilterTest1.cxx index 7e311a25a79..d8899e9b852 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryImageToShapeLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryImageToShapeLabelMapFilterTest1.cxx @@ -38,9 +38,9 @@ int itkBinaryImageToShapeLabelMapFilterTest1(int argc, char * argv[]) const unsigned int dim = 2; - typedef itk::Image< unsigned char, dim > ImageType; + typedef itk::Image< uint8_t, dim > ImageType; - typedef itk::ShapeLabelObject< unsigned char, dim > LabelObjectType; + typedef itk::ShapeLabelObject< uint8_t, dim > LabelObjectType; typedef itk::LabelMap< LabelObjectType > LabelMapType; //reading image to file diff --git a/Modules/Filtering/LabelMap/test/itkBinaryImageToStatisticsLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkBinaryImageToStatisticsLabelMapFilterTest1.cxx index 1745379990c..072bd3b7528 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryImageToStatisticsLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryImageToStatisticsLabelMapFilterTest1.cxx @@ -38,7 +38,7 @@ int itkBinaryImageToStatisticsLabelMapFilterTest1(int argc, char * argv[]) const unsigned int dim = 2; - typedef itk::Image< unsigned char, dim > ImageType; + typedef itk::Image< uint8_t, dim > ImageType; //reading image to file typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/LabelMap/test/itkBinaryReconstructionByDilationImageFilterTest.cxx b/Modules/Filtering/LabelMap/test/itkBinaryReconstructionByDilationImageFilterTest.cxx index dbe9eb4b429..33ab0d88ea2 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryReconstructionByDilationImageFilterTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryReconstructionByDilationImageFilterTest.cxx @@ -35,7 +35,7 @@ int itkBinaryReconstructionByDilationImageFilterTest(int argc, char * argv[]) const unsigned int dim = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; diff --git a/Modules/Filtering/LabelMap/test/itkBinaryReconstructionByErosionImageFilterTest.cxx b/Modules/Filtering/LabelMap/test/itkBinaryReconstructionByErosionImageFilterTest.cxx index df11a21f364..ff82f57e074 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryReconstructionByErosionImageFilterTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryReconstructionByErosionImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkBinaryReconstructionByErosionImageFilterTest(int argc, char * argv[]) const unsigned int dim = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; diff --git a/Modules/Filtering/LabelMap/test/itkBinaryReconstructionLabelMapFilterTest.cxx b/Modules/Filtering/LabelMap/test/itkBinaryReconstructionLabelMapFilterTest.cxx index 9b58074961e..2ecf49979a5 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryReconstructionLabelMapFilterTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryReconstructionLabelMapFilterTest.cxx @@ -40,7 +40,7 @@ int itkBinaryReconstructionLabelMapFilterTest(int argc, char * argv[]) const unsigned int dim = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; diff --git a/Modules/Filtering/LabelMap/test/itkBinaryShapeKeepNObjectsImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkBinaryShapeKeepNObjectsImageFilterTest1.cxx index 199505a91c1..9b9c0ac1e81 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryShapeKeepNObjectsImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryShapeKeepNObjectsImageFilterTest1.cxx @@ -36,7 +36,7 @@ int itkBinaryShapeKeepNObjectsImageFilterTest1(int argc, char * argv[]) const unsigned int dim = 2; - typedef itk::Image< unsigned char, dim > IType; + typedef itk::Image< uint8_t, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Filtering/LabelMap/test/itkBinaryShapeOpeningImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkBinaryShapeOpeningImageFilterTest1.cxx index 68585420746..669f6e300c2 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryShapeOpeningImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryShapeOpeningImageFilterTest1.cxx @@ -36,7 +36,7 @@ int itkBinaryShapeOpeningImageFilterTest1(int argc, char * argv[]) const unsigned int dim = 2; - typedef itk::Image< unsigned char, dim > IType; + typedef itk::Image< uint8_t, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Filtering/LabelMap/test/itkBinaryStatisticsKeepNObjectsImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkBinaryStatisticsKeepNObjectsImageFilterTest1.cxx index 12d83b47d22..fcab9654a22 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryStatisticsKeepNObjectsImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryStatisticsKeepNObjectsImageFilterTest1.cxx @@ -36,7 +36,7 @@ int itkBinaryStatisticsKeepNObjectsImageFilterTest1(int argc, char * argv[]) const unsigned int dim = 2; - typedef itk::Image< unsigned char, dim > IType; + typedef itk::Image< uint8_t, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Filtering/LabelMap/test/itkBinaryStatisticsOpeningImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkBinaryStatisticsOpeningImageFilterTest1.cxx index cfdaa126d95..137f66b9382 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryStatisticsOpeningImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryStatisticsOpeningImageFilterTest1.cxx @@ -36,7 +36,7 @@ int itkBinaryStatisticsOpeningImageFilterTest1(int argc, char * argv[]) const unsigned int dim = 2; - typedef itk::Image< unsigned char, dim > IType; + typedef itk::Image< uint8_t, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Filtering/LabelMap/test/itkChangeLabelLabelMapFilterTest.cxx b/Modules/Filtering/LabelMap/test/itkChangeLabelLabelMapFilterTest.cxx index e250807f977..0bdf172de15 100644 --- a/Modules/Filtering/LabelMap/test/itkChangeLabelLabelMapFilterTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkChangeLabelLabelMapFilterTest.cxx @@ -40,8 +40,8 @@ int itkChangeLabelLabelMapFilterTest( int argc, char * argv [] ) const unsigned int Dimension = 2; - typedef unsigned char ImagePixelType; - typedef unsigned char LabelPixelType; + typedef uint8_t ImagePixelType; + typedef uint8_t LabelPixelType; typedef itk::Image< ImagePixelType, Dimension > ImageType; diff --git a/Modules/Filtering/LabelMap/test/itkChangeRegionLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkChangeRegionLabelMapFilterTest1.cxx index 592e88ec8cd..7c14753d057 100644 --- a/Modules/Filtering/LabelMap/test/itkChangeRegionLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkChangeRegionLabelMapFilterTest1.cxx @@ -36,9 +36,9 @@ int itkChangeRegionLabelMapFilterTest1(int argc, char * argv[]) const unsigned int dim = 2; - typedef itk::Image< unsigned char, dim > ImageType; + typedef itk::Image< uint8_t, dim > ImageType; - typedef itk::LabelObject< unsigned char, dim > LabelObjectType; + typedef itk::LabelObject< uint8_t, dim > LabelObjectType; typedef itk::LabelMap< LabelObjectType > LabelMapType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/LabelMap/test/itkConvertLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkConvertLabelMapFilterTest1.cxx index e081df0a146..3fe9dfb3529 100644 --- a/Modules/Filtering/LabelMap/test/itkConvertLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkConvertLabelMapFilterTest1.cxx @@ -35,7 +35,7 @@ int itkConvertLabelMapFilterTest1(int argc, char * argv[]) const unsigned int dim = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; diff --git a/Modules/Filtering/LabelMap/test/itkCropLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkCropLabelMapFilterTest1.cxx index 01a5afc0da0..ebc926a65fc 100644 --- a/Modules/Filtering/LabelMap/test/itkCropLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkCropLabelMapFilterTest1.cxx @@ -46,9 +46,9 @@ int itkCropLabelMapFilterTest1(int argc, char * argv[]) const unsigned int dim = 2; - typedef itk::Image< unsigned char, dim > ImageType; + typedef itk::Image< uint8_t, dim > ImageType; - typedef itk::LabelObject< unsigned char, dim > LabelObjectType; + typedef itk::LabelObject< uint8_t, dim > LabelObjectType; typedef itk::LabelMap< LabelObjectType > LabelMapType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/LabelMap/test/itkLabelImageToLabelMapFilterTest.cxx b/Modules/Filtering/LabelMap/test/itkLabelImageToLabelMapFilterTest.cxx index 63a7bffefc4..1f51a225791 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelImageToLabelMapFilterTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelImageToLabelMapFilterTest.cxx @@ -37,7 +37,7 @@ int itkLabelImageToLabelMapFilterTest(int argc, char * argv[]) typedef LabelMapType::SizeType SizeType; typedef LabelMapType::LabelObjectVectorType LabelObjectVectorType; typedef LabelMapType::LabelVectorType LabelVectorType; - typedef itk::Image< unsigned char, dim > ImageType; + typedef itk::Image< uint8_t, dim > ImageType; typedef itk::LabelImageToLabelMapFilter LabelImageToLabelMapFilterType; diff --git a/Modules/Filtering/LabelMap/test/itkLabelImageToShapeLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkLabelImageToShapeLabelMapFilterTest1.cxx index 460836ddd66..bc3f48f0f98 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelImageToShapeLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelImageToShapeLabelMapFilterTest1.cxx @@ -34,7 +34,7 @@ int itkLabelImageToShapeLabelMapFilterTest1(int argc, char * argv[]) const unsigned int dim = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; diff --git a/Modules/Filtering/LabelMap/test/itkLabelImageToStatisticsLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkLabelImageToStatisticsLabelMapFilterTest1.cxx index 09a7a424a09..1fb36b8c687 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelImageToStatisticsLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelImageToStatisticsLabelMapFilterTest1.cxx @@ -38,7 +38,7 @@ int itkLabelImageToStatisticsLabelMapFilterTest1(int argc, char * argv[]) const unsigned int dim = 2; - typedef itk::Image< unsigned char, dim > ImageType; + typedef itk::Image< uint8_t, dim > ImageType; //reading image to file typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/LabelMap/test/itkLabelMapFilterTest.cxx b/Modules/Filtering/LabelMap/test/itkLabelMapFilterTest.cxx index c2fa68ef767..5d6ed4550a6 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelMapFilterTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelMapFilterTest.cxx @@ -39,7 +39,7 @@ int itkLabelMapFilterTest(int argc, char * argv[]) typedef LabelMapType::SizeType SizeType; typedef LabelMapType::LabelObjectVectorType LabelObjectVectorType; typedef LabelMapType::LabelVectorType LabelVectorType; - typedef itk::Image< unsigned char, dim > ImageType; + typedef itk::Image< uint8_t, dim > ImageType; typedef itk::LabelMapFilter LabelMapFilterType; diff --git a/Modules/Filtering/LabelMap/test/itkLabelMapMaskImageFilterTest.cxx b/Modules/Filtering/LabelMap/test/itkLabelMapMaskImageFilterTest.cxx index ba644050c93..ae66adf6ec5 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelMapMaskImageFilterTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelMapMaskImageFilterTest.cxx @@ -38,13 +38,13 @@ int itkLabelMapMaskImageFilterTest(int argc, char * argv[]) const int dim = 3; // declare the input image type - typedef itk::Image< unsigned char, dim > ImageType; + typedef itk::Image< uint8_t, dim > ImageType; // and the label object type to use. The input image is a label image, so the // type of the label can be the same type than the pixel type. itk::LabelObject is // chosen, because only the mask feature is tested here, so we don't need any // attribute. - typedef itk::LabelObject< unsigned char, dim > LabelObjectType; + typedef itk::LabelObject< uint8_t, dim > LabelObjectType; typedef itk::LabelMap< LabelObjectType > LabelMapType; // read the label image and the input image to be masked. diff --git a/Modules/Filtering/LabelMap/test/itkLabelMapToAttributeImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkLabelMapToAttributeImageFilterTest1.cxx index 09fb0614767..24f00a93ba9 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelMapToAttributeImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelMapToAttributeImageFilterTest1.cxx @@ -37,7 +37,7 @@ int itkLabelMapToAttributeImageFilterTest1(int argc, char * argv[]) const unsigned int dim = 2; - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image< PixelType, dim > ImageType; diff --git a/Modules/Filtering/LabelMap/test/itkLabelMapToBinaryImageFilterTest.cxx b/Modules/Filtering/LabelMap/test/itkLabelMapToBinaryImageFilterTest.cxx index 220e2d1aa45..d571e90cdc5 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelMapToBinaryImageFilterTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelMapToBinaryImageFilterTest.cxx @@ -39,8 +39,8 @@ int itkLabelMapToBinaryImageFilterTest( int argc, char * argv [] ) const unsigned int Dimension = 2; - typedef unsigned char BinaryPixelType; - typedef unsigned char LabelPixelType; + typedef uint8_t BinaryPixelType; + typedef uint8_t LabelPixelType; typedef itk::Image< BinaryPixelType, Dimension > BinaryImageType; typedef itk::Image< LabelPixelType, Dimension > LabelImageType; diff --git a/Modules/Filtering/LabelMap/test/itkLabelMapToLabelImageFilterTest.cxx b/Modules/Filtering/LabelMap/test/itkLabelMapToLabelImageFilterTest.cxx index 9e3088168e0..bf8c3dce3ce 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelMapToLabelImageFilterTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelMapToLabelImageFilterTest.cxx @@ -39,7 +39,7 @@ int itkLabelMapToLabelImageFilterTest(int argc, char * argv[]) typedef LabelMapType::SizeType SizeType; typedef LabelMapType::LabelObjectVectorType LabelObjectVectorType; typedef LabelMapType::LabelVectorType LabelVectorType; - typedef itk::Image< unsigned char, dim > ImageType; + typedef itk::Image< uint8_t, dim > ImageType; typedef itk::LabelMapToLabelImageFilter LabelMapToLabelImageFilterType; @@ -83,7 +83,7 @@ int itkLabelMapToLabelImageFilterTest(int argc, char * argv[]) IndexType index; index[0] = ctrI; index[1] = ctrJ; - unsigned char val; + uint8_t val; val = image->GetPixel(index); if ( (ctrI == 5) || (ctrJ==5) ) { diff --git a/Modules/Filtering/LabelMap/test/itkLabelSelectionLabelMapFilterTest.cxx b/Modules/Filtering/LabelMap/test/itkLabelSelectionLabelMapFilterTest.cxx index e6c20079a73..65eebce1f89 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelSelectionLabelMapFilterTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelSelectionLabelMapFilterTest.cxx @@ -36,9 +36,9 @@ int itkLabelSelectionLabelMapFilterTest(int argc, char * argv[]) const int dim = 2; - typedef itk::Image< unsigned char, dim > ImageType; + typedef itk::Image< uint8_t, dim > ImageType; - typedef itk::LabelObject< unsigned char, dim > LabelObjectType; + typedef itk::LabelObject< uint8_t, dim > LabelObjectType; typedef itk::LabelMap< LabelObjectType > LabelMapType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/LabelMap/test/itkLabelShapeKeepNObjectsImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkLabelShapeKeepNObjectsImageFilterTest1.cxx index ca8f6d6d8f9..d441029c626 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelShapeKeepNObjectsImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelShapeKeepNObjectsImageFilterTest1.cxx @@ -36,7 +36,7 @@ int itkLabelShapeKeepNObjectsImageFilterTest1(int argc, char * argv[]) const unsigned int dim = 2; - typedef itk::Image< unsigned char, dim > IType; + typedef itk::Image< uint8_t, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Filtering/LabelMap/test/itkLabelShapeOpeningImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkLabelShapeOpeningImageFilterTest1.cxx index 2473a161dbf..231275483b4 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelShapeOpeningImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelShapeOpeningImageFilterTest1.cxx @@ -36,7 +36,7 @@ int itkLabelShapeOpeningImageFilterTest1(int argc, char * argv[]) const unsigned int dim = 2; - typedef itk::Image< unsigned char, dim > IType; + typedef itk::Image< uint8_t, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Filtering/LabelMap/test/itkLabelStatisticsKeepNObjectsImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkLabelStatisticsKeepNObjectsImageFilterTest1.cxx index 626305a8903..06beaac4bcd 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelStatisticsKeepNObjectsImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelStatisticsKeepNObjectsImageFilterTest1.cxx @@ -36,7 +36,7 @@ int itkLabelStatisticsKeepNObjectsImageFilterTest1(int argc, char * argv[]) const unsigned int dim = 2; - typedef itk::Image< unsigned char, dim > IType; + typedef itk::Image< uint8_t, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Filtering/LabelMap/test/itkLabelStatisticsOpeningImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkLabelStatisticsOpeningImageFilterTest1.cxx index c7e43592f67..1899c77948c 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelStatisticsOpeningImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelStatisticsOpeningImageFilterTest1.cxx @@ -36,7 +36,7 @@ int itkLabelStatisticsOpeningImageFilterTest1(int argc, char * argv[]) const unsigned int dim = 2; - typedef itk::Image< unsigned char, dim > IType; + typedef itk::Image< uint8_t, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Filtering/LabelMap/test/itkLabelUniqueLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkLabelUniqueLabelMapFilterTest1.cxx index 6da63c5c578..6e9ca81d18f 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelUniqueLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelUniqueLabelMapFilterTest1.cxx @@ -38,9 +38,9 @@ int itkLabelUniqueLabelMapFilterTest1(int argc, char * argv[]) const int dim = 2; - typedef itk::Image< unsigned char, dim > ImageType; + typedef itk::Image< uint8_t, dim > ImageType; - typedef itk::ShapeLabelObject< unsigned char, dim > LabelObjectType; + typedef itk::ShapeLabelObject< uint8_t, dim > LabelObjectType; typedef itk::LabelMap< LabelObjectType > LabelMapType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/LabelMap/test/itkMergeLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkMergeLabelMapFilterTest1.cxx index 111887ff52d..266bd22b177 100644 --- a/Modules/Filtering/LabelMap/test/itkMergeLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkMergeLabelMapFilterTest1.cxx @@ -35,7 +35,7 @@ int itkMergeLabelMapFilterTest1( int argc, char * argv[] ) } const unsigned int dim = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; diff --git a/Modules/Filtering/LabelMap/test/itkObjectByObjectLabelMapFilterTest.cxx b/Modules/Filtering/LabelMap/test/itkObjectByObjectLabelMapFilterTest.cxx index 44e3cdc8379..02cfca730c3 100644 --- a/Modules/Filtering/LabelMap/test/itkObjectByObjectLabelMapFilterTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkObjectByObjectLabelMapFilterTest.cxx @@ -36,9 +36,9 @@ int itkObjectByObjectLabelMapFilterTest(int argc, char * argv[]) const int dim = 2; - typedef itk::Image< unsigned char, dim > ImageType; + typedef itk::Image< uint8_t, dim > ImageType; - typedef itk::LabelObject< unsigned char, dim > LabelObjectType; + typedef itk::LabelObject< uint8_t, dim > LabelObjectType; typedef itk::LabelMap< LabelObjectType > LabelMapType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/LabelMap/test/itkPadLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkPadLabelMapFilterTest1.cxx index 017cedb9165..aa449add54c 100644 --- a/Modules/Filtering/LabelMap/test/itkPadLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkPadLabelMapFilterTest1.cxx @@ -46,9 +46,9 @@ int itkPadLabelMapFilterTest1(int argc, char * argv[]) const unsigned int dim = 2; - typedef itk::Image< unsigned char, dim > ImageType; + typedef itk::Image< uint8_t, dim > ImageType; - typedef itk::LabelObject< unsigned char, dim > LabelObjectType; + typedef itk::LabelObject< uint8_t, dim > LabelObjectType; typedef itk::LabelMap< LabelObjectType > LabelMapType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/LabelMap/test/itkRegionFromReferenceLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkRegionFromReferenceLabelMapFilterTest1.cxx index d346bea6df8..ce64df5f139 100644 --- a/Modules/Filtering/LabelMap/test/itkRegionFromReferenceLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkRegionFromReferenceLabelMapFilterTest1.cxx @@ -46,9 +46,9 @@ int itkRegionFromReferenceLabelMapFilterTest1(int argc, char * argv[]) const unsigned int dim = 3; - typedef itk::Image< unsigned char, dim > ImageType; + typedef itk::Image< uint8_t, dim > ImageType; - typedef itk::LabelObject< unsigned char, dim > LabelObjectType; + typedef itk::LabelObject< uint8_t, dim > LabelObjectType; typedef itk::LabelMap< LabelObjectType > LabelMapType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/LabelMap/test/itkRelabelLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkRelabelLabelMapFilterTest1.cxx index 0333030d121..0474a6d4c90 100644 --- a/Modules/Filtering/LabelMap/test/itkRelabelLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkRelabelLabelMapFilterTest1.cxx @@ -37,9 +37,9 @@ int itkRelabelLabelMapFilterTest1(int argc, char * argv[]) const int dim = 2; - typedef itk::Image< unsigned char, dim > ImageType; + typedef itk::Image< uint8_t, dim > ImageType; - typedef itk::LabelObject< unsigned char, dim > LabelObjectType; + typedef itk::LabelObject< uint8_t, dim > LabelObjectType; typedef itk::LabelMap< LabelObjectType > LabelMapType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/LabelMap/test/itkShapeKeepNObjectsLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkShapeKeepNObjectsLabelMapFilterTest1.cxx index 6362bbedb8f..c3ab42c916f 100644 --- a/Modules/Filtering/LabelMap/test/itkShapeKeepNObjectsLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkShapeKeepNObjectsLabelMapFilterTest1.cxx @@ -38,7 +38,7 @@ int itkShapeKeepNObjectsLabelMapFilterTest1(int argc, char * argv[]) const unsigned int dim = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; diff --git a/Modules/Filtering/LabelMap/test/itkShapeLabelObjectAccessorsTest1.cxx b/Modules/Filtering/LabelMap/test/itkShapeLabelObjectAccessorsTest1.cxx index abddabcd02f..523b41bc407 100644 --- a/Modules/Filtering/LabelMap/test/itkShapeLabelObjectAccessorsTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkShapeLabelObjectAccessorsTest1.cxx @@ -34,7 +34,7 @@ int itkShapeLabelObjectAccessorsTest1(int argc, char * argv[]) const unsigned int dim = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; typedef itk::ShapeLabelObject< PixelType, dim > ShapeLabelObjectType; typedef itk::LabelMap< ShapeLabelObjectType > LabelMapType; diff --git a/Modules/Filtering/LabelMap/test/itkShapeOpeningLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkShapeOpeningLabelMapFilterTest1.cxx index 5c6a2b1429b..f97bb80c73c 100644 --- a/Modules/Filtering/LabelMap/test/itkShapeOpeningLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkShapeOpeningLabelMapFilterTest1.cxx @@ -38,7 +38,7 @@ int itkShapeOpeningLabelMapFilterTest1(int argc, char * argv[]) const unsigned int dim = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; diff --git a/Modules/Filtering/LabelMap/test/itkShapePositionLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkShapePositionLabelMapFilterTest1.cxx index a908919847d..90de7f889d7 100644 --- a/Modules/Filtering/LabelMap/test/itkShapePositionLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkShapePositionLabelMapFilterTest1.cxx @@ -35,7 +35,7 @@ int itkShapePositionLabelMapFilterTest1(int argc, char * argv[]) // declare the dimension used, and the type of the input image const int dim = 3; - typedef unsigned char PType; + typedef uint8_t PType; typedef itk::Image< PType, dim > IType; // We read the input image. diff --git a/Modules/Filtering/LabelMap/test/itkShapeRelabelImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkShapeRelabelImageFilterTest1.cxx index 04f18954865..e96d578c855 100644 --- a/Modules/Filtering/LabelMap/test/itkShapeRelabelImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkShapeRelabelImageFilterTest1.cxx @@ -36,7 +36,7 @@ int itkShapeRelabelImageFilterTest1(int argc, char * argv[]) const unsigned int dim = 2; - typedef itk::Image< unsigned char, dim > IType; + typedef itk::Image< uint8_t, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Filtering/LabelMap/test/itkShapeRelabelLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkShapeRelabelLabelMapFilterTest1.cxx index 18e2053cb9e..659c11639b6 100644 --- a/Modules/Filtering/LabelMap/test/itkShapeRelabelLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkShapeRelabelLabelMapFilterTest1.cxx @@ -37,7 +37,7 @@ int itkShapeRelabelLabelMapFilterTest1(int argc, char * argv[]) const unsigned int dim = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; diff --git a/Modules/Filtering/LabelMap/test/itkShapeUniqueLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkShapeUniqueLabelMapFilterTest1.cxx index 57750355b4e..2c6699d491b 100644 --- a/Modules/Filtering/LabelMap/test/itkShapeUniqueLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkShapeUniqueLabelMapFilterTest1.cxx @@ -38,7 +38,7 @@ int itkShapeUniqueLabelMapFilterTest1(int argc, char * argv[]) const unsigned int dim = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; diff --git a/Modules/Filtering/LabelMap/test/itkShiftLabelObjectTest.cxx b/Modules/Filtering/LabelMap/test/itkShiftLabelObjectTest.cxx index 81c0cb3b644..0164490432e 100644 --- a/Modules/Filtering/LabelMap/test/itkShiftLabelObjectTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkShiftLabelObjectTest.cxx @@ -38,7 +38,7 @@ int itkShiftLabelObjectTest(int argc, char * argv[]) typedef LabelMapType::SizeType SizeType; typedef LabelMapType::LabelObjectVectorType LabelObjectVectorType; typedef LabelMapType::LabelVectorType LabelVectorType; - typedef itk::Image< unsigned char, dim > ImageType; + typedef itk::Image< uint8_t, dim > ImageType; typedef itk::LabelImageToLabelMapFilter LabelImageToLabelMapFilterType; diff --git a/Modules/Filtering/LabelMap/test/itkShiftScaleLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkShiftScaleLabelMapFilterTest1.cxx index 9db2ca2200a..33abd8a7ca8 100644 --- a/Modules/Filtering/LabelMap/test/itkShiftScaleLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkShiftScaleLabelMapFilterTest1.cxx @@ -47,9 +47,9 @@ int itkShiftScaleLabelMapFilterTest1(int argc, char * argv[]) const unsigned int dim = 2; - typedef itk::Image< unsigned char, dim > ImageType; + typedef itk::Image< uint8_t, dim > ImageType; - typedef itk::LabelObject< unsigned char, dim > LabelObjectType; + typedef itk::LabelObject< uint8_t, dim > LabelObjectType; typedef itk::LabelMap< LabelObjectType > LabelMapType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/LabelMap/test/itkStatisticsKeepNObjectsLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkStatisticsKeepNObjectsLabelMapFilterTest1.cxx index 6c769399a5c..01d433b4606 100644 --- a/Modules/Filtering/LabelMap/test/itkStatisticsKeepNObjectsLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkStatisticsKeepNObjectsLabelMapFilterTest1.cxx @@ -38,7 +38,7 @@ int itkStatisticsKeepNObjectsLabelMapFilterTest1(int argc, char * argv[]) const unsigned int dim = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; diff --git a/Modules/Filtering/LabelMap/test/itkStatisticsOpeningLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkStatisticsOpeningLabelMapFilterTest1.cxx index 23d16a05ac0..e3fa12533ce 100644 --- a/Modules/Filtering/LabelMap/test/itkStatisticsOpeningLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkStatisticsOpeningLabelMapFilterTest1.cxx @@ -38,7 +38,7 @@ int itkStatisticsOpeningLabelMapFilterTest1(int argc, char * argv[]) const unsigned int dim = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; diff --git a/Modules/Filtering/LabelMap/test/itkStatisticsPositionLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkStatisticsPositionLabelMapFilterTest1.cxx index e0856a1a3fc..6b4d1e3103b 100644 --- a/Modules/Filtering/LabelMap/test/itkStatisticsPositionLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkStatisticsPositionLabelMapFilterTest1.cxx @@ -35,7 +35,7 @@ int itkStatisticsPositionLabelMapFilterTest1(int argc, char * argv[]) // declare the dimension used, and the type of the input image const int dim = 3; - typedef unsigned char PType; + typedef uint8_t PType; typedef itk::Image< PType, dim > IType; // We read the input image. diff --git a/Modules/Filtering/LabelMap/test/itkStatisticsRelabelImageFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkStatisticsRelabelImageFilterTest1.cxx index 5006eb6322f..885de4427e3 100644 --- a/Modules/Filtering/LabelMap/test/itkStatisticsRelabelImageFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkStatisticsRelabelImageFilterTest1.cxx @@ -36,7 +36,7 @@ int itkStatisticsRelabelImageFilterTest1(int argc, char * argv[]) const unsigned int dim = 2; - typedef itk::Image< unsigned char, dim > IType; + typedef itk::Image< uint8_t, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Filtering/LabelMap/test/itkStatisticsRelabelLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkStatisticsRelabelLabelMapFilterTest1.cxx index 9c3eada64e2..08c2ce4eccf 100644 --- a/Modules/Filtering/LabelMap/test/itkStatisticsRelabelLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkStatisticsRelabelLabelMapFilterTest1.cxx @@ -37,7 +37,7 @@ int itkStatisticsRelabelLabelMapFilterTest1(int argc, char * argv[]) const unsigned int dim = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; diff --git a/Modules/Filtering/LabelMap/test/itkStatisticsUniqueLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkStatisticsUniqueLabelMapFilterTest1.cxx index cc9c8e4306a..e7a4cea176d 100644 --- a/Modules/Filtering/LabelMap/test/itkStatisticsUniqueLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkStatisticsUniqueLabelMapFilterTest1.cxx @@ -38,7 +38,7 @@ int itkStatisticsUniqueLabelMapFilterTest1(int argc, char * argv[]) const unsigned int dim = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; diff --git a/Modules/Filtering/MathematicalMorphology/include/itkAnchorErodeDilateLine.h b/Modules/Filtering/MathematicalMorphology/include/itkAnchorErodeDilateLine.h index 375db444040..b45c334ece9 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkAnchorErodeDilateLine.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkAnchorErodeDilateLine.h @@ -83,10 +83,10 @@ class ITK_EXPORT AnchorErodeDilateLine // bool, short and char are acceptable for vector based algorithm: they do // not require // too much memory. Other types are not usable with that algorithm - return typeid( InputImagePixelType ) == typeid( unsigned char ) - || typeid( InputImagePixelType ) == typeid( signed char ) - || typeid( InputImagePixelType ) == typeid( unsigned short ) - || typeid( InputImagePixelType ) == typeid( signed short ) + return typeid( InputImagePixelType ) == typeid( uint8_t ) + || typeid( InputImagePixelType ) == typeid( int8_t ) + || typeid( InputImagePixelType ) == typeid( uint16_t ) + || typeid( InputImagePixelType ) == typeid( int16_t ) || typeid( InputImagePixelType ) == typeid( bool ); } diff --git a/Modules/Filtering/MathematicalMorphology/include/itkMorphologyHistogram.h b/Modules/Filtering/MathematicalMorphology/include/itkMorphologyHistogram.h index fc6cbd8594f..39515c15b77 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkMorphologyHistogram.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkMorphologyHistogram.h @@ -196,14 +196,14 @@ class VectorMorphologyHistogram // as base class template< class TCompare > -class MorphologyHistogram: - public VectorMorphologyHistogram +class MorphologyHistogram: + public VectorMorphologyHistogram { }; template< class TCompare > -class MorphologyHistogram: - public VectorMorphologyHistogram +class MorphologyHistogram: + public VectorMorphologyHistogram { }; diff --git a/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramMorphologicalGradientImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramMorphologicalGradientImageFilter.h index 8c1d85ec5dd..af155e94457 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramMorphologicalGradientImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramMorphologicalGradientImageFilter.h @@ -185,14 +185,14 @@ class VectorMorphologicalGradientHistogram // as base class template<> -class MorphologicalGradientHistogram: - public VectorMorphologicalGradientHistogram +class MorphologicalGradientHistogram: + public VectorMorphologicalGradientHistogram { }; template<> -class MorphologicalGradientHistogram: - public VectorMorphologicalGradientHistogram +class MorphologicalGradientHistogram: + public VectorMorphologicalGradientHistogram { }; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkClosingByReconstructionImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkClosingByReconstructionImageFilterTest.cxx index 6658f269583..5ab4af80826 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkClosingByReconstructionImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkClosingByReconstructionImageFilterTest.cxx @@ -33,7 +33,7 @@ int itkClosingByReconstructionImageFilterTest(int argc, char* argv [] ) } const int Dimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > InputImageType; typedef itk::Image< PixelType, Dimension > OutputImageType; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkDoubleThresholdImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkDoubleThresholdImageFilterTest.cxx index 7e2f61a7037..900c5b23f57 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkDoubleThresholdImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkDoubleThresholdImageFilterTest.cxx @@ -43,9 +43,9 @@ int itkDoubleThresholdImageFilterTest( int argc, char * argv[] ) // const unsigned int Dimension = 2; - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; - typedef unsigned char WritePixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; + typedef uint8_t WritePixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleConnectedClosingImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleConnectedClosingImageFilterTest.cxx index 7ff1c14c651..61edfebee74 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleConnectedClosingImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleConnectedClosingImageFilterTest.cxx @@ -42,9 +42,9 @@ int itkGrayscaleConnectedClosingImageFilterTest( int argc, char * argv[] ) // const unsigned int Dimension = 2; - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; - typedef unsigned char WritePixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; + typedef uint8_t WritePixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleConnectedOpeningImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleConnectedOpeningImageFilterTest.cxx index ea798a31919..c32fab9c66d 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleConnectedOpeningImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleConnectedOpeningImageFilterTest.cxx @@ -42,9 +42,9 @@ int itkGrayscaleConnectedOpeningImageFilterTest( int argc, char * argv[] ) // const unsigned int Dimension = 2; - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; - typedef unsigned char WritePixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; + typedef uint8_t WritePixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleDilateImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleDilateImageFilterTest.cxx index 911af7bad88..111d43fc42a 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleDilateImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleDilateImageFilterTest.cxx @@ -35,7 +35,7 @@ int itkGrayscaleDilateImageFilterTest(int ac, char* av[] ) } unsigned int const dim = 2; - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleErodeImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleErodeImageFilterTest.cxx index 42b8db0627f..e6ba605db8f 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleErodeImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleErodeImageFilterTest.cxx @@ -35,7 +35,7 @@ int itkGrayscaleErodeImageFilterTest(int ac, char* av[] ) } unsigned int const dim = 2; - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFillholeImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFillholeImageFilterTest.cxx index ba26a7891c4..0599fc0becd 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFillholeImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFillholeImageFilterTest.cxx @@ -45,7 +45,7 @@ int itkGrayscaleFillholeImageFilterTest( int argc, char * argv[] ) typedef short InputPixelType; typedef short OutputPixelType; - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionDilateImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionDilateImageFilterTest.cxx index 13c9a070fb7..9c3661ddac7 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionDilateImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionDilateImageFilterTest.cxx @@ -29,11 +29,11 @@ int itkGrayscaleFunctionDilateImageFilterTest(int argc, char *argv[] ) const unsigned int myDimension = 2; // Define the values of the input images - const unsigned short fgValue = 1; - const unsigned short bgValue = 0; + const uint16_t fgValue = 1; + const uint16_t bgValue = 0; // Declare the types of the images - typedef itk::Image myImageType; + typedef itk::Image myImageType; // Declare the type of the index to access images typedef itk::Index myIndexType; @@ -112,7 +112,7 @@ int itkGrayscaleFunctionDilateImageFilterTest(int argc, char *argv[] ) } // Declare the type for the structuring element - typedef itk::BinaryBallStructuringElement + typedef itk::BinaryBallStructuringElement myKernelType; // Declare the type for the morphology Filter diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionErodeImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionErodeImageFilterTest.cxx index 7382228b5ad..dfb4c687692 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionErodeImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionErodeImageFilterTest.cxx @@ -29,11 +29,11 @@ int itkGrayscaleFunctionErodeImageFilterTest(int argc, char* argv[] ) const unsigned int myDimension = 2; // Define the values of the input images - const unsigned short fgValue = 1; - const unsigned short bgValue = 2; + const uint16_t fgValue = 1; + const uint16_t bgValue = 2; // Declare the types of the images - typedef itk::Image myImageType; + typedef itk::Image myImageType; // Declare the type of the index to access images typedef itk::Index myIndexType; @@ -112,7 +112,7 @@ int itkGrayscaleFunctionErodeImageFilterTest(int argc, char* argv[] ) } // Declare the type for the structuring element - typedef itk::BinaryBallStructuringElement + typedef itk::BinaryBallStructuringElement myKernelType; // Declare the type for the morphology Filter diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleGeodesicErodeDilateImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleGeodesicErodeDilateImageFilterTest.cxx index 2cc9091de6b..07c3be5fd93 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleGeodesicErodeDilateImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleGeodesicErodeDilateImageFilterTest.cxx @@ -35,7 +35,7 @@ int itkGrayscaleGeodesicErodeDilateImageFilterTest(int argc, char* argv [] ) return EXIT_FAILURE; } const int Dimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > InputImageType; typedef itk::Image< PixelType, Dimension > OutputImageType; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalClosingImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalClosingImageFilterTest.cxx index 9003a2e6a46..ba0cff2f354 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalClosingImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalClosingImageFilterTest.cxx @@ -36,7 +36,7 @@ int itkGrayscaleMorphologicalClosingImageFilterTest(int argc, char* argv [] ) const unsigned int Dimension = 2; // Define the pixel type - typedef unsigned char PixelType; + typedef uint8_t PixelType; // Declare the types of the images typedef itk::Image ImageType; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalClosingImageFilterTest2.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalClosingImageFilterTest2.cxx index 1e6866d54d5..3b5cf883a7b 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalClosingImageFilterTest2.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalClosingImageFilterTest2.cxx @@ -35,7 +35,7 @@ int itkGrayscaleMorphologicalClosingImageFilterTest2(int ac, char* av[] ) } unsigned int const dim = 2; - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalOpeningImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalOpeningImageFilterTest.cxx index 3cea73e998b..2ee1ac70611 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalOpeningImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalOpeningImageFilterTest.cxx @@ -36,7 +36,7 @@ int itkGrayscaleMorphologicalOpeningImageFilterTest(int argc, char* argv [] ) const unsigned int Dimension = 2; // Define the pixel type - typedef unsigned char PixelType; + typedef uint8_t PixelType; // Declare the types of the images typedef itk::Image ImageType; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalOpeningImageFilterTest2.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalOpeningImageFilterTest2.cxx index ce56f806268..8fc7dfef8da 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalOpeningImageFilterTest2.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalOpeningImageFilterTest2.cxx @@ -35,7 +35,7 @@ int itkGrayscaleMorphologicalOpeningImageFilterTest2(int ac, char* av[] ) } unsigned int const dim = 2; - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Filtering/MathematicalMorphology/test/itkHConvexConcaveImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkHConvexConcaveImageFilterTest.cxx index bbfef9dbb8f..d13eea283c3 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkHConvexConcaveImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkHConvexConcaveImageFilterTest.cxx @@ -46,7 +46,7 @@ int itkHConvexConcaveImageFilterTest( int argc, char * argv[] ) typedef float InputPixelType; typedef float OutputPixelType; - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkHMaximaMinimaImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkHMaximaMinimaImageFilterTest.cxx index 5800dc9b0b4..7b435b583fc 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkHMaximaMinimaImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkHMaximaMinimaImageFilterTest.cxx @@ -40,10 +40,10 @@ int itkHMaximaMinimaImageFilterTest( int argc, char * argv[] ) // const unsigned int Dimension = 2; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef short InternalPixelType; - typedef unsigned char OutputPixelType; - typedef unsigned char WritePixelType; + typedef uint8_t OutputPixelType; + typedef uint8_t WritePixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< InternalPixelType, Dimension > InternalImageType; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleDilateImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleDilateImageFilterTest.cxx index 1cac16aaa96..3e2af43d1e9 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleDilateImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleDilateImageFilterTest.cxx @@ -35,7 +35,7 @@ int itkMapGrayscaleDilateImageFilterTest(int ac, char* av[] ) } unsigned int const dim = 2; - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleErodeImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleErodeImageFilterTest.cxx index 4c34a61d989..00c94237204 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleErodeImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleErodeImageFilterTest.cxx @@ -35,7 +35,7 @@ int itkMapGrayscaleErodeImageFilterTest(int ac, char* av[] ) } unsigned int const dim = 2; - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleMorphologicalClosingImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleMorphologicalClosingImageFilterTest.cxx index b4d3cbcc83d..347c4607253 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleMorphologicalClosingImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleMorphologicalClosingImageFilterTest.cxx @@ -35,7 +35,7 @@ int itkMapGrayscaleMorphologicalClosingImageFilterTest(int ac, char* av[] ) } unsigned int const dim = 2; - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleMorphologicalOpeningImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleMorphologicalOpeningImageFilterTest.cxx index bc8c11f9a86..017f6cde8a4 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleMorphologicalOpeningImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkMapGrayscaleMorphologicalOpeningImageFilterTest.cxx @@ -35,7 +35,7 @@ int itkMapGrayscaleMorphologicalOpeningImageFilterTest(int ac, char* av[] ) } unsigned int const dim = 2; - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Filtering/MathematicalMorphology/test/itkMorphologicalGradientImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkMorphologicalGradientImageFilterTest.cxx index ab477ce51fb..d1f427dc01b 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkMorphologicalGradientImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkMorphologicalGradientImageFilterTest.cxx @@ -33,7 +33,7 @@ int itkMorphologicalGradientImageFilterTest(int argc, char * argv[]) const int dim = 2; - typedef unsigned char PType; + typedef uint8_t PType; typedef itk::Image< PType, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkObjectMorphologyImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkObjectMorphologyImageFilterTest.cxx index f90e0e6558e..b62cf4c60f0 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkObjectMorphologyImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkObjectMorphologyImageFilterTest.cxx @@ -35,11 +35,11 @@ int itkObjectMorphologyImageFilterTest(int, char* [] ) const unsigned int myDimension = 3; // Define the values of the input images - const unsigned short fgValue = 1; - const unsigned short bgValue = 0; + const uint16_t fgValue = 1; + const uint16_t bgValue = 0; // Declare the types of the images - typedef itk::Image myImageType; + typedef itk::Image myImageType; // Declare the type of the index to access images typedef itk::Index myIndexType; @@ -109,7 +109,7 @@ int itkObjectMorphologyImageFilterTest(int, char* [] ) inputImage->SetPixel(ind, fgValue); // Declare the type for the structuring element - typedef itk::BinaryBallStructuringElement + typedef itk::BinaryBallStructuringElement myKernelType; // Declare the type for the morphology Filter diff --git a/Modules/Filtering/MathematicalMorphology/test/itkOpeningByReconstructionImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkOpeningByReconstructionImageFilterTest.cxx index 693b40af981..fd5ffdc20df 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkOpeningByReconstructionImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkOpeningByReconstructionImageFilterTest.cxx @@ -32,7 +32,7 @@ int itkOpeningByReconstructionImageFilterTest(int argc, char* argv [] ) } const int Dimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > InputImageType; typedef itk::Image< PixelType, Dimension > OutputImageType; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkRemoveBoundaryObjectsTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkRemoveBoundaryObjectsTest.cxx index 7cb69bd276e..07f1dad8894 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkRemoveBoundaryObjectsTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkRemoveBoundaryObjectsTest.cxx @@ -43,9 +43,9 @@ int itkRemoveBoundaryObjectsTest( int argc, char * argv[] ) // const unsigned int Dimension = 2; - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; - typedef unsigned char WritePixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; + typedef uint8_t WritePixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkRemoveBoundaryObjectsTest2.cxx b/Modules/Filtering/MathematicalMorphology/test/itkRemoveBoundaryObjectsTest2.cxx index 175250a7669..3c2ae8d2c9d 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkRemoveBoundaryObjectsTest2.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkRemoveBoundaryObjectsTest2.cxx @@ -41,9 +41,9 @@ int itkRemoveBoundaryObjectsTest2( int argc, char * argv[] ) // const unsigned int Dimension = 2; - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; - typedef unsigned char WritePixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; + typedef uint8_t WritePixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkTopHatImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkTopHatImageFilterTest.cxx index cd5f8c28111..3e05ebd5681 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkTopHatImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkTopHatImageFilterTest.cxx @@ -37,7 +37,7 @@ int itkTopHatImageFilterTest(int argc, char* argv [] ) const unsigned int Dimension = 2; // Define the pixel type - typedef unsigned char PixelType; + typedef uint8_t PixelType; // Declare the types of the images typedef itk::Image ImageType; diff --git a/Modules/Filtering/Path/test/itkExtractOrthogonalSwath2DImageFilterTest.cxx b/Modules/Filtering/Path/test/itkExtractOrthogonalSwath2DImageFilterTest.cxx index 7387a1dc3e2..eaffaad769e 100644 --- a/Modules/Filtering/Path/test/itkExtractOrthogonalSwath2DImageFilterTest.cxx +++ b/Modules/Filtering/Path/test/itkExtractOrthogonalSwath2DImageFilterTest.cxx @@ -33,7 +33,7 @@ int itkExtractOrthogonalSwath2DImageFilterTest(int argc, char* argv[]) return -1; } - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::PolyLineParametricPath<2> InPathType; typedef itk::ChainCodePath<2> ChainPathType; typedef itk::FourierSeriesPath<2> FSPathType; diff --git a/Modules/Filtering/Path/test/itkOrthogonalSwath2DPathFilterTest.cxx b/Modules/Filtering/Path/test/itkOrthogonalSwath2DPathFilterTest.cxx index 5e45211f302..676761b59a6 100644 --- a/Modules/Filtering/Path/test/itkOrthogonalSwath2DPathFilterTest.cxx +++ b/Modules/Filtering/Path/test/itkOrthogonalSwath2DPathFilterTest.cxx @@ -34,7 +34,7 @@ int itkOrthogonalSwath2DPathFilterTest(int, char*[]) { - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::Image FloatImageType; typedef itk::PolyLineParametricPath<2> InPathType; typedef itk::ChainCodePath<2> ChainPathType; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkBinaryMask3DQuadEdgeMeshSourceTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkBinaryMask3DQuadEdgeMeshSourceTest.cxx index 9d0bacadd70..e41a6ce9da5 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkBinaryMask3DQuadEdgeMeshSourceTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkBinaryMask3DQuadEdgeMeshSourceTest.cxx @@ -30,7 +30,7 @@ int itkBinaryMask3DQuadEdgeMeshSourceTest(int, char *[]) const unsigned int Dimension = 3; // Declare the types of the output images - typedef itk::Image ImageType; + typedef itk::Image ImageType; // Declare the type of the index,size and region to initialize images typedef itk::Index IndexType; diff --git a/Modules/Filtering/SpatialFunction/test/itkSpatialFunctionImageEvaluatorFilterTest.cxx b/Modules/Filtering/SpatialFunction/test/itkSpatialFunctionImageEvaluatorFilterTest.cxx index f96e80352cf..379d91500bc 100644 --- a/Modules/Filtering/SpatialFunction/test/itkSpatialFunctionImageEvaluatorFilterTest.cxx +++ b/Modules/Filtering/SpatialFunction/test/itkSpatialFunctionImageEvaluatorFilterTest.cxx @@ -28,7 +28,7 @@ int itkSpatialFunctionImageEvaluatorFilterTest(int, char* [] ) const unsigned int dim = 3; // Image typedef - typedef itk::Image< unsigned char, dim > ImageType; + typedef itk::Image< uint8_t, dim > ImageType; //-----------------Create a new input image-------------------- // Image size and spacing parameters diff --git a/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.hxx b/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.hxx index cddedab29f5..c5e787407fa 100644 --- a/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.hxx +++ b/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.hxx @@ -41,7 +41,7 @@ HistogramThresholdImageFilter m_Calculator = NULL; m_MaskOutput = true; - if( typeid(ValueType) == typeid(signed char) || typeid(ValueType) == typeid(unsigned char) ) + if( typeid(ValueType) == typeid(int8_t) || typeid(ValueType) == typeid(uint8_t) ) { m_AutoMinimumMaximum = false; } diff --git a/Modules/Filtering/Thresholding/test/itkBinaryThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkBinaryThresholdImageFilterTest.cxx index e7c0aaf8f1a..adb8f60b13b 100644 --- a/Modules/Filtering/Thresholding/test/itkBinaryThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkBinaryThresholdImageFilterTest.cxx @@ -27,7 +27,7 @@ int itkBinaryThresholdImageFilterTest(int, char* [] ) const unsigned int ImageDimension = 3; // Declare the types of the images - typedef itk::Image InputImageType; + typedef itk::Image InputImageType; typedef itk::Image OutputImageType; typedef InputImageType::PixelType InputPixelType; typedef OutputImageType::PixelType OutputPixelType; diff --git a/Modules/Filtering/Thresholding/test/itkBinaryThresholdImageFilterTest2.cxx b/Modules/Filtering/Thresholding/test/itkBinaryThresholdImageFilterTest2.cxx index 9f4db4a2582..609142f259a 100644 --- a/Modules/Filtering/Thresholding/test/itkBinaryThresholdImageFilterTest2.cxx +++ b/Modules/Filtering/Thresholding/test/itkBinaryThresholdImageFilterTest2.cxx @@ -38,7 +38,7 @@ int itkBinaryThresholdImageFilterTest2(int ac, char* av[] ) const unsigned int ImageDimension = 2; // Declare the types of the images - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::Image FloatImageType; // File reader and writer diff --git a/Modules/Filtering/Thresholding/test/itkBinaryThresholdProjectionImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkBinaryThresholdProjectionImageFilterTest.cxx index c1331dc9a30..654e58d359e 100644 --- a/Modules/Filtering/Thresholding/test/itkBinaryThresholdProjectionImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkBinaryThresholdProjectionImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkBinaryThresholdProjectionImageFilterTest(int argc, char * argv[]) const int dim = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Filtering/Thresholding/test/itkBinaryThresholdSpatialFunctionTest.cxx b/Modules/Filtering/Thresholding/test/itkBinaryThresholdSpatialFunctionTest.cxx index 64585163257..0ef0397c6a7 100644 --- a/Modules/Filtering/Thresholding/test/itkBinaryThresholdSpatialFunctionTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkBinaryThresholdSpatialFunctionTest.cxx @@ -100,7 +100,7 @@ int itkBinaryThresholdSpatialFunctionTest( int, char *[]) * the sphere. */ // set up a dummy image - typedef itk::Image ImageType; + typedef itk::Image ImageType; ImageType::Pointer image = ImageType::New(); ImageType::SizeType size; size.Fill( 10 ); diff --git a/Modules/Filtering/Thresholding/test/itkHuangMaskedThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkHuangMaskedThresholdImageFilterTest.cxx index 497f9d6e9d5..c9d6a06dd9e 100644 --- a/Modules/Filtering/Thresholding/test/itkHuangMaskedThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkHuangMaskedThresholdImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkHuangMaskedThresholdImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/Filtering/Thresholding/test/itkHuangThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkHuangThresholdImageFilterTest.cxx index ec99b469b28..683970ee12f 100644 --- a/Modules/Filtering/Thresholding/test/itkHuangThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkHuangThresholdImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkHuangThresholdImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/Filtering/Thresholding/test/itkIntermodesMaskedThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkIntermodesMaskedThresholdImageFilterTest.cxx index dd4d9f5faea..ae189b3c647 100644 --- a/Modules/Filtering/Thresholding/test/itkIntermodesMaskedThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkIntermodesMaskedThresholdImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkIntermodesMaskedThresholdImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/Filtering/Thresholding/test/itkIntermodesThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkIntermodesThresholdImageFilterTest.cxx index 0cb96d3b0f6..2607c127259 100644 --- a/Modules/Filtering/Thresholding/test/itkIntermodesThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkIntermodesThresholdImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkIntermodesThresholdImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/Filtering/Thresholding/test/itkIsoDataMaskedThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkIsoDataMaskedThresholdImageFilterTest.cxx index c751b358f7c..b0e51765bfc 100644 --- a/Modules/Filtering/Thresholding/test/itkIsoDataMaskedThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkIsoDataMaskedThresholdImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkIsoDataMaskedThresholdImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/Filtering/Thresholding/test/itkIsoDataThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkIsoDataThresholdImageFilterTest.cxx index 34b77fe12cd..e4a6143ada3 100644 --- a/Modules/Filtering/Thresholding/test/itkIsoDataThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkIsoDataThresholdImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkIsoDataThresholdImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/Filtering/Thresholding/test/itkKittlerIllingworthMaskedThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkKittlerIllingworthMaskedThresholdImageFilterTest.cxx index d247ba11a3a..23c3e67eb59 100644 --- a/Modules/Filtering/Thresholding/test/itkKittlerIllingworthMaskedThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkKittlerIllingworthMaskedThresholdImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkKittlerIllingworthMaskedThresholdImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/Filtering/Thresholding/test/itkKittlerIllingworthThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkKittlerIllingworthThresholdImageFilterTest.cxx index 6e1bcdc0d68..50906a1c92f 100644 --- a/Modules/Filtering/Thresholding/test/itkKittlerIllingworthThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkKittlerIllingworthThresholdImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkKittlerIllingworthThresholdImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/Filtering/Thresholding/test/itkLiMaskedThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkLiMaskedThresholdImageFilterTest.cxx index 3a314acb0f8..de2b1daac94 100644 --- a/Modules/Filtering/Thresholding/test/itkLiMaskedThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkLiMaskedThresholdImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkLiMaskedThresholdImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/Filtering/Thresholding/test/itkLiThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkLiThresholdImageFilterTest.cxx index d1391d9ba40..2749d64dfee 100644 --- a/Modules/Filtering/Thresholding/test/itkLiThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkLiThresholdImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkLiThresholdImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/Filtering/Thresholding/test/itkMaximumEntropyMaskedThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkMaximumEntropyMaskedThresholdImageFilterTest.cxx index 4f907e07275..6168045d1ce 100644 --- a/Modules/Filtering/Thresholding/test/itkMaximumEntropyMaskedThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkMaximumEntropyMaskedThresholdImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkMaximumEntropyMaskedThresholdImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/Filtering/Thresholding/test/itkMaximumEntropyThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkMaximumEntropyThresholdImageFilterTest.cxx index 2439ce347ae..2cd7103b630 100644 --- a/Modules/Filtering/Thresholding/test/itkMaximumEntropyThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkMaximumEntropyThresholdImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkMaximumEntropyThresholdImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/Filtering/Thresholding/test/itkMomentsMaskedThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkMomentsMaskedThresholdImageFilterTest.cxx index 84eeaabf52d..09af1d1ed04 100644 --- a/Modules/Filtering/Thresholding/test/itkMomentsMaskedThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkMomentsMaskedThresholdImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkMomentsMaskedThresholdImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/Filtering/Thresholding/test/itkMomentsThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkMomentsThresholdImageFilterTest.cxx index 0fb6129dbb1..6fb571b2987 100644 --- a/Modules/Filtering/Thresholding/test/itkMomentsThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkMomentsThresholdImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkMomentsThresholdImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/Filtering/Thresholding/test/itkOtsuMaskedThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkOtsuMaskedThresholdImageFilterTest.cxx index 2ac6085711a..267114ee87b 100644 --- a/Modules/Filtering/Thresholding/test/itkOtsuMaskedThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkOtsuMaskedThresholdImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkOtsuMaskedThresholdImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsImageFilterTest.cxx index a70f214c02e..70195571db7 100644 --- a/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsImageFilterTest.cxx @@ -36,8 +36,8 @@ int itkOtsuMultipleThresholdsImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned short InternalPixelType; - typedef unsigned char OutputPixelType; + typedef uint16_t InternalPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< InternalPixelType, 2> InternalImageType; diff --git a/Modules/Filtering/Thresholding/test/itkOtsuThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkOtsuThresholdImageFilterTest.cxx index 91f858a8cfa..f8a4e8b8eda 100644 --- a/Modules/Filtering/Thresholding/test/itkOtsuThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkOtsuThresholdImageFilterTest.cxx @@ -33,7 +33,7 @@ int itkOtsuThresholdImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/Filtering/Thresholding/test/itkRenyiEntropyMaskedThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkRenyiEntropyMaskedThresholdImageFilterTest.cxx index 6c375569943..d1950e41a78 100644 --- a/Modules/Filtering/Thresholding/test/itkRenyiEntropyMaskedThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkRenyiEntropyMaskedThresholdImageFilterTest.cxx @@ -35,7 +35,7 @@ int itkRenyiEntropyMaskedThresholdImageFilterTest(int argc, char* argv[] ) typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/Filtering/Thresholding/test/itkRenyiEntropyThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkRenyiEntropyThresholdImageFilterTest.cxx index 263e33fd051..1b000e60b3c 100644 --- a/Modules/Filtering/Thresholding/test/itkRenyiEntropyThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkRenyiEntropyThresholdImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkRenyiEntropyThresholdImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/Filtering/Thresholding/test/itkShanbhagMaskedThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkShanbhagMaskedThresholdImageFilterTest.cxx index 0dee1bfd54f..5599cabf915 100644 --- a/Modules/Filtering/Thresholding/test/itkShanbhagMaskedThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkShanbhagMaskedThresholdImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkShanbhagMaskedThresholdImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/Filtering/Thresholding/test/itkShanbhagThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkShanbhagThresholdImageFilterTest.cxx index 92fe6a18e2c..c4e562eb2b8 100644 --- a/Modules/Filtering/Thresholding/test/itkShanbhagThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkShanbhagThresholdImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkShanbhagThresholdImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/Filtering/Thresholding/test/itkTriangleMaskedThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkTriangleMaskedThresholdImageFilterTest.cxx index b61f7c8e3cf..a85864a4f7c 100644 --- a/Modules/Filtering/Thresholding/test/itkTriangleMaskedThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkTriangleMaskedThresholdImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkTriangleMaskedThresholdImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/Filtering/Thresholding/test/itkTriangleThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkTriangleThresholdImageFilterTest.cxx index 867779c25de..1745d1b25d0 100644 --- a/Modules/Filtering/Thresholding/test/itkTriangleThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkTriangleThresholdImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkTriangleThresholdImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/Filtering/Thresholding/test/itkYenMaskedThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkYenMaskedThresholdImageFilterTest.cxx index 575dc9cc08e..9e567cf4b26 100644 --- a/Modules/Filtering/Thresholding/test/itkYenMaskedThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkYenMaskedThresholdImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkYenMaskedThresholdImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/Filtering/Thresholding/test/itkYenThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkYenThresholdImageFilterTest.cxx index 03e1e0f8f86..e3f1a80a402 100644 --- a/Modules/Filtering/Thresholding/test/itkYenThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkYenThresholdImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkYenThresholdImageFilterTest(int argc, char* argv[] ) } typedef short InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; diff --git a/Modules/IO/BMP/include/itkBMPImageIO.h b/Modules/IO/BMP/include/itkBMPImageIO.h index 4ee44a888c8..506a4e4208f 100644 --- a/Modules/IO/BMP/include/itkBMPImageIO.h +++ b/Modules/IO/BMP/include/itkBMPImageIO.h @@ -41,7 +41,7 @@ class ITK_EXPORT BMPImageIO:public ImageIOBase typedef BMPImageIO Self; typedef ImageIOBase Superclass; typedef SmartPointer< Self > Pointer; - typedef RGBPixel< unsigned char > RGBPixelType; + typedef RGBPixel< uint8_t > RGBPixelType; /** Method for creation through the object factory. */ itkNewMacro(Self); @@ -87,7 +87,7 @@ class ITK_EXPORT BMPImageIO:public ImageIOBase /** This methods ensures that the endianness is respected */ void Write32BitsInteger(unsigned int value); - void Write16BitsInteger(unsigned short value); + void Write16BitsInteger(uint16_t value); std::ifstream m_Ifstream; std::ofstream m_Ofstream; @@ -95,7 +95,7 @@ class ITK_EXPORT BMPImageIO:public ImageIOBase bool m_FileLowerLeft; short m_Depth; bool m_Allow8BitBMP; - unsigned short m_NumberOfColors; + uint16_t m_NumberOfColors; unsigned int m_ColorTableSize; long m_BMPCompression; unsigned long m_BMPDataSize; diff --git a/Modules/IO/BMP/src/itkBMPImageIO.cxx b/Modules/IO/BMP/src/itkBMPImageIO.cxx index cbad753f84a..9801142794a 100644 --- a/Modules/IO/BMP/src/itkBMPImageIO.cxx +++ b/Modules/IO/BMP/src/itkBMPImageIO.cxx @@ -227,7 +227,7 @@ void BMPImageIO::Read(void *buffer) { unsigned long n = value[i]; i++; - unsigned char valpix = value[i]; + uint8_t valpix = value[i]; for ( unsigned long j = 0; j < n; j++ ) { RGBPixelType rbg; @@ -289,7 +289,7 @@ void BMPImageIO::Read(void *buffer) } else { - unsigned char val = value[i]; + uint8_t val = value[i]; RGBPixelType rbg; if ( val < m_ColorPalette.size() ) { @@ -532,7 +532,7 @@ void BMPImageIO::ReadImageInformation() // Number of colors m_Ifstream.read( (char *)&itmp, 4 ); ByteSwapper< int >::SwapFromSystemToLittleEndian(&itmp); - m_NumberOfColors = static_cast< unsigned short >( itmp ); + m_NumberOfColors = static_cast< uint16_t >( itmp ); // Number of important colors m_Ifstream.read( (char *)&itmp, 4 ); } @@ -553,7 +553,7 @@ void BMPImageIO::ReadImageInformation() { m_ColorTableSize = 0; } - unsigned char uctmp; + uint8_t uctmp; for ( unsigned long i = 0; i < m_ColorTableSize; i++ ) { RGBPixelType p; @@ -626,13 +626,13 @@ ::SwapBytesIfNecessary(void *buffer, SizeValueType numberOfPixels) { if ( m_ByteOrder == LittleEndian ) { - ByteSwapper< unsigned char >::SwapRangeFromSystemToLittleEndian( - (unsigned char *)buffer, numberOfPixels); + ByteSwapper< uint8_t >::SwapRangeFromSystemToLittleEndian( + (uint8_t *)buffer, numberOfPixels); } else if ( m_ByteOrder == BigEndian ) { - ByteSwapper< unsigned char >::SwapRangeFromSystemToBigEndian( - (unsigned char *)buffer, numberOfPixels); + ByteSwapper< uint8_t >::SwapRangeFromSystemToBigEndian( + (uint8_t *)buffer, numberOfPixels); } break; } @@ -654,13 +654,13 @@ ::SwapBytesIfNecessary(void *buffer, SizeValueType numberOfPixels) { if ( m_ByteOrder == LittleEndian ) { - ByteSwapper< unsigned short >::SwapRangeFromSystemToLittleEndian( - (unsigned short *)buffer, numberOfPixels); + ByteSwapper< uint16_t >::SwapRangeFromSystemToLittleEndian( + (uint16_t *)buffer, numberOfPixels); } else if ( m_ByteOrder == BigEndian ) { - ByteSwapper< unsigned short >::SwapRangeFromSystemToBigEndian( - (unsigned short *)buffer, numberOfPixels); + ByteSwapper< uint16_t >::SwapRangeFromSystemToBigEndian( + (uint16_t *)buffer, numberOfPixels); } break; } @@ -685,7 +685,7 @@ ::Write32BitsInteger(unsigned int value) void BMPImageIO -::Write16BitsInteger(unsigned short value) +::Write16BitsInteger(uint16_t value) { char tmp = static_cast(value % 256); m_Ofstream.write( &tmp, sizeof( char ) ); @@ -712,7 +712,7 @@ ::Write(const void *buffer) if ( this->GetComponentType() != UCHAR ) { - itkExceptionMacro(<< "BMPImageIO supports unsigned char only"); + itkExceptionMacro(<< "BMPImageIO supports uint8_t only"); } if ( ( this->m_NumberOfComponents != 1 ) && ( this->m_NumberOfComponents != 3 ) @@ -783,7 +783,7 @@ ::Write(const void *buffer) } this->Write32BitsInteger(fileSize); - const unsigned short applicationReservedValue = 0; + const uint16_t applicationReservedValue = 0; this->Write16BitsInteger(applicationReservedValue); this->Write16BitsInteger(applicationReservedValue); @@ -823,11 +823,11 @@ ::Write(const void *buffer) this->Write32BitsInteger(static_cast(m_Dimensions[1])); // Set `planes'=1 (mandatory) - const unsigned short numberOfColorPlanes = 1; + const uint16_t numberOfColorPlanes = 1; this->Write16BitsInteger(numberOfColorPlanes); // Set bits per pixel. - unsigned short numberOfBitsPerPixel = 0; + uint16_t numberOfBitsPerPixel = 0; switch ( bpp ) { case 4: @@ -879,7 +879,7 @@ ::Write(const void *buffer) { for ( unsigned int n = 0; n < 256; n++ ) { - char tmp2 = static_cast< unsigned char >( n ); + char tmp2 = static_cast< uint8_t >( n ); m_Ofstream.write( &tmp2, sizeof( char ) ); m_Ofstream.write( &tmp2, sizeof( char ) ); m_Ofstream.write( &tmp2, sizeof( char ) ); diff --git a/Modules/IO/BMP/test/itkBMPImageIOTest.cxx b/Modules/IO/BMP/test/itkBMPImageIOTest.cxx index 9b57ff39258..45a64d8749e 100644 --- a/Modules/IO/BMP/test/itkBMPImageIOTest.cxx +++ b/Modules/IO/BMP/test/itkBMPImageIOTest.cxx @@ -34,7 +34,7 @@ int itkBMPImageIOTest( int ac, char* av[] ) // ATTENTION THIS IS THE PIXEL TYPE FOR // THE RESULTING IMAGE - typedef itk::RGBPixel PixelType; + typedef itk::RGBPixel PixelType; typedef itk::Image myImage; itk::ImageFileReader::Pointer reader diff --git a/Modules/IO/BMP/test/itkBMPImageIOTest2.cxx b/Modules/IO/BMP/test/itkBMPImageIOTest2.cxx index f1065560bf3..d262a0ea363 100644 --- a/Modules/IO/BMP/test/itkBMPImageIOTest2.cxx +++ b/Modules/IO/BMP/test/itkBMPImageIOTest2.cxx @@ -34,7 +34,7 @@ int itkBMPImageIOTest2( int ac, char* av[] ) // ATTENTION THIS IS THE PIXEL TYPE FOR // THE RESULTING IMAGE - typedef itk::RGBAPixel PixelType; + typedef itk::RGBAPixel PixelType; typedef itk::Image myImage; typedef itk::ImageFileReader ReaderType; diff --git a/Modules/IO/BioRad/src/itkBioRadImageIO.cxx b/Modules/IO/BioRad/src/itkBioRadImageIO.cxx index 34398317ce4..3538eb75443 100644 --- a/Modules/IO/BioRad/src/itkBioRadImageIO.cxx +++ b/Modules/IO/BioRad/src/itkBioRadImageIO.cxx @@ -46,25 +46,25 @@ union Aligned4ByteUnion { struct bioradheader { - unsigned short nx, ny; // 0 2*2 image width and height in + uint16_t nx, ny; // 0 2*2 image width and height in // pixels - unsigned short npic; // 4 2 number of images in file - unsigned short ramp1_min, ramp1_max; // 6 2*2 LUT1 ramp min. and max. + uint16_t npic; // 4 2 number of images in file + uint16_t ramp1_min, ramp1_max; // 6 2*2 LUT1 ramp min. and max. char notes[4]; // 10 4 no notes=0; has notes=non // zero short byte_format; // 14 2 bytes=TRUE(1); words=FALSE(0) short image_number; // 16 2 image number within file char filename[32]; // 18 32 file name short merged; // 50 2 merged format - unsigned short color1; // 52 2 LUT1 color status - unsigned short file_id; // 54 2 valid .PIC file=12345 - unsigned short ramp2_min, ramp2_max; // 56 2*2 LUT2 ramp min. and max. - unsigned short color2; // 60 2 LUT2 color status + uint16_t color1; // 52 2 LUT1 color status + uint16_t file_id; // 54 2 valid .PIC file=12345 + uint16_t ramp2_min, ramp2_max; // 56 2*2 LUT2 ramp min. and max. + uint16_t color2; // 60 2 LUT2 color status short edited; // 62 2 image has been edited=TRUE(1) short lens; // 64 2 Integer part of lens // magnification char mag_factor[4]; // 66 4 4 byte real mag. factor (old ver.) - unsigned char reserved[6]; // 70 6 NOT USED (old ver.=real lens mag.) + uint8_t reserved[6]; // 70 6 NOT USED (old ver.=real lens mag.) }; typedef enum @@ -227,10 +227,10 @@ bool BioRadImageIO::CanReadFile(const char *filename) } // Check to see if its a BioRad file - unsigned short file_id; + uint16_t file_id; file.seekg(BIORAD_FILE_ID_OFFSET, std::ios::beg); file.read( (char *)( &file_id ), 2 ); - ByteSwapper< unsigned short >::SwapFromSystemToLittleEndian(&file_id); + ByteSwapper< uint16_t >::SwapFromSystemToLittleEndian(&file_id); itkDebugMacro(<< "Magic number: " << file_id); @@ -255,8 +255,8 @@ void BioRadImageIO::Read(void *buffer) //byte swapping depending on pixel type: if ( this->GetComponentType() == USHORT ) { - ByteSwapper< unsigned short >::SwapRangeFromSystemToLittleEndian( - reinterpret_cast< unsigned short * >( buffer ), + ByteSwapper< uint16_t >::SwapRangeFromSystemToLittleEndian( + reinterpret_cast< uint16_t * >( buffer ), static_cast< SizeValueType >( this->GetImageSizeInComponents() ) ); } @@ -283,15 +283,15 @@ void BioRadImageIO::InternalReadImageInformation(std::ifstream & file) file.read( (char *)p, BIORAD_HEADER_LENGTH ); //byteswap header fields - ByteSwapper< unsigned short >:: + ByteSwapper< uint16_t >:: SwapFromSystemToLittleEndian( &h.nx); - ByteSwapper< unsigned short >:: + ByteSwapper< uint16_t >:: SwapFromSystemToLittleEndian( &h.ny); - ByteSwapper< unsigned short >:: + ByteSwapper< uint16_t >:: SwapFromSystemToLittleEndian( &h.npic); - ByteSwapper< unsigned short >:: + ByteSwapper< uint16_t >:: SwapFromSystemToLittleEndian( &h.ramp1_min); - ByteSwapper< unsigned short >:: + ByteSwapper< uint16_t >:: SwapFromSystemToLittleEndian( &h.ramp1_max); ByteSwapper< short >:: SwapFromSystemToLittleEndian( &h.byte_format); @@ -301,15 +301,15 @@ void BioRadImageIO::InternalReadImageInformation(std::ifstream & file) SwapFromSystemToLittleEndian( &h.image_number); ByteSwapper< short >:: SwapFromSystemToLittleEndian( &h.merged); - ByteSwapper< unsigned short >:: + ByteSwapper< uint16_t >:: SwapFromSystemToLittleEndian( &h.color1); - ByteSwapper< unsigned short >:: + ByteSwapper< uint16_t >:: SwapFromSystemToLittleEndian( &h.file_id); - ByteSwapper< unsigned short >:: + ByteSwapper< uint16_t >:: SwapFromSystemToLittleEndian( &h.ramp2_min); - ByteSwapper< unsigned short >:: + ByteSwapper< uint16_t >:: SwapFromSystemToLittleEndian( &h.ramp2_max); - ByteSwapper< unsigned short >:: + ByteSwapper< uint16_t >:: SwapFromSystemToLittleEndian( &h.color2); ByteSwapper< short >:: SwapFromSystemToLittleEndian( &h.edited); @@ -550,8 +550,8 @@ void BioRadImageIO::Write(const void *buffer) return; } // write the actual header - ByteSwapper< unsigned short >::SwapRangeFromSystemToLittleEndian( - reinterpret_cast< unsigned short * >( p ), BIORAD_HEADER_LENGTH / 2); + ByteSwapper< uint16_t >::SwapRangeFromSystemToLittleEndian( + reinterpret_cast< uint16_t * >( p ), BIORAD_HEADER_LENGTH / 2); // To be able to deduce pixel spacing: Aligned4ByteUnion mag_factor; mag_factor.localFloatMagFactor = static_cast< float >( m_Spacing[0] ); @@ -578,8 +578,8 @@ void BioRadImageIO::Write(const void *buffer) memcpy(tempmemory, buffer, numberOfBytes); if ( this->GetComponentType() == USHORT ) { - ByteSwapper< unsigned short >::SwapRangeFromSystemToBigEndian( - reinterpret_cast< unsigned short * >( tempmemory ), numberOfComponents); + ByteSwapper< uint16_t >::SwapRangeFromSystemToBigEndian( + reinterpret_cast< uint16_t * >( tempmemory ), numberOfComponents); } // Write the actual pixel data diff --git a/Modules/IO/BioRad/test/itkBioRadImageIOTest.cxx b/Modules/IO/BioRad/test/itkBioRadImageIOTest.cxx index 90109102438..e689ecf6e63 100644 --- a/Modules/IO/BioRad/test/itkBioRadImageIOTest.cxx +++ b/Modules/IO/BioRad/test/itkBioRadImageIOTest.cxx @@ -32,7 +32,7 @@ int itkBioRadImageIOTest(int argc, char* argv[]) itk::ObjectFactoryBase::RegisterFactory( itk::BioRadImageIOFactory::New() ); - typedef unsigned char InputPixelType; + typedef uint8_t InputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::ImageFileReader< InputImageType > ReaderType; typedef itk::BioRadImageIO ImageIOType; diff --git a/Modules/IO/GDCM/src/itkGDCMImageIO.cxx b/Modules/IO/GDCM/src/itkGDCMImageIO.cxx index 9e07da1c410..582df5e1629 100644 --- a/Modules/IO/GDCM/src/itkGDCMImageIO.cxx +++ b/Modules/IO/GDCM/src/itkGDCMImageIO.cxx @@ -214,9 +214,9 @@ bool GDCMImageIO::CanReadFile(const char *filename) if(!dicomsig) { file.seekg(0,std::ios_base::beg); - unsigned short groupNo; - file.read(reinterpret_cast(&groupNo),sizeof(unsigned short)); - ByteSwapper::SwapFromSystemToLittleEndian(&groupNo); + uint16_t groupNo; + file.read(reinterpret_cast(&groupNo),sizeof(uint16_t)); + ByteSwapper::SwapFromSystemToLittleEndian(&groupNo); if(groupNo == 0x0002 || groupNo == 0x0008) { dicomsig = true; @@ -355,7 +355,7 @@ void GDCMImageIO::InternalReadImageInformation(std::ifstream & file) switch ( outputpt ) { case gdcm::PixelFormat::INT8: - m_ComponentType = ImageIOBase::CHAR; // Is it signed char ? + m_ComponentType = ImageIOBase::CHAR; // Is it int8_t ? break; case gdcm::PixelFormat::UINT8: m_ComponentType = ImageIOBase::UCHAR; @@ -492,9 +492,9 @@ void GDCMImageIO::InternalReadImageInformation(std::ifstream & file) char * bin = new char[encodedLengthEstimate]; unsigned int encodedLengthActual = static_cast< unsigned int >( itksysBase64_Encode( - (const unsigned char *)bv->GetPointer(), + (const uint8_t *)bv->GetPointer(), static_cast< SizeValueType >( bv->GetLength() ), - (unsigned char *)bin, + (uint8_t *)bin, static_cast< int >( 0 ) ) ); std::string encodedValue(bin, encodedLengthActual); EncapsulateMetaData< std::string >(dico, PrintAsPipeSeparatedString(tag), encodedValue); @@ -644,9 +644,9 @@ void GDCMImageIO::Write(const void *buffer) uint8_t * bin = new uint8_t[value.size()]; unsigned int decodedLengthActual = static_cast< unsigned int >( itksysBase64_Decode( - (const unsigned char *)value.c_str(), + (const uint8_t *)value.c_str(), static_cast< SizeValueType >( 0 ), - (unsigned char *)bin, + (uint8_t *)bin, static_cast< SizeValueType >( value.size() ) ) ); if ( /*tag.GetGroup() != 0 ||*/ tag.GetElement() != 0 ) // ? { @@ -927,7 +927,7 @@ void GDCMImageIO::Write(const void *buffer) if( outpixeltype != gdcm::PixelFormat::UNKNOWN ) { itkAssertInDebugAndIgnoreInReleaseMacro( m_RescaleIntercept != 0 || m_RescaleSlope != 1 ); - // rescale from float to unsigned short + // rescale from float to uint16_t gdcm::Rescaler ir; ir.SetIntercept(m_RescaleIntercept); ir.SetSlope(m_RescaleSlope); diff --git a/Modules/IO/GDCM/test/itkGDCMImageIOTest.cxx b/Modules/IO/GDCM/test/itkGDCMImageIOTest.cxx index 87ffc6872ee..c4fa78db3a4 100644 --- a/Modules/IO/GDCM/test/itkGDCMImageIOTest.cxx +++ b/Modules/IO/GDCM/test/itkGDCMImageIOTest.cxx @@ -103,7 +103,7 @@ int itkGDCMImageIOTest(int ac, char* av[]) // Rescale intensities and rewrite the image in another format // - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 2 > WriteImageType; typedef itk::RescaleIntensityImageFilter< InputImageType, WriteImageType > RescaleFilterType; diff --git a/Modules/IO/GDCM/test/itkGDCMImageIOTest2.cxx b/Modules/IO/GDCM/test/itkGDCMImageIOTest2.cxx index 36af77e1084..b8564ffebb9 100644 --- a/Modules/IO/GDCM/test/itkGDCMImageIOTest2.cxx +++ b/Modules/IO/GDCM/test/itkGDCMImageIOTest2.cxx @@ -33,7 +33,7 @@ int itkGDCMImageIOTest2(int argc, char *argv[] ) } const char *input = argv[1]; const char *output = argv[2]; - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; typedef itk::ImageFileWriter WriterType; diff --git a/Modules/IO/GDCM/test/itkGDCMSeriesReadImageWrite.cxx b/Modules/IO/GDCM/test/itkGDCMSeriesReadImageWrite.cxx index fe8fa86ee2d..d5ff1635f63 100644 --- a/Modules/IO/GDCM/test/itkGDCMSeriesReadImageWrite.cxx +++ b/Modules/IO/GDCM/test/itkGDCMSeriesReadImageWrite.cxx @@ -38,7 +38,7 @@ int itkGDCMSeriesReadImageWrite( int argc, char* argv[] ) return EXIT_FAILURE; } - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::ImageSeriesReader< ImageType > ReaderType; typedef itk::GDCMImageIO ImageIOType; typedef itk::GDCMSeriesFileNames SeriesFileNames; @@ -99,11 +99,11 @@ int itkGDCMSeriesReadImageWrite( int argc, char* argv[] ) return EXIT_FAILURE; } - // Writing image afer downscaling to 8bits (unsigned char) + // Writing image afer downscaling to 8bits (uint8_t) - typedef itk::Image< unsigned short, 3> Image3DType; - typedef itk::Image< unsigned char, 3> RescaleImageType; - typedef itk::Image< unsigned char, 2> OutputImageType; + typedef itk::Image< uint16_t, 3> Image3DType; + typedef itk::Image< uint8_t, 3> RescaleImageType; + typedef itk::Image< uint8_t, 2> OutputImageType; typedef itk::RescaleIntensityImageFilter< Image3DType, RescaleImageType > RescaleFilterType; diff --git a/Modules/IO/GDCM/test/itkGDCMSeriesStreamReadImageWrite.cxx b/Modules/IO/GDCM/test/itkGDCMSeriesStreamReadImageWrite.cxx index 943af15ee87..0de2494b573 100644 --- a/Modules/IO/GDCM/test/itkGDCMSeriesStreamReadImageWrite.cxx +++ b/Modules/IO/GDCM/test/itkGDCMSeriesStreamReadImageWrite.cxx @@ -52,7 +52,7 @@ int itkGDCMSeriesStreamReadImageWrite( int argc, char* argv[] ) return EXIT_FAILURE; } - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::ImageSeriesReader< ImageType > ReaderType; typedef itk::GDCMImageIO ImageIOType; typedef itk::GDCMSeriesFileNames SeriesFileNames; diff --git a/Modules/IO/GE/include/Ge5xHdr.h b/Modules/IO/GE/include/Ge5xHdr.h index aa115e2728a..47b5e510dc7 100644 --- a/Modules/IO/GE/include/Ge5xHdr.h +++ b/Modules/IO/GE/include/Ge5xHdr.h @@ -71,7 +71,7 @@ typedef struct GE_5x_ImgHdr { int GENESIS_IH_img_top_offset; int GENESIS_IH_img_bot_offset; short GENESIS_IH_img_version; - unsigned short GENESIS_IH_img_checksum; + uint16_t GENESIS_IH_img_checksum; int GENESIS_IH_img_p_id; int GENESIS_IH_img_l_id; int GENESIS_IH_img_p_unpack; diff --git a/Modules/IO/GE/include/itkGE4ImageIO.h b/Modules/IO/GE/include/itkGE4ImageIO.h index 6ce4d676ce3..472787fc283 100644 --- a/Modules/IO/GE/include/itkGE4ImageIO.h +++ b/Modules/IO/GE/include/itkGE4ImageIO.h @@ -91,7 +91,7 @@ class ITK_EXPORT GE4ImageIO:public IPLCommonImageIO // virtual void Read(void* buffer); /** Compute the size (in bytes) of the components of a pixel. For - * example, and RGB pixel of unsigned char would have a + * example, and RGB pixel of uint8_t would have a * component size of 1 byte. */ // Implemented in superclass // virtual unsigned int GetComponentSize() const; diff --git a/Modules/IO/GE/include/itkGE5ImageIO.h b/Modules/IO/GE/include/itkGE5ImageIO.h index 1cc10ff2e0a..b2ede120e84 100644 --- a/Modules/IO/GE/include/itkGE5ImageIO.h +++ b/Modules/IO/GE/include/itkGE5ImageIO.h @@ -87,7 +87,7 @@ class ITK_EXPORT GE5ImageIO:public IPLCommonImageIO // virtual void Read(void* buffer); /* * Compute the size (in bytes) of the components of a pixel. For - * example, and RGB pixel of unsigned char would have a + * example, and RGB pixel of uint8_t would have a * component size of 1 byte. */ // Implemented in superclass // virtual unsigned int GetComponentSize() const; diff --git a/Modules/IO/GE/include/itkGEAdwImageIO.h b/Modules/IO/GE/include/itkGEAdwImageIO.h index 24003ee1b99..305a07db344 100644 --- a/Modules/IO/GE/include/itkGEAdwImageIO.h +++ b/Modules/IO/GE/include/itkGEAdwImageIO.h @@ -82,7 +82,7 @@ class ITK_EXPORT GEAdwImageIO:public IPLCommonImageIO // virtual void Read(void* buffer); /* * Compute the size (in bytes) of the components of a pixel. For - * example, and RGB pixel of unsigned char would have a + * example, and RGB pixel of uint8_t would have a * component size of 1 byte. */ // Implemented in superclass // virtual unsigned int GetComponentSize() const; @@ -125,7 +125,7 @@ class ITK_EXPORT GEAdwImageIO:public IPLCommonImageIO GE_ADW_SU_PRODID_LEN = 13, GE_ADW_EX_SUID = 116, /**< Exam study ID - String */ GE_ADW_EX_SUID_LEN = 4, - GE_ADW_EX_NO = 124, /**< Exam Number - Unsigned short Int */ + GE_ADW_EX_NO = 124, /**< Exam Number - Unint16_t Int */ GE_ADW_EX_NO_LEN = 2, GE_ADW_EX_HOSPNAME = 126, /**< Hospital Name - String */ GE_ADW_EX_HOSPNAME_LEN = 33, @@ -210,7 +210,7 @@ class ITK_EXPORT GEAdwImageIO:public IPLCommonImageIO GE_ADW_IM_SUID_LEN = 4, GE_ADW_IM_UNIQ = 2188, /**< The make unique flag - Short Integer */ GE_ADW_IM_UNIQ_LEN = 2, - GE_ADW_IM_EXNO = 2192, /**< Exam number for this image - Unsigned short */ + GE_ADW_IM_EXNO = 2192, /**< Exam number for this image - Unint16_t */ GE_ADW_IM_EXNO_LEN = 2, GE_ADW_IM_SENO = 2194, /**< Series number for image - short integer */ GE_ADW_IM_SENO_LEN = 2, diff --git a/Modules/IO/GE/src/itkGE5ImageIO.cxx b/Modules/IO/GE/src/itkGE5ImageIO.cxx index 9a4135157e1..61b974d737f 100644 --- a/Modules/IO/GE/src/itkGE5ImageIO.cxx +++ b/Modules/IO/GE/src/itkGE5ImageIO.cxx @@ -128,7 +128,7 @@ GE5ImageIO::SwapPixHdr(Ge5xPixelHeader *hdr) ByteSwapper< int >::SwapFromSystemToBigEndian ( &( hdr->GENESIS_IH_img_top_offset ) ); ByteSwapper< int >::SwapFromSystemToBigEndian ( &( hdr->GENESIS_IH_img_bot_offset ) ); ByteSwapper< short >::SwapFromSystemToBigEndian ( &( hdr->GENESIS_IH_img_version ) ); - ByteSwapper< unsigned short >::SwapFromSystemToBigEndian ( &( hdr->GENESIS_IH_img_checksum ) ); + ByteSwapper< uint16_t >::SwapFromSystemToBigEndian ( &( hdr->GENESIS_IH_img_checksum ) ); ByteSwapper< int >::SwapFromSystemToBigEndian ( &( hdr->GENESIS_IH_img_p_id ) ); ByteSwapper< int >::SwapFromSystemToBigEndian ( &( hdr->GENESIS_IH_img_l_id ) ); ByteSwapper< int >::SwapFromSystemToBigEndian ( &( hdr->GENESIS_IH_img_p_unpack ) ); diff --git a/Modules/IO/GE/test/itkGEImageIOTest.cxx b/Modules/IO/GE/test/itkGEImageIOTest.cxx index 09479a88462..021a5494017 100644 --- a/Modules/IO/GE/test/itkGEImageIOTest.cxx +++ b/Modules/IO/GE/test/itkGEImageIOTest.cxx @@ -30,7 +30,7 @@ #define SPECIFIC_IMAGEIO_MODULE_TEST -typedef itk::Image ImageType ; +typedef itk::Image ImageType ; typedef ImageType::Pointer ImagePointer ; typedef itk::ImageFileReader< ImageType > ImageReaderType ; typedef itk::ImageFileWriter< ImageType > ImageWriterType ; diff --git a/Modules/IO/GIPL/src/itkGiplImageIO.cxx b/Modules/IO/GIPL/src/itkGiplImageIO.cxx index 9fb47d92cb7..4069ca8a1e0 100644 --- a/Modules/IO/GIPL/src/itkGiplImageIO.cxx +++ b/Modules/IO/GIPL/src/itkGiplImageIO.cxx @@ -282,7 +282,7 @@ void GiplImageIO::ReadImageInformation() } } - unsigned short dims[4]; + uint16_t dims[4]; unsigned int numberofdimension = 0; for ( i = 0; i < 4; i++ ) @@ -294,19 +294,19 @@ void GiplImageIO::ReadImageInformation() { if ( m_IsCompressed ) { - gzread( m_Internal->m_GzFile, (char *)&dims[i], static_cast< unsigned int >( sizeof( unsigned short ) ) ); + gzread( m_Internal->m_GzFile, (char *)&dims[i], static_cast< unsigned int >( sizeof( uint16_t ) ) ); } else { - m_Ifstream.read( (char *)&dims[i], sizeof( unsigned short ) ); + m_Ifstream.read( (char *)&dims[i], sizeof( uint16_t ) ); } if ( m_ByteOrder == BigEndian ) { - ByteSwapper< unsigned short >::SwapFromSystemToBigEndian(&dims[i]); + ByteSwapper< uint16_t >::SwapFromSystemToBigEndian(&dims[i]); } else if ( m_ByteOrder == LittleEndian ) { - ByteSwapper< unsigned short >::SwapFromSystemToLittleEndian(&dims[i]); + ByteSwapper< uint16_t >::SwapFromSystemToLittleEndian(&dims[i]); } if ( dims[i] > 0 ) @@ -329,20 +329,20 @@ void GiplImageIO::ReadImageInformation() m_Dimensions[i] = dims[i]; } - unsigned short image_type; + uint16_t image_type; if ( m_IsCompressed ) { - gzread( m_Internal->m_GzFile, (char *)&image_type, sizeof( unsigned short ) ); + gzread( m_Internal->m_GzFile, (char *)&image_type, sizeof( uint16_t ) ); } else { - m_Ifstream.read( (char *)&image_type, sizeof( unsigned short ) ); + m_Ifstream.read( (char *)&image_type, sizeof( uint16_t ) ); } if ( m_ByteOrder == BigEndian ) { - ByteSwapper< unsigned short >::SwapFromSystemToBigEndian(&image_type); + ByteSwapper< uint16_t >::SwapFromSystemToBigEndian(&image_type); } m_PixelType = SCALAR; @@ -634,13 +634,13 @@ ::SwapBytesIfNecessary(void *buffer, SizeValueType numberOfPixels) { if ( m_ByteOrder == LittleEndian ) { - ByteSwapper< unsigned char >::SwapRangeFromSystemToLittleEndian( - (unsigned char *)buffer, numberOfPixels); + ByteSwapper< uint8_t >::SwapRangeFromSystemToLittleEndian( + (uint8_t *)buffer, numberOfPixels); } else if ( m_ByteOrder == BigEndian ) { - ByteSwapper< unsigned char >::SwapRangeFromSystemToBigEndian( - (unsigned char *)buffer, numberOfPixels); + ByteSwapper< uint8_t >::SwapRangeFromSystemToBigEndian( + (uint8_t *)buffer, numberOfPixels); } break; } @@ -662,13 +662,13 @@ ::SwapBytesIfNecessary(void *buffer, SizeValueType numberOfPixels) { if ( m_ByteOrder == LittleEndian ) { - ByteSwapper< unsigned short >::SwapRangeFromSystemToLittleEndian( - (unsigned short *)buffer, numberOfPixels); + ByteSwapper< uint16_t >::SwapRangeFromSystemToLittleEndian( + (uint16_t *)buffer, numberOfPixels); } else if ( m_ByteOrder == BigEndian ) { - ByteSwapper< unsigned short >::SwapRangeFromSystemToBigEndian( - (unsigned short *)buffer, numberOfPixels); + ByteSwapper< uint16_t >::SwapRangeFromSystemToBigEndian( + (uint16_t *)buffer, numberOfPixels); } break; } @@ -746,26 +746,26 @@ ::Write(const void *buffer) for (unsigned int i = 0; i < 4; i++ ) { - unsigned short value; + uint16_t value; if ( i < nDims ) { value = this->GetDimensions(i); if ( m_ByteOrder == BigEndian ) { - ByteSwapper< unsigned short >::SwapFromSystemToBigEndian(&value); + ByteSwapper< uint16_t >::SwapFromSystemToBigEndian(&value); } else if ( m_ByteOrder == LittleEndian ) { - ByteSwapper< unsigned short >::SwapFromSystemToLittleEndian(&value); + ByteSwapper< uint16_t >::SwapFromSystemToLittleEndian(&value); } if ( m_IsCompressed ) { - gzwrite( m_Internal->m_GzFile, (char *)&( value ), static_cast< unsigned int >( sizeof( unsigned short ) ) ); + gzwrite( m_Internal->m_GzFile, (char *)&( value ), static_cast< unsigned int >( sizeof( uint16_t ) ) ); } else { - m_Ofstream.write( (char *)&( value ), sizeof( unsigned short ) ); + m_Ofstream.write( (char *)&( value ), sizeof( uint16_t ) ); } } else @@ -773,24 +773,24 @@ ::Write(const void *buffer) value = 1; if ( m_ByteOrder == BigEndian ) { - ByteSwapper< unsigned short >::SwapFromSystemToBigEndian(&value); + ByteSwapper< uint16_t >::SwapFromSystemToBigEndian(&value); } else if ( m_ByteOrder == LittleEndian ) { - ByteSwapper< unsigned short >::SwapFromSystemToLittleEndian(&value); + ByteSwapper< uint16_t >::SwapFromSystemToLittleEndian(&value); } if ( m_IsCompressed ) { - gzwrite( m_Internal->m_GzFile, (char *)&( value ), static_cast< unsigned int >( sizeof( unsigned short ) ) ); + gzwrite( m_Internal->m_GzFile, (char *)&( value ), static_cast< unsigned int >( sizeof( uint16_t ) ) ); } else { - m_Ofstream.write( (char *)&value, sizeof( unsigned short ) ); + m_Ofstream.write( (char *)&value, sizeof( uint16_t ) ); } } } - unsigned short image_type; + uint16_t image_type; switch ( m_ComponentType ) { case CHAR: @@ -815,20 +815,20 @@ ::Write(const void *buffer) if ( m_ByteOrder == BigEndian ) { - ByteSwapper< unsigned short >::SwapFromSystemToBigEndian( (unsigned short *)&image_type ); + ByteSwapper< uint16_t >::SwapFromSystemToBigEndian( (uint16_t *)&image_type ); } if ( m_ByteOrder == LittleEndian ) { - ByteSwapper< unsigned short >::SwapFromSystemToLittleEndian( (unsigned short *)&image_type ); + ByteSwapper< uint16_t >::SwapFromSystemToLittleEndian( (uint16_t *)&image_type ); } if ( m_IsCompressed ) { - gzwrite( m_Internal->m_GzFile, (char *)&image_type, static_cast< unsigned int >( sizeof( unsigned short ) ) ); + gzwrite( m_Internal->m_GzFile, (char *)&image_type, static_cast< unsigned int >( sizeof( uint16_t ) ) ); } else { - m_Ofstream.write( (char *)&image_type, sizeof( unsigned short ) ); + m_Ofstream.write( (char *)&image_type, sizeof( uint16_t ) ); } /* 10 16 X,Y,Z,T pixel dimensions mm */ diff --git a/Modules/IO/GIPL/test/itkGiplImageIOTest.cxx b/Modules/IO/GIPL/test/itkGiplImageIOTest.cxx index 175b0e92c05..0dbbb5616a7 100644 --- a/Modules/IO/GIPL/test/itkGiplImageIOTest.cxx +++ b/Modules/IO/GIPL/test/itkGiplImageIOTest.cxx @@ -34,7 +34,7 @@ int itkGiplImageIOTest( int ac, char* av[] ) // ATTENTION THIS IS THE PIXEL TYPE FOR // THE RESULTING IMAGE - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image myImage; diff --git a/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx b/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx index af93ef9e479..08d6120f084 100644 --- a/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx +++ b/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx @@ -88,7 +88,7 @@ GetH5TypeSpecialize(float, H5::PredType::NATIVE_FLOAT) GetH5TypeSpecialize(double, H5::PredType::NATIVE_DOUBLE) GetH5TypeSpecialize(char, H5::PredType::NATIVE_CHAR) -GetH5TypeSpecialize(unsigned char, H5::PredType::NATIVE_UCHAR) +GetH5TypeSpecialize(uint8_t, H5::PredType::NATIVE_UCHAR) GetH5TypeSpecialize(short int, H5::PredType::NATIVE_SHORT) GetH5TypeSpecialize(short unsigned int, H5::PredType::NATIVE_USHORT) @@ -810,7 +810,7 @@ ::ReadImageInformation() } else if(metaDataType == H5::PredType::NATIVE_UCHAR) { - this->StoreMetaData(&metaDict, + this->StoreMetaData(&metaDict, localMetaDataName, name, metaDataDims); @@ -824,7 +824,7 @@ ::ReadImageInformation() } else if(metaDataType == H5::PredType::NATIVE_USHORT) { - this->StoreMetaData(&metaDict, + this->StoreMetaData(&metaDict, localMetaDataName, name, metaDataDims); @@ -1078,7 +1078,7 @@ ::WriteImageInformation(void) { continue; } - if(this->WriteMeta(objName,metaObj)) + if(this->WriteMeta(objName,metaObj)) { continue; } @@ -1086,7 +1086,7 @@ ::WriteImageInformation(void) { continue; } - if(this->WriteMeta(objName,metaObj)) + if(this->WriteMeta(objName,metaObj)) { continue; } @@ -1118,7 +1118,7 @@ ::WriteImageInformation(void) { continue; } - if(this->WriteMetaArray(objName,metaObj)) + if(this->WriteMetaArray(objName,metaObj)) { continue; } @@ -1126,7 +1126,7 @@ ::WriteImageInformation(void) { continue; } - if(this->WriteMetaArray(objName,metaObj)) + if(this->WriteMetaArray(objName,metaObj)) { continue; } diff --git a/Modules/IO/HDF5/test/itkHDF5ImageIOStreamingReadWriteTest.cxx b/Modules/IO/HDF5/test/itkHDF5ImageIOStreamingReadWriteTest.cxx index b1f26b84245..9394961ae17 100644 --- a/Modules/IO/HDF5/test/itkHDF5ImageIOStreamingReadWriteTest.cxx +++ b/Modules/IO/HDF5/test/itkHDF5ImageIOStreamingReadWriteTest.cxx @@ -127,8 +127,8 @@ itkHDF5ImageIOStreamingReadWriteTest(int ac, char * av []) itk::ObjectFactoryBase::RegisterFactory(itk::HDF5ImageIOFactory::New() ); int result(0); - result += HDF5ReadWriteTest2("StreamingUCharImage.hdf5"); + result += HDF5ReadWriteTest2("StreamingUCharImage.hdf5"); result += HDF5ReadWriteTest2("StreamingFloatImage.hdf5"); - result += HDF5ReadWriteTest2 >("StreamingRGBImage.hdf5"); + result += HDF5ReadWriteTest2 >("StreamingRGBImage.hdf5"); return result != 0; } diff --git a/Modules/IO/HDF5/test/itkHDF5ImageIOTest.cxx b/Modules/IO/HDF5/test/itkHDF5ImageIOTest.cxx index c2893eca934..eb0e25b6408 100644 --- a/Modules/IO/HDF5/test/itkHDF5ImageIOTest.cxx +++ b/Modules/IO/HDF5/test/itkHDF5ImageIOTest.cxx @@ -64,14 +64,14 @@ int HDF5ReadWriteTest(const char *fileName) char metaDataChar('c'); itk::EncapsulateMetaData(metaDict,"TestChar",metaDataChar); - unsigned char metaDataUChar('u'); - itk::EncapsulateMetaData(metaDict,"TestUChar",metaDataUChar); + uint8_t metaDataUChar('u'); + itk::EncapsulateMetaData(metaDict,"TestUChar",metaDataUChar); short metaDataShort(1); itk::EncapsulateMetaData(metaDict,"TestShort",metaDataShort); - unsigned short metaDataUShort(3); - itk::EncapsulateMetaData(metaDict,"TestUShort",metaDataUShort); + uint16_t metaDataUShort(3); + itk::EncapsulateMetaData(metaDict,"TestUShort",metaDataUShort); int metaDataInt(5); itk::EncapsulateMetaData(metaDict,"TestInt",metaDataInt); @@ -180,8 +180,8 @@ int HDF5ReadWriteTest(const char *fileName) success = EXIT_FAILURE; } - unsigned char metaDataUChar2(0); - if(!itk::ExposeMetaData(metaDict2,"TestUChar",metaDataUChar2) || + uint8_t metaDataUChar2(0); + if(!itk::ExposeMetaData(metaDict2,"TestUChar",metaDataUChar2) || metaDataUChar2 != metaDataUChar) { std::cerr << "Failure Reading metaData " << "TestUChar " @@ -200,8 +200,8 @@ int HDF5ReadWriteTest(const char *fileName) success = EXIT_FAILURE; } - unsigned short metaDataUShort2(0); - if(!itk::ExposeMetaData(metaDict2,"TestUShort",metaDataUShort2) || + uint16_t metaDataUShort2(0); + if(!itk::ExposeMetaData(metaDict2,"TestUShort",metaDataUShort2) || metaDataUShort2 != metaDataUShort) { std::cerr << "Failure Reading metaData " << "TestUShort " @@ -333,8 +333,8 @@ itkHDF5ImageIOTest(int ac, char * av [] ) itk::ObjectFactoryBase::RegisterFactory(itk::HDF5ImageIOFactory::New() ); int result(0); - result += HDF5ReadWriteTest("UCharImage.hdf5"); + result += HDF5ReadWriteTest("UCharImage.hdf5"); result += HDF5ReadWriteTest("FloatImage.hdf5"); - result += HDF5ReadWriteTest >("RGBImage.hdf5"); + result += HDF5ReadWriteTest >("RGBImage.hdf5"); return result != 0; } diff --git a/Modules/IO/IPL/include/itkIPLCommonImageIO.h b/Modules/IO/IPL/include/itkIPLCommonImageIO.h index 2bea332dcde..9b64de419b2 100644 --- a/Modules/IO/IPL/include/itkIPLCommonImageIO.h +++ b/Modules/IO/IPL/include/itkIPLCommonImageIO.h @@ -54,10 +54,10 @@ class ITK_EXPORT IPLCommonImageIO:public ImageIOBase typedef ImageIOBase Superclass; typedef SmartPointer< Self > Pointer; - typedef unsigned char U8; - typedef signed char S8; - typedef unsigned short U16; - typedef signed short S16; + typedef uint8_t U8; + typedef int8_t S8; + typedef uint16_t U16; + typedef int16_t S16; typedef unsigned int U32; typedef signed int S32; typedef uint64_t U64; @@ -91,7 +91,7 @@ class ITK_EXPORT IPLCommonImageIO:public ImageIOBase virtual void Read(void *buffer); /** Compute the size (in bytes) of the components of a pixel. For - * example, and RGB pixel of unsigned char would have a + * example, and RGB pixel of uint8_t would have a * component size of 1 byte. */ virtual unsigned int GetComponentSize() const; diff --git a/Modules/IO/ImageBase/include/itkIOTestHelper.h b/Modules/IO/ImageBase/include/itkIOTestHelper.h index d93942348c1..548d87d9973 100644 --- a/Modules/IO/ImageBase/include/itkIOTestHelper.h +++ b/Modules/IO/ImageBase/include/itkIOTestHelper.h @@ -97,11 +97,11 @@ class IOTestHelper // // generate random pixels of various types static void - RandomPix(vnl_random &randgen,itk::RGBPixel &pix) + RandomPix(vnl_random &randgen,itk::RGBPixel &pix) { for(unsigned int i = 0; i < 3; i++) { - pix[i] = randgen.lrand32(itk::NumericTraits::max()); + pix[i] = randgen.lrand32(itk::NumericTraits::max()); } } diff --git a/Modules/IO/ImageBase/include/itkImageFileReader.hxx b/Modules/IO/ImageBase/include/itkImageFileReader.hxx index bd15797b818..080d1dbd802 100644 --- a/Modules/IO/ImageBase/include/itkImageFileReader.hxx +++ b/Modules/IO/ImageBase/include/itkImageFileReader.hxx @@ -524,9 +524,9 @@ ImageFileReader< TOutputImage, ConvertPixelTraits > } if(0) {} - ITK_CONVERT_BUFFER_IF_BLOCK(ImageIOBase::UCHAR,unsigned char) + ITK_CONVERT_BUFFER_IF_BLOCK(ImageIOBase::UCHAR,uint8_t) ITK_CONVERT_BUFFER_IF_BLOCK(ImageIOBase::CHAR,char) - ITK_CONVERT_BUFFER_IF_BLOCK(ImageIOBase::USHORT,unsigned short) + ITK_CONVERT_BUFFER_IF_BLOCK(ImageIOBase::USHORT,uint16_t) ITK_CONVERT_BUFFER_IF_BLOCK(ImageIOBase::SHORT,short) ITK_CONVERT_BUFFER_IF_BLOCK(ImageIOBase::UINT,unsigned int) ITK_CONVERT_BUFFER_IF_BLOCK(ImageIOBase::INT,int) @@ -546,9 +546,9 @@ ImageFileReader< TOutputImage, ConvertPixelTraits > << std::endl << " " << m_ImageIO->GetComponentTypeAsString( m_ImageIO->GetComponentType() ) << std::endl << "to one of: " - << std::endl << " " << TYPENAME( unsigned char ) + << std::endl << " " << TYPENAME( uint8_t ) << std::endl << " " << TYPENAME( char ) - << std::endl << " " << TYPENAME( unsigned short ) + << std::endl << " " << TYPENAME( uint16_t ) << std::endl << " " << TYPENAME( short ) << std::endl << " " << TYPENAME( unsigned int ) << std::endl << " " << TYPENAME( int ) diff --git a/Modules/IO/ImageBase/include/itkImageIOBase.h b/Modules/IO/ImageBase/include/itkImageIOBase.h index 9195edf4fce..478ef422965 100644 --- a/Modules/IO/ImageBase/include/itkImageIOBase.h +++ b/Modules/IO/ImageBase/include/itkImageIOBase.h @@ -295,7 +295,7 @@ class ITK_EXPORT ImageIOBase:public LightProcessObject SizeType GetImageSizeInComponents() const; /** Compute the size (in bytes) of the components of a pixel. For - * example, and RGB pixel of unsigned char would have a + * example, and RGB pixel of uint8_t would have a * component size of 1 byte. This method can be invoked only after * the component type is set. */ virtual unsigned int GetComponentSize() const; @@ -586,7 +586,7 @@ class ITK_EXPORT ImageIOBase:public LightProcessObject const unsigned int *dimensions); /** Compute the size (in bytes) of the pixel. For - * example, and RGB pixel of unsigned char would have size 3 bytes. */ + * example, and RGB pixel of uint8_t would have size 3 bytes. */ virtual unsigned int GetPixelSize() const; /** Calculates the different strides (distance from one thing to the next). @@ -654,9 +654,9 @@ class ITK_EXPORT ImageIOBase:public LightProcessObject } IMAGEIOBASE_TYPEMAP(char, CHAR); -IMAGEIOBASE_TYPEMAP(unsigned char, UCHAR); +IMAGEIOBASE_TYPEMAP(uint8_t, UCHAR); IMAGEIOBASE_TYPEMAP(short, SHORT); -IMAGEIOBASE_TYPEMAP(unsigned short, USHORT); +IMAGEIOBASE_TYPEMAP(uint16_t, USHORT); IMAGEIOBASE_TYPEMAP(int, INT); IMAGEIOBASE_TYPEMAP(unsigned int, UINT); IMAGEIOBASE_TYPEMAP(long, LONG); diff --git a/Modules/IO/ImageBase/src/itkIOCommon.cxx b/Modules/IO/ImageBase/src/itkIOCommon.cxx index e3a0ad2d67c..9d96476e36b 100644 --- a/Modules/IO/ImageBase/src/itkIOCommon.cxx +++ b/Modules/IO/ImageBase/src/itkIOCommon.cxx @@ -54,13 +54,13 @@ ::AtomicPixelTypeToString(const AtomicPixelType pixelType) switch ( pixelType ) { case ITK_UCHAR: - return "unsigned char"; + return "uint8_t"; break; case ITK_CHAR: return "char"; break; case ITK_USHORT: - return "unsigned short"; + return "uint16_t"; break; case ITK_SHORT: return "short"; @@ -98,13 +98,13 @@ ::ComputeSizeOfAtomicPixelType(const AtomicPixelType pixelType) return static_cast< unsigned int >( sizeof( char ) ); break; case ITK_UCHAR: - return static_cast< unsigned int >( sizeof( unsigned char ) ); + return static_cast< unsigned int >( sizeof( uint8_t ) ); break; case ITK_SHORT: return static_cast< unsigned int >( sizeof( short ) ); break; case ITK_USHORT: - return static_cast< unsigned int >( sizeof( unsigned short ) ); + return static_cast< unsigned int >( sizeof( uint16_t ) ); break; case ITK_INT: return static_cast< unsigned int >( sizeof( int ) ); diff --git a/Modules/IO/ImageBase/src/itkImageIOBase.cxx b/Modules/IO/ImageBase/src/itkImageIOBase.cxx index cec358c66b6..e9795a554ee 100644 --- a/Modules/IO/ImageBase/src/itkImageIOBase.cxx +++ b/Modules/IO/ImageBase/src/itkImageIOBase.cxx @@ -171,11 +171,11 @@ const std::type_info & ImageIOBase::GetComponentTypeInfo() const switch ( m_ComponentType ) { case UCHAR: - return typeid( unsigned char ); + return typeid( uint8_t ); case CHAR: return typeid( char ); case USHORT: - return typeid( unsigned short ); + return typeid( uint16_t ); case SHORT: return typeid( short ); case UINT: @@ -339,11 +339,11 @@ unsigned int ImageIOBase::GetComponentSize() const switch ( m_ComponentType ) { case UCHAR: - return sizeof( unsigned char ); + return sizeof( uint8_t ); case CHAR: return sizeof( char ); case USHORT: - return sizeof( unsigned short ); + return sizeof( uint16_t ); case SHORT: return sizeof( short ); case UINT: @@ -579,7 +579,7 @@ void ImageIOBase::WriteBufferAsASCII(std::ostream & os, const void *buffer, { case UCHAR: { - typedef const unsigned char *Type; + typedef const uint8_t *Type; Type buf = reinterpret_cast< Type >( buffer ); WriteBuffer(os, buf, numComp); } @@ -594,7 +594,7 @@ void ImageIOBase::WriteBufferAsASCII(std::ostream & os, const void *buffer, case USHORT: { - typedef const unsigned short *Type; + typedef const uint16_t *Type; Type buf = reinterpret_cast< Type >( buffer ); WriteBuffer(os, buf, numComp); } @@ -682,7 +682,7 @@ void ImageIOBase::ReadBufferAsASCII(std::istream & is, void *buffer, { case UCHAR: { - unsigned char *buf = reinterpret_cast< unsigned char * >( buffer ); + uint8_t *buf = reinterpret_cast< uint8_t * >( buffer ); ReadBuffer(is, buf, numComp); } break; @@ -695,7 +695,7 @@ void ImageIOBase::ReadBufferAsASCII(std::istream & is, void *buffer, case USHORT: { - unsigned short *buf = reinterpret_cast< unsigned short * >( buffer ); + uint16_t *buf = reinterpret_cast< uint16_t * >( buffer ); ReadBuffer(is, buf, numComp); } break; diff --git a/Modules/IO/ImageBase/test/itkFileFreeImageIO.cxx b/Modules/IO/ImageBase/test/itkFileFreeImageIO.cxx index cc4e657d086..eaf324abeed 100644 --- a/Modules/IO/ImageBase/test/itkFileFreeImageIO.cxx +++ b/Modules/IO/ImageBase/test/itkFileFreeImageIO.cxx @@ -178,7 +178,7 @@ void FileFreeImageIO ::Read(void *buffer) { - memset(buffer, (unsigned char) 175, this->GetImageSizeInBytes()); + memset(buffer, (uint8_t) 175, this->GetImageSizeInBytes()); } bool diff --git a/Modules/IO/ImageBase/test/itkIOCommonTest2.cxx b/Modules/IO/ImageBase/test/itkIOCommonTest2.cxx index 37e11f23b8a..0e777c1c3a5 100644 --- a/Modules/IO/ImageBase/test/itkIOCommonTest2.cxx +++ b/Modules/IO/ImageBase/test/itkIOCommonTest2.cxx @@ -26,9 +26,9 @@ int itkIOCommonTest2(int, char *[]) // Test the atomic pixel type to string conversions { std::string unsignedCharPixelType = itk::IOCommon::AtomicPixelTypeToString(itk::IOCommon::ITK_UCHAR); - if ( unsignedCharPixelType.compare("unsigned char") != 0 ) + if ( unsignedCharPixelType.compare("uint8_t") != 0 ) { - std::cerr << "AtomicPixelTypeToString(ITK_UCHAR) should return 'unsigned char'"; + std::cerr << "AtomicPixelTypeToString(ITK_UCHAR) should return 'uint8_t'"; return EXIT_FAILURE; } @@ -40,9 +40,9 @@ int itkIOCommonTest2(int, char *[]) } std::string unsignedShortPixelType = itk::IOCommon::AtomicPixelTypeToString(itk::IOCommon::ITK_USHORT); - if ( unsignedShortPixelType.compare("unsigned short") != 0 ) + if ( unsignedShortPixelType.compare("uint16_t") != 0 ) { - std::cerr << "AtomicPixelTypeToString(ITK_USHORT) should return 'unsigned short"; + std::cerr << "AtomicPixelTypeToString(ITK_USHORT) should return 'uint16_t"; return EXIT_FAILURE; } @@ -99,21 +99,21 @@ int itkIOCommonTest2(int, char *[]) // Test the atomic pixel type size computation { unsigned int unsignedCharPixelTypeSize = itk::IOCommon::ComputeSizeOfAtomicPixelType(itk::IOCommon::ITK_UCHAR); - if ( unsignedCharPixelTypeSize != static_cast< unsigned char >( sizeof( unsigned char ) ) ) + if ( unsignedCharPixelTypeSize != static_cast< uint8_t >( sizeof( uint8_t ) ) ) { std::cerr << "ComputeSizeOfAtomicPixelType(ITK_UCHAR) is not returning the correct pixel size "; return EXIT_FAILURE; } unsigned int charPixelTypeSize = itk::IOCommon::ComputeSizeOfAtomicPixelType(itk::IOCommon::ITK_CHAR); - if ( charPixelTypeSize != static_cast< unsigned int >( sizeof( unsigned char ) ) ) + if ( charPixelTypeSize != static_cast< unsigned int >( sizeof( uint8_t ) ) ) { std::cerr << "ComputeSizeOfAtomicPixelType(ITK_CHAR) is not returning the correct pixel size "; return EXIT_FAILURE; } unsigned int unsignedShortPixelTypeSize = itk::IOCommon::ComputeSizeOfAtomicPixelType(itk::IOCommon::ITK_USHORT); - if ( unsignedShortPixelTypeSize != static_cast< unsigned int >( sizeof( unsigned short ) ) ) + if ( unsignedShortPixelTypeSize != static_cast< unsigned int >( sizeof( uint16_t ) ) ) { std::cerr << "ComputeSizeOfAtomicPixelType(ITK_USHORT) is not returning the correct pixel size "; return EXIT_FAILURE; diff --git a/Modules/IO/ImageBase/test/itkIOPluginTest.cxx b/Modules/IO/ImageBase/test/itkIOPluginTest.cxx index c3098227c00..e18d0e11270 100644 --- a/Modules/IO/ImageBase/test/itkIOPluginTest.cxx +++ b/Modules/IO/ImageBase/test/itkIOPluginTest.cxx @@ -79,7 +79,7 @@ int itkIOPluginTest(int argc, char *argv[]) return EXIT_FAILURE; } - typedef itk::Image ImageNDType; + typedef itk::Image ImageNDType; typedef itk::ImageFileReader ReaderType; typedef itk::ImageFileWriter WriterType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/IO/ImageBase/test/itkImageFileReaderStreamingTest.cxx b/Modules/IO/ImageBase/test/itkImageFileReaderStreamingTest.cxx index 4fd87fa8782..622f8afe5d1 100644 --- a/Modules/IO/ImageBase/test/itkImageFileReaderStreamingTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileReaderStreamingTest.cxx @@ -50,7 +50,7 @@ int itkImageFileReaderStreamingTest(int argc, char* argv[]) } - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; diff --git a/Modules/IO/ImageBase/test/itkImageFileReaderStreamingTest2.cxx b/Modules/IO/ImageBase/test/itkImageFileReaderStreamingTest2.cxx index 189d610193c..addef8a81ed 100644 --- a/Modules/IO/ImageBase/test/itkImageFileReaderStreamingTest2.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileReaderStreamingTest2.cxx @@ -24,7 +24,7 @@ #include "itkTestingComparisonImageFilter.h" #include "itkExtractImageFilter.h" -typedef unsigned char PixelType; +typedef uint8_t PixelType; typedef itk::Image ImageType; typedef ImageType::ConstPointer ImageConstPointer; diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest1.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest1.cxx index 1118123f4e8..4a3e9b20340 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest1.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest1.cxx @@ -31,7 +31,7 @@ int itkImageFileWriterPastingTest1(int argc, char* argv[]) // We remove the output file itksys::SystemTools::RemoveFile(argv[2]); - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest2.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest2.cxx index 00dcefca46d..2e4088eb1ce 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest2.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest2.cxx @@ -23,7 +23,7 @@ #include "itkExtractImageFilter.h" #include "itkPipelineMonitorImageFilter.h" -typedef unsigned char PixelType; +typedef uint8_t PixelType; typedef itk::Image ImageType; typedef ImageType::Pointer ImagePointer; diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest3.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest3.cxx index 86e048a5fe1..408a0db94c1 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest3.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest3.cxx @@ -22,7 +22,7 @@ #include "itkTestingComparisonImageFilter.h" #include "itkExtractImageFilter.h" -typedef unsigned char PixelType; +typedef uint8_t PixelType; typedef itk::Image ImageType; typedef ImageType::Pointer ImagePointer; diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterStreamingPastingCompressingTest1.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterStreamingPastingCompressingTest1.cxx index 5b56b2f3e20..11260b66a66 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterStreamingPastingCompressingTest1.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterStreamingPastingCompressingTest1.cxx @@ -25,7 +25,7 @@ const unsigned int VDimension = 3; -typedef unsigned char PixelType; +typedef uint8_t PixelType; typedef itk::Image ImageType; typedef ImageType::Pointer ImagePointer; typedef ImageType::SpacingType SpacingType; @@ -111,7 +111,7 @@ ActualTest( // NOTE ALEX: should we check it exists first? itksys::SystemTools::RemoveFile(outputFileName.c_str()); - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterStreamingTest1.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterStreamingTest1.cxx index 53caf76bbd5..a5fa370d6dd 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterStreamingTest1.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterStreamingTest1.cxx @@ -52,7 +52,7 @@ int itkImageFileWriterStreamingTest1(int argc, char* argv[]) } - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterStreamingTest2.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterStreamingTest2.cxx index e169c4bbf3f..78265002803 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterStreamingTest2.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterStreamingTest2.cxx @@ -23,7 +23,7 @@ #include "itkTestingComparisonImageFilter.h" -typedef unsigned char PixelType; +typedef uint8_t PixelType; typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterTest2.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterTest2.cxx index c96bb454dfc..981de5fc8f3 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterTest2.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterTest2.cxx @@ -28,7 +28,7 @@ int itkImageFileWriterTest2(int ac, char* av[]) return EXIT_FAILURE; } - typedef itk::Image ImageNDType; + typedef itk::Image ImageNDType; typedef itk::ImageFileWriter WriterType; typedef itk::ImageFileReader ReaderType; diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterUpdateLargestPossibleRegionTest.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterUpdateLargestPossibleRegionTest.cxx index 525eda281ca..1e8664f6f70 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterUpdateLargestPossibleRegionTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterUpdateLargestPossibleRegionTest.cxx @@ -30,7 +30,7 @@ int itkImageFileWriterUpdateLargestPossibleRegionTest(int argc, char* argv[]) // We remove the output file itksys::SystemTools::RemoveFile(argv[2]); - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; diff --git a/Modules/IO/ImageBase/test/itkImageIODirection2DTest.cxx b/Modules/IO/ImageBase/test/itkImageIODirection2DTest.cxx index 398702f6fc9..24379caefea 100644 --- a/Modules/IO/ImageBase/test/itkImageIODirection2DTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageIODirection2DTest.cxx @@ -34,7 +34,7 @@ int itkImageIODirection2DTest( int ac, char * av[] ) } const unsigned int Dimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/IO/ImageBase/test/itkImageIODirection3DTest.cxx b/Modules/IO/ImageBase/test/itkImageIODirection3DTest.cxx index dc0f351944b..14fca8ddc55 100644 --- a/Modules/IO/ImageBase/test/itkImageIODirection3DTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageIODirection3DTest.cxx @@ -34,7 +34,7 @@ int itkImageIODirection3DTest( int ac, char * av[] ) } const unsigned int Dimension = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/IO/ImageBase/test/itkImageSeriesReaderVectorTest.cxx b/Modules/IO/ImageBase/test/itkImageSeriesReaderVectorTest.cxx index b7cca253447..2a8c0159fcd 100644 --- a/Modules/IO/ImageBase/test/itkImageSeriesReaderVectorTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageSeriesReaderVectorTest.cxx @@ -27,8 +27,8 @@ int itkImageSeriesReaderVectorTest(int ac, char* av[]) return EXIT_FAILURE; } - typedef itk::VectorImage< unsigned short, 3> VectorImageType; - typedef itk::Image< itk::Vector, 3 > ImageOfVectorType; + typedef itk::VectorImage< uint16_t, 3> VectorImageType; + typedef itk::Image< itk::Vector, 3 > ImageOfVectorType; typedef itk::ImageSeriesReader VectorImageSeriesReader; typedef itk::ImageSeriesReader ImageOfVectorSeriesReader; diff --git a/Modules/IO/ImageBase/test/itkImageSeriesWriterTest.cxx b/Modules/IO/ImageBase/test/itkImageSeriesWriterTest.cxx index a43af3021f4..fc38c027720 100644 --- a/Modules/IO/ImageBase/test/itkImageSeriesWriterTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageSeriesWriterTest.cxx @@ -63,7 +63,7 @@ int itkImageSeriesWriterTest(int ac, char* av[]) return EXIT_FAILURE; } - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< WritePixelType, 3 > RescaleImageType; typedef itk::Image< WritePixelType, 2 > OutputImageType; diff --git a/Modules/IO/ImageBase/test/itkLargeImageWriteConvertReadTest.cxx b/Modules/IO/ImageBase/test/itkLargeImageWriteConvertReadTest.cxx index 7b6e81ebaf8..329ef026364 100644 --- a/Modules/IO/ImageBase/test/itkLargeImageWriteConvertReadTest.cxx +++ b/Modules/IO/ImageBase/test/itkLargeImageWriteConvertReadTest.cxx @@ -28,9 +28,9 @@ int itkLargeImageWriteConvertReadTest(int ac, char* av[]) std::cout << "usage: itkIOTests itkLargeImageWriteConvertReadTest outputFileName numberOfPixelsInOneDimension" << std::endl; return EXIT_FAILURE; } - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image OutputImageType; - typedef itk::Image InputImageType; + typedef itk::Image InputImageType; typedef itk::ImageFileWriter< OutputImageType > WriterType; typedef itk::ImageFileReader< InputImageType > ReaderType; diff --git a/Modules/IO/ImageBase/test/itkLargeImageWriteReadTest.cxx b/Modules/IO/ImageBase/test/itkLargeImageWriteReadTest.cxx index fc665f502c1..04ea3ac0488 100644 --- a/Modules/IO/ImageBase/test/itkLargeImageWriteReadTest.cxx +++ b/Modules/IO/ImageBase/test/itkLargeImageWriteReadTest.cxx @@ -172,7 +172,7 @@ int itkLargeImageWriteReadTest(int ac, char* argv[]) { const unsigned int Dimension = 2; - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image< PixelType, Dimension> ImageType; ImageType::SizeType size; @@ -186,7 +186,7 @@ int itkLargeImageWriteReadTest(int ac, char* argv[]) { const unsigned int Dimension = 3; - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image< PixelType, Dimension> ImageType; ImageType::SizeType size; diff --git a/Modules/IO/ImageBase/test/itkNoiseImageFilterTest.cxx b/Modules/IO/ImageBase/test/itkNoiseImageFilterTest.cxx index 9303ad74bb3..d56b7360704 100644 --- a/Modules/IO/ImageBase/test/itkNoiseImageFilterTest.cxx +++ b/Modules/IO/ImageBase/test/itkNoiseImageFilterTest.cxx @@ -36,9 +36,9 @@ int itkNoiseImageFilterTest(int ac, char* av[] ) } itk::Size<2> radius; - typedef itk::Image myImageIn; + typedef itk::Image myImageIn; typedef itk::Image myImageOut; - typedef itk::Image myImageChar; + typedef itk::Image myImageChar; itk::ImageFileReader::Pointer input = itk::ImageFileReader::New(); input->SetFileName(av[1]); diff --git a/Modules/IO/ImageBase/test/itkReadWriteImageWithDictionaryTest.cxx b/Modules/IO/ImageBase/test/itkReadWriteImageWithDictionaryTest.cxx index c0880447fb4..7e4fa5b56f9 100644 --- a/Modules/IO/ImageBase/test/itkReadWriteImageWithDictionaryTest.cxx +++ b/Modules/IO/ImageBase/test/itkReadWriteImageWithDictionaryTest.cxx @@ -29,7 +29,7 @@ int itkReadWriteImageWithDictionaryTest(int argc, char* argv[]) return EXIT_FAILURE; } - typedef itk::Image< unsigned char, 3 > ImageType; + typedef itk::Image< uint8_t, 3 > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; typedef itk::ImageFileWriter< ImageType > WriterType; diff --git a/Modules/IO/JPEG/src/itkJPEGImageIO.cxx b/Modules/IO/JPEG/src/itkJPEGImageIO.cxx index bd94efd344d..b948db99a77 100644 --- a/Modules/IO/JPEG/src/itkJPEGImageIO.cxx +++ b/Modules/IO/JPEG/src/itkJPEGImageIO.cxx @@ -127,7 +127,7 @@ bool JPEGImageIO::CanReadFile(const char *file) } // read the first two bytes - unsigned char magic[2]; + uint8_t magic[2]; int n = static_cast< int >( fread(magic, sizeof( magic ), 1, JPEGfp.m_FilePointer) ); if ( n != 1 ) { @@ -425,7 +425,7 @@ void JPEGImageIO::Write(const void *buffer) if ( this->GetComponentType() != UCHAR && this->GetComponentType() != UINT ) { - itkExceptionMacro(<< "JPEG supports unsigned char/int only"); + itkExceptionMacro(<< "JPEG supports uint8_t/int only"); } this->WriteSlice(m_FileName, buffer); diff --git a/Modules/IO/JPEG/test/itkJPEGImageIOTest.cxx b/Modules/IO/JPEG/test/itkJPEGImageIOTest.cxx index 5b4f92811c9..84c112b823f 100644 --- a/Modules/IO/JPEG/test/itkJPEGImageIOTest.cxx +++ b/Modules/IO/JPEG/test/itkJPEGImageIOTest.cxx @@ -34,7 +34,7 @@ int itkJPEGImageIOTest( int ac, char* av[] ) // ATTENTION THIS IS THE PIXEL TYPE FOR // THE RESULTING IMAGE - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image myImage; diff --git a/Modules/IO/LSM/src/itkLSMImageIO.cxx b/Modules/IO/LSM/src/itkLSMImageIO.cxx index 08574a0d3b6..5437ec9f69d 100644 --- a/Modules/IO/LSM/src/itkLSMImageIO.cxx +++ b/Modules/IO/LSM/src/itkLSMImageIO.cxx @@ -172,8 +172,8 @@ void LSMImageIO::ReadImageInformation() short tif_cz_lsminfo_size; void *praw = this->TIFFImageIO::ReadRawByteFromTag(TIF_CZ_LSMINFO, tif_cz_lsminfo_size); // FIXME byte swap - ByteSwapper< unsigned short >::SwapRangeFromSystemToLittleEndian( - reinterpret_cast< unsigned short * >( praw ), tif_cz_lsminfo_size / 2); + ByteSwapper< uint16_t >::SwapRangeFromSystemToLittleEndian( + reinterpret_cast< uint16_t * >( praw ), tif_cz_lsminfo_size / 2); const zeiss_info *zi = reinterpret_cast< zeiss_info * >( praw ); if ( sizeof( *zi ) != TIF_CZ_LSMINFO_SIZE ) { @@ -242,7 +242,7 @@ void LSMImageIO::FillZeissStruct(char *cz) void LSMImageIO::Write(const void *buffer) { - unsigned char *outPtr = (unsigned char *)buffer; + uint8_t *outPtr = (uint8_t *)buffer; unsigned int width, height, page, pages = 1; @@ -268,7 +268,7 @@ void LSMImageIO::Write(const void *buffer) break; default: - itkExceptionMacro(<< "TIFF supports unsigned char and unsigned short"); + itkExceptionMacro(<< "TIFF supports uint8_t and uint16_t"); } int predictor; @@ -386,13 +386,13 @@ void LSMImageIO::Write(const void *buffer) switch ( this->GetComponentType() ) { case UCHAR: - rowLength = sizeof( unsigned char ); + rowLength = sizeof( uint8_t ); break; case USHORT: - rowLength = sizeof( unsigned short ); + rowLength = sizeof( uint16_t ); break; default: - itkExceptionMacro(<< "TIFF supports unsigned char and unsigned short"); + itkExceptionMacro(<< "TIFF supports uint8_t and uint16_t"); } rowLength *= this->GetNumberOfComponents(); @@ -401,7 +401,7 @@ void LSMImageIO::Write(const void *buffer) int row = 0; for ( unsigned int idx2 = 0; idx2 < height; idx2++ ) { - if ( TIFFWriteScanline(tif, const_cast< unsigned char * >( outPtr ), row, 0) < 0 ) + if ( TIFFWriteScanline(tif, const_cast< uint8_t * >( outPtr ), row, 0) < 0 ) { itkExceptionMacro(<< "TIFFImageIO: error out of disk space"); break; diff --git a/Modules/IO/LSM/test/itkLSMImageIOTest.cxx b/Modules/IO/LSM/test/itkLSMImageIOTest.cxx index 3b77e4c6baf..a3502b4dbd1 100644 --- a/Modules/IO/LSM/test/itkLSMImageIOTest.cxx +++ b/Modules/IO/LSM/test/itkLSMImageIOTest.cxx @@ -30,7 +30,7 @@ int itkLSMImageIOTest(int argc, char* argv[]) return EXIT_FAILURE; } - typedef itk::RGBPixel< unsigned char > InputPixelType; + typedef itk::RGBPixel< uint8_t > InputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::ImageFileReader< InputImageType > ReaderType; typedef itk::LSMImageIO ImageIOType; diff --git a/Modules/IO/Mesh/include/itkMeshConvertPixelTraits.h b/Modules/IO/Mesh/include/itkMeshConvertPixelTraits.h index d30a36bf0c3..e5f7ae4e5de 100644 --- a/Modules/IO/Mesh/include/itkMeshConvertPixelTraits.h +++ b/Modules/IO/Mesh/include/itkMeshConvertPixelTraits.h @@ -103,9 +103,9 @@ template<> \ ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(char) ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(short) ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(unsigned int) - ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(signed char) - ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(unsigned char) - ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(unsigned short) + ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(int8_t) + ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(uint8_t) + ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(uint16_t) ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(long) ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(unsigned long) ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(bool) @@ -202,10 +202,10 @@ template<> \ #define ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_TYPES_MACRO(ArrayType) \ ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_MACRO(ArrayType, char); \ - ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_MACRO(ArrayType, signed char); \ - ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_MACRO(ArrayType, unsigned char); \ + ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_MACRO(ArrayType, int8_t); \ + ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_MACRO(ArrayType, uint8_t); \ ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_MACRO(ArrayType, short); \ - ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_MACRO(ArrayType, unsigned short); \ + ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_MACRO(ArrayType, uint16_t); \ ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_MACRO(ArrayType, int); \ ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_MACRO(ArrayType, unsigned int); \ ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_MACRO(ArrayType, long); \ @@ -276,10 +276,10 @@ template<> #define ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_TYPES_MACRO(ArrayType) \ ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_MACRO(ArrayType, char); \ - ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_MACRO(ArrayType, signed char); \ - ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_MACRO(ArrayType, unsigned char); \ + ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_MACRO(ArrayType, int8_t); \ + ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_MACRO(ArrayType, uint8_t); \ ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_MACRO(ArrayType, short); \ - ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_MACRO(ArrayType, unsigned short); \ + ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_MACRO(ArrayType, uint16_t); \ ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_MACRO(ArrayType, int); \ ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_MACRO(ArrayType, unsigned int); \ ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_MACRO(ArrayType, long); \ @@ -349,8 +349,8 @@ template<> ITK_MESH_DEFAULTCONVERTTRAITS_COMPLEX_TYPE(double); ITK_MESH_DEFAULTCONVERTTRAITS_COMPLEX_TYPE(signed int); ITK_MESH_DEFAULTCONVERTTRAITS_COMPLEX_TYPE(unsigned int); - ITK_MESH_DEFAULTCONVERTTRAITS_COMPLEX_TYPE(signed char); - ITK_MESH_DEFAULTCONVERTTRAITS_COMPLEX_TYPE(unsigned char); + ITK_MESH_DEFAULTCONVERTTRAITS_COMPLEX_TYPE(int8_t); + ITK_MESH_DEFAULTCONVERTTRAITS_COMPLEX_TYPE(uint8_t); ITK_MESH_DEFAULTCONVERTTRAITS_COMPLEX_TYPE(signed long); ITK_MESH_DEFAULTCONVERTTRAITS_COMPLEX_TYPE(unsigned long); @@ -385,10 +385,10 @@ template<> #define ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE_ALL_TYPES_MACRO(ArrayType) \ ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE(ArrayType, char); \ - ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE(ArrayType, signed char); \ - ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE(ArrayType, unsigned char); \ + ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE(ArrayType, int8_t); \ + ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE(ArrayType, uint8_t); \ ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE(ArrayType, short); \ - ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE(ArrayType, unsigned short); \ + ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE(ArrayType, uint16_t); \ ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE(ArrayType, int); \ ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE(ArrayType, unsigned int); \ ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE(ArrayType, long); \ diff --git a/Modules/IO/Mesh/include/itkMeshFileReader.hxx b/Modules/IO/Mesh/include/itkMeshFileReader.hxx index c6c4e001654..83f06846fc8 100644 --- a/Modules/IO/Mesh/include/itkMeshFileReader.hxx +++ b/Modules/IO/Mesh/include/itkMeshFileReader.hxx @@ -601,7 +601,7 @@ MeshFileReader< TOutputMesh, ConvertPointPixelTraits, ConvertCellPixelTraits > } case MeshIOBase::UCHAR: { - unsigned char *pointsBuffer = new unsigned char[m_MeshIO->GetNumberOfPoints() * OutputPointDimension]; + uint8_t *pointsBuffer = new uint8_t[m_MeshIO->GetNumberOfPoints() * OutputPointDimension]; m_MeshIO->ReadPoints( static_cast< void * >( pointsBuffer ) ); ReadPoints(pointsBuffer); delete[] pointsBuffer; @@ -617,7 +617,7 @@ MeshFileReader< TOutputMesh, ConvertPointPixelTraits, ConvertCellPixelTraits > } case MeshIOBase::USHORT: { - unsigned short *pointsBuffer = new unsigned short[m_MeshIO->GetNumberOfPoints() * OutputPointDimension]; + uint16_t *pointsBuffer = new uint16_t[m_MeshIO->GetNumberOfPoints() * OutputPointDimension]; m_MeshIO->ReadPoints( static_cast< void * >( pointsBuffer ) ); ReadPoints(pointsBuffer); delete[] pointsBuffer; @@ -718,7 +718,7 @@ MeshFileReader< TOutputMesh, ConvertPointPixelTraits, ConvertCellPixelTraits > } case MeshIOBase::UCHAR: { - unsigned char *cellsBuffer = new unsigned char[m_MeshIO->GetCellBufferSize()]; + uint8_t *cellsBuffer = new uint8_t[m_MeshIO->GetCellBufferSize()]; m_MeshIO->ReadCells( static_cast< void * >( cellsBuffer ) ); ReadCells(cellsBuffer); delete[] cellsBuffer; @@ -734,7 +734,7 @@ MeshFileReader< TOutputMesh, ConvertPointPixelTraits, ConvertCellPixelTraits > } case MeshIOBase::USHORT: { - unsigned short *cellsBuffer = new unsigned short[m_MeshIO->GetCellBufferSize()]; + uint16_t *cellsBuffer = new uint16_t[m_MeshIO->GetCellBufferSize()]; m_MeshIO->ReadCells( static_cast< void * >( cellsBuffer ) ); ReadCells(cellsBuffer); delete[] cellsBuffer; @@ -867,9 +867,9 @@ MeshFileReader< TOutputMesh, ConvertPointPixelTraits, ConvertCellPixelTraits > if ( 0 ) {} - ITK_CONVERT_POINT_PIXEL_BUFFER_IF_BLOCK(MeshIOBase::UCHAR, unsigned char) + ITK_CONVERT_POINT_PIXEL_BUFFER_IF_BLOCK(MeshIOBase::UCHAR, uint8_t) ITK_CONVERT_POINT_PIXEL_BUFFER_IF_BLOCK(MeshIOBase::CHAR, char) - ITK_CONVERT_POINT_PIXEL_BUFFER_IF_BLOCK(MeshIOBase::USHORT, unsigned short) + ITK_CONVERT_POINT_PIXEL_BUFFER_IF_BLOCK(MeshIOBase::USHORT, uint16_t) ITK_CONVERT_POINT_PIXEL_BUFFER_IF_BLOCK(MeshIOBase::SHORT, short) ITK_CONVERT_POINT_PIXEL_BUFFER_IF_BLOCK(MeshIOBase::UINT, unsigned int) ITK_CONVERT_POINT_PIXEL_BUFFER_IF_BLOCK(MeshIOBase::INT, int) @@ -888,9 +888,9 @@ MeshFileReader< TOutputMesh, ConvertPointPixelTraits, ConvertCellPixelTraits > << std::endl << " " << m_MeshIO->GetComponentTypeAsString( m_MeshIO->GetPointPixelComponentType() ) << std::endl << "to one of: " - << std::endl << " " << m_MeshIO->GetComponentTypeAsString(MeshIOBase::MapComponentType< unsigned char >::CType) + << std::endl << " " << m_MeshIO->GetComponentTypeAsString(MeshIOBase::MapComponentType< uint8_t >::CType) << std::endl << " " << m_MeshIO->GetComponentTypeAsString(MeshIOBase::MapComponentType< char >::CType) - << std::endl << " " << m_MeshIO->GetComponentTypeAsString(MeshIOBase::MapComponentType< unsigned short >::CType) + << std::endl << " " << m_MeshIO->GetComponentTypeAsString(MeshIOBase::MapComponentType< uint16_t >::CType) << std::endl << " " << m_MeshIO->GetComponentTypeAsString(MeshIOBase::MapComponentType< short >::CType) << std::endl << " " << m_MeshIO->GetComponentTypeAsString(MeshIOBase::MapComponentType< unsigned int >::CType) << std::endl << " " << m_MeshIO->GetComponentTypeAsString(MeshIOBase::MapComponentType< int >::CType) @@ -944,9 +944,9 @@ MeshFileReader< TOutputMesh, ConvertPointPixelTraits, ConvertCellPixelTraits > if ( 0 ) {} - ITK_CONVERT_CELL_PIXEL_BUFFER_IF_BLOCK(MeshIOBase::UCHAR, unsigned char) + ITK_CONVERT_CELL_PIXEL_BUFFER_IF_BLOCK(MeshIOBase::UCHAR, uint8_t) ITK_CONVERT_CELL_PIXEL_BUFFER_IF_BLOCK(MeshIOBase::CHAR, char) - ITK_CONVERT_CELL_PIXEL_BUFFER_IF_BLOCK(MeshIOBase::USHORT, unsigned short) + ITK_CONVERT_CELL_PIXEL_BUFFER_IF_BLOCK(MeshIOBase::USHORT, uint16_t) ITK_CONVERT_CELL_PIXEL_BUFFER_IF_BLOCK(MeshIOBase::SHORT, short) ITK_CONVERT_CELL_PIXEL_BUFFER_IF_BLOCK(MeshIOBase::UINT, unsigned int) ITK_CONVERT_CELL_PIXEL_BUFFER_IF_BLOCK(MeshIOBase::INT, int) @@ -965,9 +965,9 @@ MeshFileReader< TOutputMesh, ConvertPointPixelTraits, ConvertCellPixelTraits > << std::endl << " " << m_MeshIO->GetComponentTypeAsString( m_MeshIO->GetCellPixelComponentType() ) << std::endl << "to one of: " - << std::endl << " " << m_MeshIO->GetComponentTypeAsString(MeshIOBase::MapComponentType< unsigned char >::CType) + << std::endl << " " << m_MeshIO->GetComponentTypeAsString(MeshIOBase::MapComponentType< uint8_t >::CType) << std::endl << " " << m_MeshIO->GetComponentTypeAsString(MeshIOBase::MapComponentType< char >::CType) - << std::endl << " " << m_MeshIO->GetComponentTypeAsString(MeshIOBase::MapComponentType< unsigned short >::CType) + << std::endl << " " << m_MeshIO->GetComponentTypeAsString(MeshIOBase::MapComponentType< uint16_t >::CType) << std::endl << " " << m_MeshIO->GetComponentTypeAsString(MeshIOBase::MapComponentType< short >::CType) << std::endl << " " << m_MeshIO->GetComponentTypeAsString(MeshIOBase::MapComponentType< unsigned int >::CType) << std::endl << " " << m_MeshIO->GetComponentTypeAsString(MeshIOBase::MapComponentType< int >::CType) diff --git a/Modules/IO/Mesh/include/itkMeshIOBase.h b/Modules/IO/Mesh/include/itkMeshIOBase.h index 00d17ac2d45..6a44261a0ba 100644 --- a/Modules/IO/Mesh/include/itkMeshIOBase.h +++ b/Modules/IO/Mesh/include/itkMeshIOBase.h @@ -760,9 +760,9 @@ class ITK_EXPORT MeshIOBase:public LightProcessObject static const IOComponentType CType = ctype; \ } -MESHIOBASE_TYPEMAP(unsigned char, UCHAR); +MESHIOBASE_TYPEMAP(uint8_t, UCHAR); MESHIOBASE_TYPEMAP(char, CHAR); -MESHIOBASE_TYPEMAP(unsigned short, USHORT); +MESHIOBASE_TYPEMAP(uint16_t, USHORT); MESHIOBASE_TYPEMAP(short, SHORT); MESHIOBASE_TYPEMAP(unsigned int, UINT); MESHIOBASE_TYPEMAP(int, INT); diff --git a/Modules/IO/Mesh/include/itkVTKPolyDataMeshIO.h b/Modules/IO/Mesh/include/itkVTKPolyDataMeshIO.h index 73d033f9cdb..64793420240 100644 --- a/Modules/IO/Mesh/include/itkVTKPolyDataMeshIO.h +++ b/Modules/IO/Mesh/include/itkVTKPolyDataMeshIO.h @@ -1102,10 +1102,10 @@ class ITK_EXPORT VTKPolyDataMeshIO:public MeshIOBase { outputFile << numberOfPixelComponents << "\n"; SizeValueType numberOfElements = numberOfPixelComponents * numberOfPixels; - unsigned char *data = new unsigned char[numberOfElements]; + uint8_t *data = new uint8_t[numberOfElements]; for ( SizeValueType ii = 0; ii < numberOfElements; ++ii ) { - data[ii] = static_cast< unsigned char >( buffer[ii] ); + data[ii] = static_cast< uint8_t >( buffer[ii] ); } outputFile.write(reinterpret_cast< char * >( data ), numberOfElements); diff --git a/Modules/IO/Mesh/src/itkBYUMeshIO.cxx b/Modules/IO/Mesh/src/itkBYUMeshIO.cxx index c176fc9444d..84740a36c38 100644 --- a/Modules/IO/Mesh/src/itkBYUMeshIO.cxx +++ b/Modules/IO/Mesh/src/itkBYUMeshIO.cxx @@ -353,7 +353,7 @@ ::WritePoints(void *buffer) { case UCHAR: { - WritePoints(static_cast< unsigned char * >( buffer ), outputFile); + WritePoints(static_cast< uint8_t * >( buffer ), outputFile); break; } case CHAR: @@ -364,7 +364,7 @@ ::WritePoints(void *buffer) } case USHORT: { - WritePoints(static_cast< unsigned short * >( buffer ), outputFile); + WritePoints(static_cast< uint16_t * >( buffer ), outputFile); break; } @@ -464,17 +464,17 @@ ::WriteCells(void *buffer) { case UCHAR: { - WriteCells(static_cast< unsigned char * >( buffer ), outputFile); + WriteCells(static_cast< uint8_t * >( buffer ), outputFile); break; } case CHAR: { - WriteCells(static_cast< unsigned char * >( buffer ), outputFile); + WriteCells(static_cast< uint8_t * >( buffer ), outputFile); break; } case USHORT: { - WriteCells(static_cast< unsigned short * >( buffer ), outputFile); + WriteCells(static_cast< uint16_t * >( buffer ), outputFile); break; } case SHORT: diff --git a/Modules/IO/Mesh/src/itkFreeSurferAsciiMeshIO.cxx b/Modules/IO/Mesh/src/itkFreeSurferAsciiMeshIO.cxx index 472d6a307e5..eb078626223 100644 --- a/Modules/IO/Mesh/src/itkFreeSurferAsciiMeshIO.cxx +++ b/Modules/IO/Mesh/src/itkFreeSurferAsciiMeshIO.cxx @@ -264,7 +264,7 @@ ::WritePoints(void *buffer) { case UCHAR: { - WritePoints(static_cast< unsigned char * >( buffer ), outputFile, itk::NumericTraits< unsigned char >::Zero); + WritePoints(static_cast< uint8_t * >( buffer ), outputFile, itk::NumericTraits< uint8_t >::Zero); break; } case CHAR: @@ -275,7 +275,7 @@ ::WritePoints(void *buffer) } case USHORT: { - WritePoints(static_cast< unsigned short * >( buffer ), outputFile, itk::NumericTraits< unsigned short >::Zero); + WritePoints(static_cast< uint16_t * >( buffer ), outputFile, itk::NumericTraits< uint16_t >::Zero); break; } @@ -376,17 +376,17 @@ ::WriteCells(void *buffer) { case UCHAR: { - WriteCells(static_cast< unsigned char * >( buffer ), outputFile); + WriteCells(static_cast< uint8_t * >( buffer ), outputFile); break; } case CHAR: { - WriteCells(static_cast< unsigned char * >( buffer ), outputFile); + WriteCells(static_cast< uint8_t * >( buffer ), outputFile); break; } case USHORT: { - WriteCells(static_cast< unsigned short * >( buffer ), outputFile); + WriteCells(static_cast< uint16_t * >( buffer ), outputFile); break; } case SHORT: diff --git a/Modules/IO/Mesh/src/itkFreeSurferBinaryMeshIO.cxx b/Modules/IO/Mesh/src/itkFreeSurferBinaryMeshIO.cxx index 99c8c0df991..a0b8ad98b30 100644 --- a/Modules/IO/Mesh/src/itkFreeSurferBinaryMeshIO.cxx +++ b/Modules/IO/Mesh/src/itkFreeSurferBinaryMeshIO.cxx @@ -105,7 +105,7 @@ ::ReadMeshInformation() // Define required variables const unsigned int numberOfCellPoints = 3; const unsigned int fileTypeIdLength = 3; - unsigned char fileTypeId[fileTypeIdLength]; + uint8_t fileTypeId[fileTypeIdLength]; this->m_FileType = BINARY; // Read file type @@ -391,7 +391,7 @@ ::WritePoints(void *buffer) { case UCHAR: { - WritePoints(static_cast< unsigned char * >( buffer ), outputFile); + WritePoints(static_cast< uint8_t * >( buffer ), outputFile); break; } case CHAR: @@ -402,7 +402,7 @@ ::WritePoints(void *buffer) } case USHORT: { - WritePoints(static_cast< unsigned short * >( buffer ), outputFile); + WritePoints(static_cast< uint16_t * >( buffer ), outputFile); break; } @@ -502,7 +502,7 @@ ::WriteCells(void *buffer) { case UCHAR: { - WriteCells(static_cast< unsigned char * >( buffer ), outputFile); + WriteCells(static_cast< uint8_t * >( buffer ), outputFile); break; } case CHAR: @@ -512,7 +512,7 @@ ::WriteCells(void *buffer) } case USHORT: { - WriteCells(static_cast< unsigned short * >( buffer ), outputFile); + WriteCells(static_cast< uint16_t * >( buffer ), outputFile); break; } case SHORT: @@ -602,7 +602,7 @@ ::WritePointData(void *buffer) { case UCHAR: { - WritePointData(static_cast< unsigned char * >( buffer ), outputFile); + WritePointData(static_cast< uint8_t * >( buffer ), outputFile); break; } case CHAR: @@ -613,7 +613,7 @@ ::WritePointData(void *buffer) } case USHORT: { - WritePointData(static_cast< unsigned short * >( buffer ), outputFile); + WritePointData(static_cast< uint16_t * >( buffer ), outputFile); break; } diff --git a/Modules/IO/Mesh/src/itkGiftiMeshIO.cxx b/Modules/IO/Mesh/src/itkGiftiMeshIO.cxx index 8b199bd2afb..3d54bc72f43 100644 --- a/Modules/IO/Mesh/src/itkGiftiMeshIO.cxx +++ b/Modules/IO/Mesh/src/itkGiftiMeshIO.cxx @@ -902,8 +902,8 @@ ::ReadCells(void *buffer) } case UCHAR: { - this->WriteCellsBuffer(static_cast< unsigned char * >( m_GiftiImage->darray[ii]->data ), - static_cast< unsigned char * >( buffer ), + this->WriteCellsBuffer(static_cast< uint8_t * >( m_GiftiImage->darray[ii]->data ), + static_cast< uint8_t * >( buffer ), TRIANGLE_CELL, 3, this->m_NumberOfCells); @@ -911,8 +911,8 @@ ::ReadCells(void *buffer) } case USHORT: { - this->WriteCellsBuffer(static_cast< unsigned short * >( m_GiftiImage->darray[ii]->data ), - static_cast< unsigned short * >( buffer ), + this->WriteCellsBuffer(static_cast< uint16_t * >( m_GiftiImage->darray[ii]->data ), + static_cast< uint16_t * >( buffer ), TRIANGLE_CELL, 3, this->m_NumberOfCells); @@ -1470,7 +1470,7 @@ ::WritePoints(void *buffer) { case UCHAR: { - ConvertBuffer(static_cast< unsigned char * >( buffer ), + ConvertBuffer(static_cast< uint8_t * >( buffer ), static_cast< float * >( m_GiftiImage->darray[ii]->data ), pointsBufferSize); break; @@ -1482,7 +1482,7 @@ ::WritePoints(void *buffer) } case USHORT: { - ConvertBuffer(static_cast< unsigned short * >( buffer ), + ConvertBuffer(static_cast< uint16_t * >( buffer ), static_cast< float * >( m_GiftiImage->darray[ii]->data ), pointsBufferSize); break; @@ -1564,7 +1564,7 @@ ::WriteCells(void *buffer) { case UCHAR: { - this->ReadCellsBuffer( static_cast< unsigned char * >( buffer ), static_cast< int32_t * >( m_GiftiImage->darray[ii]->data ) ); + this->ReadCellsBuffer( static_cast< uint8_t * >( buffer ), static_cast< int32_t * >( m_GiftiImage->darray[ii]->data ) ); break; } case CHAR: @@ -1574,7 +1574,7 @@ ::WriteCells(void *buffer) } case USHORT: { - this->ReadCellsBuffer( static_cast< unsigned short * >( buffer ), static_cast< int32_t * >( m_GiftiImage->darray[ii]->data ) ); + this->ReadCellsBuffer( static_cast< uint16_t * >( buffer ), static_cast< int32_t * >( m_GiftiImage->darray[ii]->data ) ); break; } case SHORT: @@ -1656,7 +1656,7 @@ ::WritePointData(void *buffer) { case UCHAR: { - ConvertBuffer(static_cast< unsigned char * >( buffer ), + ConvertBuffer(static_cast< uint8_t * >( buffer ), static_cast< float * >( m_GiftiImage->darray[ii]->data ), pointDataBufferSize); break; @@ -1668,7 +1668,7 @@ ::WritePointData(void *buffer) } case USHORT: { - ConvertBuffer(static_cast< unsigned short * >( buffer ), + ConvertBuffer(static_cast< uint16_t * >( buffer ), static_cast< float * >( m_GiftiImage->darray[ii]->data ), pointDataBufferSize); break; @@ -1751,7 +1751,7 @@ ::WritePointData(void *buffer) { case UCHAR: { - ConvertBuffer(static_cast< unsigned char * >( buffer ), + ConvertBuffer(static_cast< uint8_t * >( buffer ), static_cast< int * >( m_GiftiImage->darray[ii]->data ), pointDataBufferSize); break; @@ -1763,7 +1763,7 @@ ::WritePointData(void *buffer) } case USHORT: { - ConvertBuffer(static_cast< unsigned short * >( buffer ), + ConvertBuffer(static_cast< uint16_t * >( buffer ), static_cast< int * >( m_GiftiImage->darray[ii]->data ), pointDataBufferSize); break; @@ -1855,7 +1855,7 @@ ::WriteCellData(void *buffer) { case UCHAR: { - ConvertBuffer(static_cast< unsigned char * >( buffer ), + ConvertBuffer(static_cast< uint8_t * >( buffer ), static_cast< float * >( m_GiftiImage->darray[ii]->data ), cellDataBufferSize); break; @@ -1867,7 +1867,7 @@ ::WriteCellData(void *buffer) } case USHORT: { - ConvertBuffer(static_cast< unsigned short * >( buffer ), + ConvertBuffer(static_cast< uint16_t * >( buffer ), static_cast< float * >( m_GiftiImage->darray[ii]->data ), cellDataBufferSize); break; @@ -1950,7 +1950,7 @@ ::WriteCellData(void *buffer) { case UCHAR: { - ConvertBuffer(static_cast< unsigned char * >( buffer ), + ConvertBuffer(static_cast< uint8_t * >( buffer ), static_cast< int * >( m_GiftiImage->darray[ii]->data ), cellDataBufferSize); break; @@ -1962,7 +1962,7 @@ ::WriteCellData(void *buffer) } case USHORT: { - ConvertBuffer(static_cast< unsigned short * >( buffer ), + ConvertBuffer(static_cast< uint16_t * >( buffer ), static_cast< int * >( m_GiftiImage->darray[ii]->data ), cellDataBufferSize); break; diff --git a/Modules/IO/Mesh/src/itkMeshIOBase.cxx b/Modules/IO/Mesh/src/itkMeshIOBase.cxx index 28c11b951f5..2f8f7bf2a21 100644 --- a/Modules/IO/Mesh/src/itkMeshIOBase.cxx +++ b/Modules/IO/Mesh/src/itkMeshIOBase.cxx @@ -80,11 +80,11 @@ ::GetComponentSize(IOComponentType componentType) const switch ( componentType ) { case UCHAR: - return sizeof( unsigned char ); + return sizeof( uint8_t ); case CHAR: return sizeof( char ); case USHORT: - return sizeof( unsigned short ); + return sizeof( uint16_t ); case SHORT: return sizeof( short ); case UINT: diff --git a/Modules/IO/Mesh/src/itkOBJMeshIO.cxx b/Modules/IO/Mesh/src/itkOBJMeshIO.cxx index 660d638f1bc..6fc6ab3838c 100644 --- a/Modules/IO/Mesh/src/itkOBJMeshIO.cxx +++ b/Modules/IO/Mesh/src/itkOBJMeshIO.cxx @@ -432,7 +432,7 @@ WritePoints(void *buffer) { case UCHAR: { - WritePoints(static_cast< unsigned char * >( buffer ), outputFile); + WritePoints(static_cast< uint8_t * >( buffer ), outputFile); break; } case CHAR: @@ -443,7 +443,7 @@ WritePoints(void *buffer) } case USHORT: { - WritePoints(static_cast< unsigned short * >( buffer ), outputFile); + WritePoints(static_cast< uint16_t * >( buffer ), outputFile); break; } @@ -545,17 +545,17 @@ ::WriteCells(void *buffer) { case UCHAR: { - WriteCells(static_cast< unsigned char * >( buffer ), outputFile); + WriteCells(static_cast< uint8_t * >( buffer ), outputFile); break; } case CHAR: { - WriteCells(static_cast< unsigned char * >( buffer ), outputFile); + WriteCells(static_cast< uint8_t * >( buffer ), outputFile); break; } case USHORT: { - WriteCells(static_cast< unsigned short * >( buffer ), outputFile); + WriteCells(static_cast< uint16_t * >( buffer ), outputFile); break; } case SHORT: @@ -653,7 +653,7 @@ ::WritePointData(void *buffer) { case UCHAR: { - WritePointData(static_cast< unsigned char * >( buffer ), outputFile); + WritePointData(static_cast< uint8_t * >( buffer ), outputFile); break; } case CHAR: @@ -664,7 +664,7 @@ ::WritePointData(void *buffer) } case USHORT: { - WritePointData(static_cast< unsigned short * >( buffer ), outputFile); + WritePointData(static_cast< uint16_t * >( buffer ), outputFile); break; } diff --git a/Modules/IO/Mesh/src/itkOFFMeshIO.cxx b/Modules/IO/Mesh/src/itkOFFMeshIO.cxx index 8eb8177fa83..1e13828fcbf 100644 --- a/Modules/IO/Mesh/src/itkOFFMeshIO.cxx +++ b/Modules/IO/Mesh/src/itkOFFMeshIO.cxx @@ -438,7 +438,7 @@ ::WritePoints(void *buffer) { case UCHAR: { - WriteBufferAsAscii(static_cast< unsigned char * >( buffer ), outputFile, m_NumberOfPoints, m_PointDimension); + WriteBufferAsAscii(static_cast< uint8_t * >( buffer ), outputFile, m_NumberOfPoints, m_PointDimension); break; } case CHAR: @@ -449,7 +449,7 @@ ::WritePoints(void *buffer) } case USHORT: { - WriteBufferAsAscii(static_cast< unsigned short * >( buffer ), outputFile, m_NumberOfPoints, m_PointDimension); + WriteBufferAsAscii(static_cast< uint16_t * >( buffer ), outputFile, m_NumberOfPoints, m_PointDimension); break; } @@ -525,7 +525,7 @@ ::WritePoints(void *buffer) { case UCHAR: { - WriteBufferAsBinary< float >(static_cast< unsigned char * >( buffer ), outputFile, m_NumberOfPoints * m_PointDimension); + WriteBufferAsBinary< float >(static_cast< uint8_t * >( buffer ), outputFile, m_NumberOfPoints * m_PointDimension); break; } case CHAR: @@ -536,7 +536,7 @@ ::WritePoints(void *buffer) } case USHORT: { - WriteBufferAsBinary< float >(static_cast< unsigned short * >( buffer ), outputFile, m_NumberOfPoints * m_PointDimension); + WriteBufferAsBinary< float >(static_cast< uint16_t * >( buffer ), outputFile, m_NumberOfPoints * m_PointDimension); break; } @@ -647,19 +647,19 @@ ::WriteCells(void *buffer) { case UCHAR: { - WriteCellsAsAscii(static_cast< unsigned char * >( buffer ), outputFile); + WriteCellsAsAscii(static_cast< uint8_t * >( buffer ), outputFile); break; } case CHAR: { - WriteCellsAsAscii(static_cast< unsigned char * >( buffer ), outputFile); + WriteCellsAsAscii(static_cast< uint8_t * >( buffer ), outputFile); break; } case USHORT: { - WriteCellsAsAscii(static_cast< unsigned short * >( buffer ), outputFile); + WriteCellsAsAscii(static_cast< uint16_t * >( buffer ), outputFile); break; } @@ -735,7 +735,7 @@ ::WriteCells(void *buffer) { case UCHAR: { - WriteCellsAsBinary< itk::uint32_t >(static_cast< unsigned char * >( buffer ), outputFile); + WriteCellsAsBinary< itk::uint32_t >(static_cast< uint8_t * >( buffer ), outputFile); break; } @@ -747,7 +747,7 @@ ::WriteCells(void *buffer) } case USHORT: { - WriteCellsAsBinary< itk::uint32_t >(static_cast< unsigned short * >( buffer ), outputFile); + WriteCellsAsBinary< itk::uint32_t >(static_cast< uint16_t * >( buffer ), outputFile); break; } diff --git a/Modules/IO/Mesh/src/itkVTKPolyDataMeshIO.cxx b/Modules/IO/Mesh/src/itkVTKPolyDataMeshIO.cxx index d4750bb4fec..bd0251d2216 100644 --- a/Modules/IO/Mesh/src/itkVTKPolyDataMeshIO.cxx +++ b/Modules/IO/Mesh/src/itkVTKPolyDataMeshIO.cxx @@ -978,7 +978,7 @@ ::ReadPoints(void *buffer) { case UCHAR: { - ReadPointsBufferAsASCII( inputFile, static_cast< unsigned char * >( buffer ) ); + ReadPointsBufferAsASCII( inputFile, static_cast< uint8_t * >( buffer ) ); break; } case CHAR: @@ -988,7 +988,7 @@ ::ReadPoints(void *buffer) } case USHORT: { - ReadPointsBufferAsASCII( inputFile, static_cast< unsigned short * >( buffer ) ); + ReadPointsBufferAsASCII( inputFile, static_cast< uint16_t * >( buffer ) ); break; } case SHORT: @@ -1053,7 +1053,7 @@ ::ReadPoints(void *buffer) { case UCHAR: { - ReadPointsBufferAsBINARY( inputFile, static_cast< unsigned char * >( buffer ) ); + ReadPointsBufferAsBINARY( inputFile, static_cast< uint8_t * >( buffer ) ); break; } case CHAR: @@ -1063,7 +1063,7 @@ ::ReadPoints(void *buffer) } case USHORT: { - ReadPointsBufferAsBINARY( inputFile, static_cast< unsigned short * >( buffer ) ); + ReadPointsBufferAsBINARY( inputFile, static_cast< uint16_t * >( buffer ) ); break; } case SHORT: @@ -1376,7 +1376,7 @@ ::ReadPointData(void *buffer) { case UCHAR: { - ReadPointDataBufferAsASCII( inputFile, static_cast< unsigned char * >( buffer ) ); + ReadPointDataBufferAsASCII( inputFile, static_cast< uint8_t * >( buffer ) ); break; } case CHAR: @@ -1386,7 +1386,7 @@ ::ReadPointData(void *buffer) } case USHORT: { - ReadPointDataBufferAsASCII( inputFile, static_cast< unsigned short * >( buffer ) ); + ReadPointDataBufferAsASCII( inputFile, static_cast< uint16_t * >( buffer ) ); break; } case SHORT: @@ -1451,7 +1451,7 @@ ::ReadPointData(void *buffer) { case UCHAR: { - ReadPointDataBufferAsBINARY( inputFile, static_cast< unsigned char * >( buffer ) ); + ReadPointDataBufferAsBINARY( inputFile, static_cast< uint8_t * >( buffer ) ); break; } case CHAR: @@ -1461,7 +1461,7 @@ ::ReadPointData(void *buffer) } case USHORT: { - ReadPointDataBufferAsBINARY( inputFile, static_cast< unsigned short * >( buffer ) ); + ReadPointDataBufferAsBINARY( inputFile, static_cast< uint16_t * >( buffer ) ); break; } case SHORT: @@ -1585,7 +1585,7 @@ ::ReadCellData(void *buffer) { case UCHAR: { - ReadCellDataBufferAsASCII( inputFile, static_cast< unsigned char * >( buffer ) ); + ReadCellDataBufferAsASCII( inputFile, static_cast< uint8_t * >( buffer ) ); break; } case CHAR: @@ -1595,7 +1595,7 @@ ::ReadCellData(void *buffer) } case USHORT: { - ReadCellDataBufferAsASCII( inputFile, static_cast< unsigned short * >( buffer ) ); + ReadCellDataBufferAsASCII( inputFile, static_cast< uint16_t * >( buffer ) ); break; } case SHORT: @@ -1660,7 +1660,7 @@ ::ReadCellData(void *buffer) { case UCHAR: { - ReadCellDataBufferAsBINARY( inputFile, static_cast< unsigned char * >( buffer ) ); + ReadCellDataBufferAsBINARY( inputFile, static_cast< uint8_t * >( buffer ) ); break; } case CHAR: @@ -1670,7 +1670,7 @@ ::ReadCellData(void *buffer) } case USHORT: { - ReadCellDataBufferAsBINARY( inputFile, static_cast< unsigned short * >( buffer ) ); + ReadCellDataBufferAsBINARY( inputFile, static_cast< uint16_t * >( buffer ) ); break; } case SHORT: @@ -1850,7 +1850,7 @@ ::WritePoints(void *buffer) { case UCHAR: { - WritePointsBufferAsASCII(outputFile, static_cast< unsigned char * >( buffer ), " unsigned_char"); + WritePointsBufferAsASCII(outputFile, static_cast< uint8_t * >( buffer ), " unsigned_char"); break; } case CHAR: @@ -1860,7 +1860,7 @@ ::WritePoints(void *buffer) } case USHORT: { - WritePointsBufferAsASCII(outputFile, static_cast< unsigned short * >( buffer ), " unsigned_short"); + WritePointsBufferAsASCII(outputFile, static_cast< uint16_t * >( buffer ), " unsigned_short"); break; } @@ -1926,7 +1926,7 @@ ::WritePoints(void *buffer) { case UCHAR: { - WritePointsBufferAsBINARY(outputFile, static_cast< unsigned char * >( buffer ), " unsigned_char"); + WritePointsBufferAsBINARY(outputFile, static_cast< uint8_t * >( buffer ), " unsigned_char"); break; } case CHAR: @@ -1936,7 +1936,7 @@ ::WritePoints(void *buffer) } case USHORT: { - WritePointsBufferAsBINARY(outputFile, static_cast< unsigned short * >( buffer ), " unsigned_short"); + WritePointsBufferAsBINARY(outputFile, static_cast< uint16_t * >( buffer ), " unsigned_short"); break; } @@ -2066,8 +2066,8 @@ ::WriteCells(void *buffer) { case UCHAR: { - UpdateCellInformation( static_cast< unsigned char * >( buffer ) ); - WriteCellsBufferAsASCII( outputFile, static_cast< unsigned char * >( buffer ) ); + UpdateCellInformation( static_cast< uint8_t * >( buffer ) ); + WriteCellsBufferAsASCII( outputFile, static_cast< uint8_t * >( buffer ) ); break; } case CHAR: @@ -2078,8 +2078,8 @@ ::WriteCells(void *buffer) } case USHORT: { - UpdateCellInformation( static_cast< unsigned short * >( buffer ) ); - WriteCellsBufferAsASCII( outputFile, static_cast< unsigned short * >( buffer ) ); + UpdateCellInformation( static_cast< uint16_t * >( buffer ) ); + WriteCellsBufferAsASCII( outputFile, static_cast< uint16_t * >( buffer ) ); break; } @@ -2155,8 +2155,8 @@ ::WriteCells(void *buffer) { case UCHAR: { - UpdateCellInformation( static_cast< unsigned char * >( buffer ) ); - WriteCellsBufferAsBINARY( outputFile, static_cast< unsigned char * >( buffer ) ); + UpdateCellInformation( static_cast< uint8_t * >( buffer ) ); + WriteCellsBufferAsBINARY( outputFile, static_cast< uint8_t * >( buffer ) ); break; } case CHAR: @@ -2167,8 +2167,8 @@ ::WriteCells(void *buffer) } case USHORT: { - UpdateCellInformation( static_cast< unsigned short * >( buffer ) ); - WriteCellsBufferAsBINARY( outputFile, static_cast< unsigned short * >( buffer ) ); + UpdateCellInformation( static_cast< uint16_t * >( buffer ) ); + WriteCellsBufferAsBINARY( outputFile, static_cast< uint16_t * >( buffer ) ); break; } @@ -2282,7 +2282,7 @@ ::WritePointData(void *buffer) { case UCHAR: { - WritePointDataBufferAsASCII(outputFile, static_cast< unsigned char * >( buffer ), " unsigned_char"); + WritePointDataBufferAsASCII(outputFile, static_cast< uint8_t * >( buffer ), " unsigned_char"); break; } case CHAR: @@ -2292,7 +2292,7 @@ ::WritePointData(void *buffer) } case USHORT: { - WritePointDataBufferAsASCII(outputFile, static_cast< unsigned short * >( buffer ), " unsigned_short"); + WritePointDataBufferAsASCII(outputFile, static_cast< uint16_t * >( buffer ), " unsigned_short"); break; } @@ -2357,7 +2357,7 @@ ::WritePointData(void *buffer) { case UCHAR: { - WritePointDataBufferAsBINARY(outputFile, static_cast< unsigned char * >( buffer ), " unsigned_char"); + WritePointDataBufferAsBINARY(outputFile, static_cast< uint8_t * >( buffer ), " unsigned_char"); break; } case CHAR: @@ -2367,7 +2367,7 @@ ::WritePointData(void *buffer) } case USHORT: { - WritePointDataBufferAsBINARY(outputFile, static_cast< unsigned short * >( buffer ), " unsigned_short"); + WritePointDataBufferAsBINARY(outputFile, static_cast< uint16_t * >( buffer ), " unsigned_short"); break; } @@ -2500,7 +2500,7 @@ ::WriteCellData(void *buffer) { case UCHAR: { - WriteCellDataBufferAsASCII(outputFile, static_cast< unsigned char * >( buffer ), " unsigned_char"); + WriteCellDataBufferAsASCII(outputFile, static_cast< uint8_t * >( buffer ), " unsigned_char"); break; } case CHAR: @@ -2510,7 +2510,7 @@ ::WriteCellData(void *buffer) } case USHORT: { - WriteCellDataBufferAsASCII(outputFile, static_cast< unsigned short * >( buffer ), " unsigned_short"); + WriteCellDataBufferAsASCII(outputFile, static_cast< uint16_t * >( buffer ), " unsigned_short"); break; } @@ -2576,7 +2576,7 @@ ::WriteCellData(void *buffer) { case UCHAR: { - WriteCellDataBufferAsBINARY(outputFile, static_cast< unsigned char * >( buffer ), " unsigned_char"); + WriteCellDataBufferAsBINARY(outputFile, static_cast< uint8_t * >( buffer ), " unsigned_char"); break; } case CHAR: @@ -2586,7 +2586,7 @@ ::WriteCellData(void *buffer) } case USHORT: { - WriteCellDataBufferAsBINARY(outputFile, static_cast< unsigned short * >( buffer ), " unsigned_short"); + WriteCellDataBufferAsBINARY(outputFile, static_cast< uint16_t * >( buffer ), " unsigned_short"); break; } diff --git a/Modules/IO/Meta/src/itkMetaImageIO.cxx b/Modules/IO/Meta/src/itkMetaImageIO.cxx index 8e102842115..f84c24e2b6d 100644 --- a/Modules/IO/Meta/src/itkMetaImageIO.cxx +++ b/Modules/IO/Meta/src/itkMetaImageIO.cxx @@ -572,9 +572,9 @@ ::WriteImageInformation(void) int ival=0; unsigned uval=0; short shval=0; - unsigned short ushval=0; + uint16_t ushval=0; char cval=0; - unsigned char ucval=0; + uint8_t ucval=0; bool bval=false; std::string value=""; if(ExposeMetaData< std::string >(metaDict, *keyIt, value)) @@ -609,7 +609,7 @@ ::WriteImageInformation(void) { strs << shval; } - else if(ExposeMetaData(metaDict,*keyIt,ushval)) + else if(ExposeMetaData(metaDict,*keyIt,ushval)) { strs << ushval; } @@ -617,7 +617,7 @@ ::WriteImageInformation(void) { strs << cval; } - else if(ExposeMetaData(metaDict,*keyIt,ucval)) + else if(ExposeMetaData(metaDict,*keyIt,ucval)) { strs << ucval; } diff --git a/Modules/IO/Meta/test/itkLargeMetaImageWriteReadTest.cxx b/Modules/IO/Meta/test/itkLargeMetaImageWriteReadTest.cxx index f5d7e44e64b..cfef61b5359 100644 --- a/Modules/IO/Meta/test/itkLargeMetaImageWriteReadTest.cxx +++ b/Modules/IO/Meta/test/itkLargeMetaImageWriteReadTest.cxx @@ -173,7 +173,7 @@ int itkLargeMetaImageWriteReadTest(int ac, char* argv[]) { const unsigned int Dimension = 2; - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image< PixelType, Dimension> ImageType; ImageType::SizeType size; @@ -187,7 +187,7 @@ int itkLargeMetaImageWriteReadTest(int ac, char* argv[]) { const unsigned int Dimension = 3; - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image< PixelType, Dimension> ImageType; ImageType::SizeType size; diff --git a/Modules/IO/Meta/test/itkMetaImageIOGzTest.cxx b/Modules/IO/Meta/test/itkMetaImageIOGzTest.cxx index e11275d0a62..fa106b60800 100644 --- a/Modules/IO/Meta/test/itkMetaImageIOGzTest.cxx +++ b/Modules/IO/Meta/test/itkMetaImageIOGzTest.cxx @@ -47,9 +47,9 @@ int itkMetaImageIOGzTest(int ac, char* av[]) std::string dataName(av[1]); dataName += "/GzTest.raw.gz"; gzFile compressed = gzopen(dataName.c_str(),"wb"); - for(unsigned short i = 0; i < (32 * 32); i++) + for(uint16_t i = 0; i < (32 * 32); i++) { - unsigned short pixel = i & 0xff; + uint16_t pixel = i & 0xff; if( gzwrite(compressed,&pixel,sizeof(pixel)) != sizeof(pixel) ) { std::cerr << "Write error for " << dataName << std::endl; @@ -58,7 +58,7 @@ int itkMetaImageIOGzTest(int ac, char* av[]) } gzclose(compressed); - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image myImage; itk::ImageFileReader::Pointer reader diff --git a/Modules/IO/Meta/test/itkMetaImageIOMetaDataTest.cxx b/Modules/IO/Meta/test/itkMetaImageIOMetaDataTest.cxx index c0c0f79b133..36409b5e869 100644 --- a/Modules/IO/Meta/test/itkMetaImageIOMetaDataTest.cxx +++ b/Modules/IO/Meta/test/itkMetaImageIOMetaDataTest.cxx @@ -161,7 +161,7 @@ itkMetaImageIOMetaDataTest(int argc, char * argv [] ) // the image data is irrelevant const int Dim(2); - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image ImageType; typedef itk::RandomImageSource SourceType; @@ -220,7 +220,7 @@ itkMetaImageIOMetaDataTest(int argc, char * argv [] ) { // Add short std::string key("unsigned_short"); unsigned value(8192); - itk::EncapsulateMetaData(dict,key,value); + itk::EncapsulateMetaData(dict,key,value); } { // Add char @@ -291,7 +291,7 @@ itkMetaImageIOMetaDataTest(int argc, char * argv [] ) { return 1; // error } - // Add unsigned char + // Add uint8_t if(!TestMatch(dict,"bool",true)) { return 1; // error diff --git a/Modules/IO/Meta/test/itkMetaImageIOTest.cxx b/Modules/IO/Meta/test/itkMetaImageIOTest.cxx index cf319ee68b4..b404ce40f66 100644 --- a/Modules/IO/Meta/test/itkMetaImageIOTest.cxx +++ b/Modules/IO/Meta/test/itkMetaImageIOTest.cxx @@ -34,7 +34,7 @@ int itkMetaImageIOTest(int ac, char* av[]) // ATTENTION THIS IS THE PIXEL TYPE FOR // THE RESULTING IMAGE - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image myImage; itk::ImageFileReader::Pointer reader diff --git a/Modules/IO/Meta/test/itkMetaImageIOTest2.cxx b/Modules/IO/Meta/test/itkMetaImageIOTest2.cxx index 0622d22428b..1727058c9ec 100644 --- a/Modules/IO/Meta/test/itkMetaImageIOTest2.cxx +++ b/Modules/IO/Meta/test/itkMetaImageIOTest2.cxx @@ -35,7 +35,7 @@ int TestUnknowMetaDataBug( const std::string &fname ) try { - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image ImageType; ImageType::RegionType region; diff --git a/Modules/IO/Meta/test/itkMetaImageStreamingIOTest.cxx b/Modules/IO/Meta/test/itkMetaImageStreamingIOTest.cxx index 55294055d20..1a38c3cdea4 100644 --- a/Modules/IO/Meta/test/itkMetaImageStreamingIOTest.cxx +++ b/Modules/IO/Meta/test/itkMetaImageStreamingIOTest.cxx @@ -26,8 +26,8 @@ int itkMetaImageStreamingIOTest(int ac, char* av[]) { // Image types are defined below. - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; const unsigned int Dimension = 3; typedef itk::Image< InputPixelType, Dimension > InputImageType; diff --git a/Modules/IO/Meta/test/itkMetaImageStreamingWriterIOTest.cxx b/Modules/IO/Meta/test/itkMetaImageStreamingWriterIOTest.cxx index a2d066b988b..8abc91555ac 100644 --- a/Modules/IO/Meta/test/itkMetaImageStreamingWriterIOTest.cxx +++ b/Modules/IO/Meta/test/itkMetaImageStreamingWriterIOTest.cxx @@ -32,7 +32,7 @@ int itkMetaImageStreamingWriterIOTest(int argc, char* argv[]) // We remove the output file itksys::SystemTools::RemoveFile( argv[2]); - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image ImageType; itk::MetaImageIO::Pointer metaImageIO = itk::MetaImageIO::New(); diff --git a/Modules/IO/Meta/test/testMetaObject.cxx b/Modules/IO/Meta/test/testMetaObject.cxx index fa7185c6dab..10cc41c57ac 100644 --- a/Modules/IO/Meta/test/testMetaObject.cxx +++ b/Modules/IO/Meta/test/testMetaObject.cxx @@ -183,9 +183,9 @@ int testMetaObject(int argc, char *argv[]) delete [] inDataChar; delete [] outDataChar; - unsigned char* inDataUChar = new unsigned char[1]; + uint8_t* inDataUChar = new uint8_t[1]; inDataUChar[0]=1; - unsigned char* outDataUChar = new unsigned char[1]; + uint8_t* outDataUChar = new uint8_t[1]; if(!MET_ValueToValue(MET_UCHAR_ARRAY,inDataUChar,0,MET_UCHAR_ARRAY,outDataUChar)) { std::cout << "MET_ValueToValue: FAIL" << std::endl; diff --git a/Modules/IO/Meta/test/testMetaUtils.cxx b/Modules/IO/Meta/test/testMetaUtils.cxx index 47f972625f2..379dcb0bd44 100644 --- a/Modules/IO/Meta/test/testMetaUtils.cxx +++ b/Modules/IO/Meta/test/testMetaUtils.cxx @@ -38,7 +38,7 @@ int testMetaUtils(int argc, char * argv[]) { std::cout << "MET_SYSTEM_BYTE_ORDER_MSB = FALSE" << std::endl; } - unsigned short x = 256; + uint16_t x = 256; std::cout << "MET_ByteSwapShort: "; if(MET_ByteOrderSwapShort(x) != 1) std::cout << "FAILED: 256->" << MET_ByteOrderSwapShort(x) << std::endl; diff --git a/Modules/IO/NIFTI/include/itkNiftiImageIO.h b/Modules/IO/NIFTI/include/itkNiftiImageIO.h index 15fd46c529c..0d8b54c552d 100644 --- a/Modules/IO/NIFTI/include/itkNiftiImageIO.h +++ b/Modules/IO/NIFTI/include/itkNiftiImageIO.h @@ -25,11 +25,12 @@ #ifndef __itkNiftiImageIO_h #define __itkNiftiImageIO_h - #include -#include "itkImageIOBase.h" #include +#include "itkImageIOBase.h" +#include "itkIntTypes.h" + namespace itk { /** \class NiftiImageIO @@ -113,9 +114,9 @@ class ITK_EXPORT NiftiImageIO:public ImageIOBase void DefineHeaderObjectDataType(); - void SetNIfTIOrientationFromImageIO(unsigned short int origdims, unsigned short int dims); + void SetNIfTIOrientationFromImageIO(uint16_t origdims, uint16_t dims); - void SetImageIOOrientationFromNIfTI(unsigned short int dims); + void SetImageIOOrientationFromNIfTI(uint16_t dims); void SetImageIOMetadataFromNIfTI(); diff --git a/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx b/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx index 30764160189..b1bb1b9cd2c 100644 --- a/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx +++ b/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx @@ -543,13 +543,13 @@ void NiftiImageIO::Read(void *buffer) CastCopy< char >(_data, data, imageSizeInComponents); break; case UCHAR: - CastCopy< unsigned char >(_data, data, imageSizeInComponents); + CastCopy< uint8_t >(_data, data, imageSizeInComponents); break; case SHORT: CastCopy< short >(_data, data, imageSizeInComponents); break; case USHORT: - CastCopy< unsigned short >(_data, data, imageSizeInComponents); + CastCopy< uint16_t >(_data, data, imageSizeInComponents); break; case INT: CastCopy< int >(_data, data, imageSizeInComponents); @@ -674,7 +674,7 @@ void NiftiImageIO::Read(void *buffer) this->m_RescaleIntercept, numElts); break; case UCHAR: - RescaleFunction(static_cast< unsigned char * >( buffer ), + RescaleFunction(static_cast< uint8_t * >( buffer ), this->m_RescaleSlope, this->m_RescaleIntercept, numElts); break; @@ -684,7 +684,7 @@ void NiftiImageIO::Read(void *buffer) this->m_RescaleIntercept, numElts); break; case USHORT: - RescaleFunction(static_cast< unsigned short * >( buffer ), + RescaleFunction(static_cast< uint16_t * >( buffer ), this->m_RescaleSlope, this->m_RescaleIntercept, numElts); break; @@ -1630,7 +1630,7 @@ void Normalize(std::vector< double > & x) } void -NiftiImageIO::SetImageIOOrientationFromNIfTI(unsigned short int dims) +NiftiImageIO::SetImageIOOrientationFromNIfTI(uint16_t dims) { typedef SpatialOrientationAdapter OrientAdapterType; @@ -1745,7 +1745,7 @@ NiftiImageIO::SetImageIOOrientationFromNIfTI(unsigned short int dims) } void -NiftiImageIO::SetNIfTIOrientationFromImageIO(unsigned short int origdims, unsigned short int dims) +NiftiImageIO::SetNIfTIOrientationFromImageIO(uint16_t origdims, uint16_t dims) { // // use NIFTI method 2 diff --git a/Modules/IO/NIFTI/test/BigEndian_hdr.h b/Modules/IO/NIFTI/test/BigEndian_hdr.h index 68b7ef35b52..e1716f4b8f1 100644 --- a/Modules/IO/NIFTI/test/BigEndian_hdr.h +++ b/Modules/IO/NIFTI/test/BigEndian_hdr.h @@ -18,7 +18,7 @@ #ifndef __BigEndian_hdr_h #define __BigEndian_hdr_h -static unsigned char BigEndian_hdr[] = { +static uint8_t BigEndian_hdr[] = { 0, 0, 1, 92, 70, 76, 79, 65, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 114, 0, 0, 4, 0, 6, 0, 6, 0, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, diff --git a/Modules/IO/NIFTI/test/BigEndian_img.h b/Modules/IO/NIFTI/test/BigEndian_img.h index 7b5a18c8725..4d9b3ff7cd3 100644 --- a/Modules/IO/NIFTI/test/BigEndian_img.h +++ b/Modules/IO/NIFTI/test/BigEndian_img.h @@ -18,7 +18,7 @@ #ifndef __BigEndian_img_h #define __BigEndian_img_h -const unsigned char BigEndian_img[] = { +const uint8_t BigEndian_img[] = { 67, 16, 0, 0, 67, 16, 0, 0, 67, 16, 0, 0, 65, 128, 0, 0, 65, 128, 0, 0, 65, 128, 0, 0, 67, 16, 0, 0, 67, 16, 0, 0, 67, 16, 0, 0, 65, 128, 0, 0, 65, 128, 0, 0, 65, 128, 0, 0, 67, 16, 0, 0, 67, 16, 0, 0, 67, 16, 0, 0, diff --git a/Modules/IO/NIFTI/test/LittleEndian_hdr.h b/Modules/IO/NIFTI/test/LittleEndian_hdr.h index 9c05a6a121a..07e1ec848cf 100644 --- a/Modules/IO/NIFTI/test/LittleEndian_hdr.h +++ b/Modules/IO/NIFTI/test/LittleEndian_hdr.h @@ -18,7 +18,7 @@ #ifndef __LittleEndian_hdr_h #define __LittleEndian_hdr_h -static unsigned char LittleEndian_hdr[] = { +static uint8_t LittleEndian_hdr[] = { 92, 1, 0, 0, 70, 76, 79, 65, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 114, 0, 4, 0, 6, 0, 6, 0, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, diff --git a/Modules/IO/NIFTI/test/LittleEndian_img.h b/Modules/IO/NIFTI/test/LittleEndian_img.h index 4035bf51495..f71e020a69c 100644 --- a/Modules/IO/NIFTI/test/LittleEndian_img.h +++ b/Modules/IO/NIFTI/test/LittleEndian_img.h @@ -18,7 +18,7 @@ #ifndef __LittleEndian_img_h #define __LittleEndian_img_h -const unsigned char LittleEndian_img[] = { +const uint8_t LittleEndian_img[] = { 0, 0, 16, 67, 0, 0, 16, 67, 0, 0, 16, 67, 0, 0, 128, 65, 0, 0, 128, 65, 0, 0, 128, 65, 0, 0, 16, 67, 0, 0, 16, 67, 0, 0, 16, 67, 0, 0, 128, 65, 0, 0, 128, 65, 0, 0, 128, 65, 0, 0, 16, 67, 0, 0, 16, 67, 0, 0, 16, 67, diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest.cxx index 4cfeb22b764..015896e334e 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest.cxx @@ -119,9 +119,9 @@ int itkNiftiImageIOTest(int ac, char* av[]) itk::ObjectFactoryBase::RegisterFactory(itk::NiftiImageIOFactory::New() ); firstTime = false; } - if(ac > 1) //This is a mechanism for reading unsigned char images for testing. + if(ac > 1) //This is a mechanism for reading uint8_t images for testing. { - typedef itk::Image ImageType; + typedef itk::Image ImageType; ImageType::Pointer input; for(int imagenameindex=1; imagenameindex < ac; imagenameindex++) { @@ -146,10 +146,10 @@ int itkNiftiImageIOTest(int ac, char* av[]) std::cerr << "Error writing Nifti file type char" << std::endl; rval += cur_return; } - cur_return = MakeNiftiImage(); + cur_return = MakeNiftiImage(); if(cur_return != 0) { - std::cerr << "Error writing Nifti file type unsigned char" << std::endl; + std::cerr << "Error writing Nifti file type uint8_t" << std::endl; rval += cur_return; } cur_return = MakeNiftiImage(); @@ -158,10 +158,10 @@ int itkNiftiImageIOTest(int ac, char* av[]) std::cerr << "Error writing Nifti file type short" << std::endl; rval += cur_return; } - cur_return = MakeNiftiImage(); + cur_return = MakeNiftiImage(); if(cur_return != 0) { - std::cerr << "Error writing Nifti file type unsigned short" << std::endl; + std::cerr << "Error writing Nifti file type uint16_t" << std::endl; rval += cur_return; } cur_return = MakeNiftiImage(); diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest.h b/Modules/IO/NIFTI/test/itkNiftiImageIOTest.h index 9c865e8d362..f88fe3e4c80 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest.h +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest.h @@ -49,10 +49,10 @@ #include "itkIOTestHelper.h" -const unsigned char RPI=16; /*Bit pattern 0 0 0 10000*/ -const unsigned char LEFT=128; /*Bit pattern 1 0 0 00000*/ -const unsigned char ANTERIOR=64; /*Bit pattern 0 1 0 00000*/ -const unsigned char SUPERIOR=32; /*Bit pattern 0 0 1 00000*/ +const uint8_t RPI=16; /*Bit pattern 0 0 0 10000*/ +const uint8_t LEFT=128; /*Bit pattern 1 0 0 00000*/ +const uint8_t ANTERIOR=64; /*Bit pattern 0 1 0 00000*/ +const uint8_t SUPERIOR=32; /*Bit pattern 0 0 1 00000*/ template typename itk::ImageBase::DirectionType diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest10.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest10.cxx index af861b5b93e..d03d530db97 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest10.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest10.cxx @@ -23,5 +23,5 @@ int itkNiftiImageIOTest10(int ac, char *av[]) { - return RGBTest >(ac,av); + return RGBTest >(ac,av); } diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest2.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest2.cxx index 0d0eae806f3..ed7ae4941c0 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest2.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest2.cxx @@ -34,7 +34,7 @@ int itkNiftiImageIOTest2(int ac, char* av[]) char *prefix = av[3]; int test_success = 0; - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef ImageType::Pointer ImagePointer; if((strcmp(arg1, "true") == 0) && WriteNiftiTestFiles(prefix) == -1) diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest4.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest4.cxx index 45b988e0090..ebbf7f8e3ea 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest4.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest4.cxx @@ -19,7 +19,7 @@ #include "itkNiftiImageIOTest.h" -typedef itk::Image Test4ImageType; +typedef itk::Image Test4ImageType; void PrintDir(Test4ImageType::DirectionType &dir) diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest5.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest5.cxx index 23a7aab3e00..c8573185bf0 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest5.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest5.cxx @@ -135,9 +135,9 @@ int itkNiftiImageIOTest5(int ac, char* av[]) return EXIT_FAILURE; } int success(0); - success |= SlopeInterceptTest(); + success |= SlopeInterceptTest(); success |= SlopeInterceptTest(); - success |= SlopeInterceptTest(); + success |= SlopeInterceptTest(); success |= SlopeInterceptTest(); success |= SlopeInterceptTest(); return success; diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest9.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest9.cxx index 295a371af8d..cd08015909a 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest9.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest9.cxx @@ -23,5 +23,5 @@ int itkNiftiImageIOTest9(int ac, char *av[]) { - return RGBTest >(ac,av); + return RGBTest >(ac,av); } diff --git a/Modules/IO/NIFTI/test/itkNiftiReadAnalyzeTest.cxx b/Modules/IO/NIFTI/test/itkNiftiReadAnalyzeTest.cxx index 5d774359d0c..52ac19ca41a 100644 --- a/Modules/IO/NIFTI/test/itkNiftiReadAnalyzeTest.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiReadAnalyzeTest.cxx @@ -27,7 +27,7 @@ namespace // // Analyze 7.5 header -- this describes the data below, // as an 6 x 6 x 8 image of float pixels -const unsigned char LittleEndian_hdr[] = +const uint8_t LittleEndian_hdr[] = { 0x5c, 0x01, 0x00, 0x00, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -68,7 +68,7 @@ const unsigned char LittleEndian_hdr[] = // // float data, represented as a char stream, in little-endian // order -const unsigned char LittleEndian_img[] = +const uint8_t LittleEndian_img[] = { 0x00, 0x00, 0x10, 0x43, 0x00, 0x00, 0x10, 0x43, 0x00, 0x00, 0x10, 0x43, 0x00, 0x00, 0x80, 0x41, 0x00, 0x00, 0x80, 0x41, @@ -191,7 +191,7 @@ const unsigned char LittleEndian_img[] = /** WriteFile * Write out a char array as binary */ -int WriteFile(const std::string &name, const unsigned char *buf, size_t buflen) +int WriteFile(const std::string &name, const uint8_t *buf, size_t buflen) { std::ofstream f(name.c_str(),std::ios::binary|std::ios::out); if(!f.is_open()) diff --git a/Modules/IO/NRRD/test/itkNrrdImageIOTest.cxx b/Modules/IO/NRRD/test/itkNrrdImageIOTest.cxx index e789f07c79c..408905a8ca0 100644 --- a/Modules/IO/NRRD/test/itkNrrdImageIOTest.cxx +++ b/Modules/IO/NRRD/test/itkNrrdImageIOTest.cxx @@ -45,31 +45,31 @@ int itkNrrdImageIOTest(int ac, char* av[]) int ret = EXIT_SUCCESS; ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); - ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); - ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); + ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); + ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); - ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); + ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); - ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); - ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); - ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); + ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); + ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); + ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); - ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); - ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); - ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); + ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); + ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); + ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile); // Test with compression on ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile, true); - ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile, true); - ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile, true); - ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile, true); + ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile, true); + ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile, true); + ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile, true); ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile, true); ret += itkNrrdImageIOTestReadWriteTest(std::string(av[1]), sz, inputFile, true); diff --git a/Modules/IO/NRRD/test/itkNrrdRGBAImageReadWriteTest.cxx b/Modules/IO/NRRD/test/itkNrrdRGBAImageReadWriteTest.cxx index 9d5b3c2fbec..65d6b950cb1 100644 --- a/Modules/IO/NRRD/test/itkNrrdRGBAImageReadWriteTest.cxx +++ b/Modules/IO/NRRD/test/itkNrrdRGBAImageReadWriteTest.cxx @@ -33,7 +33,7 @@ int itkNrrdRGBAImageReadWriteTest( int ac, char* av[] ) return EXIT_FAILURE; } - typedef itk::RGBAPixel PixelType; + typedef itk::RGBAPixel PixelType; typedef itk::Image myImage; itk::ImageFileReader::Pointer reader diff --git a/Modules/IO/NRRD/test/itkNrrdRGBImageReadWriteTest.cxx b/Modules/IO/NRRD/test/itkNrrdRGBImageReadWriteTest.cxx index dc1dfd526cd..61b5b9f10d0 100644 --- a/Modules/IO/NRRD/test/itkNrrdRGBImageReadWriteTest.cxx +++ b/Modules/IO/NRRD/test/itkNrrdRGBImageReadWriteTest.cxx @@ -33,7 +33,7 @@ int itkNrrdRGBImageReadWriteTest( int ac, char* av[] ) return EXIT_FAILURE; } - typedef itk::RGBPixel PixelType; + typedef itk::RGBPixel PixelType; typedef itk::Image myImage; itk::ImageFileReader::Pointer reader diff --git a/Modules/IO/PNG/src/itkPNGImageIO.cxx b/Modules/IO/PNG/src/itkPNGImageIO.cxx index 93a83c1a720..678523ea300 100644 --- a/Modules/IO/PNG/src/itkPNGImageIO.cxx +++ b/Modules/IO/PNG/src/itkPNGImageIO.cxx @@ -84,7 +84,7 @@ bool PNGImageIO::CanReadFile(const char *file) { return false; } - unsigned char header[8]; + uint8_t header[8]; size_t temp = fread(header, 1, 8, pngfp.m_FilePointer); if( temp != 8 ) { @@ -145,7 +145,7 @@ void PNGImageIO::Read(void *buffer) << itksys::SystemTools::GetLastSystemError() ); return; } - unsigned char header[8]; + uint8_t header[8]; size_t temp = fread(header, 1, 8, fp); if( temp != 8 ) { @@ -259,7 +259,7 @@ void PNGImageIO::Read(void *buffer) png_read_update_info(png_ptr, info_ptr); SizeValueType rowbytes = png_get_rowbytes(png_ptr, info_ptr); - unsigned char *tempImage = static_cast< unsigned char * >( buffer ); + uint8_t *tempImage = static_cast< uint8_t * >( buffer ); png_bytep * row_pointers = new png_bytep[height]; for ( unsigned int ui = 0; ui < height; ++ui ) { @@ -311,7 +311,7 @@ void PNGImageIO::ReadImageInformation() { return; } - unsigned char header[8]; + uint8_t header[8]; size_t temp = fread(header, 1, 8, fp); if( temp != 8 ) { @@ -500,7 +500,7 @@ void PNGImageIO::WriteSlice(const std::string & fileName, const void *buffer) // of the Exception and prevent the catch() from recognizing // it. // For details, see Bug #1872 in the bugtracker. - ::itk::ExceptionObject excp(__FILE__, __LINE__, "PNG supports unsigned char and unsigned short", ITK_LOCATION); + ::itk::ExceptionObject excp(__FILE__, __LINE__, "PNG supports uint8_t and uint16_t", ITK_LOCATION); throw excp; } } @@ -608,11 +608,11 @@ void PNGImageIO::WriteSlice(const std::string & fileName, const void *buffer) { const int rowInc = width * numComp * bitDepth / 8; - volatile const unsigned char *outPtr = ( (const unsigned char *)buffer ); + volatile const uint8_t *outPtr = ( (const uint8_t *)buffer ); for ( unsigned int ui = 0; ui < height; ui++ ) { row_pointers[ui] = const_cast< png_byte * >( outPtr ); - outPtr = const_cast< unsigned char * >( outPtr ) + rowInc; + outPtr = const_cast< uint8_t * >( outPtr ) + rowInc; } } png_write_image(png_ptr, row_pointers); diff --git a/Modules/IO/PNG/test/itkPNGImageIOTest.cxx b/Modules/IO/PNG/test/itkPNGImageIOTest.cxx index 0482ef81b4e..866b90a658d 100644 --- a/Modules/IO/PNG/test/itkPNGImageIOTest.cxx +++ b/Modules/IO/PNG/test/itkPNGImageIOTest.cxx @@ -34,7 +34,7 @@ int itkPNGImageIOTest(int argc, char * argv[]) } // We are converting read data into RGB pixel image - typedef itk::RGBPixel RGBPixelType; + typedef itk::RGBPixel RGBPixelType; typedef itk::Image RGBImageType; // Read in the image @@ -65,9 +65,9 @@ int itkPNGImageIOTest(int argc, char * argv[]) // - 2D degenerate image: The writer should write out the image. // - 1D image: The writer should write it out as a 2D image. - typedef itk::Image< unsigned short, 3 > ImageType3D; - typedef itk::Image< unsigned short, 2 > ImageType2D; - typedef itk::Image< unsigned short, 1 > ImageType1D; + typedef itk::Image< uint16_t, 3 > ImageType3D; + typedef itk::Image< uint16_t, 2 > ImageType2D; + typedef itk::Image< uint16_t, 1 > ImageType1D; //----------------------------------------------------------------// // 3D non-degenerate volume. diff --git a/Modules/IO/PhilipsREC/src/itkPhilipsRECImageIO.cxx b/Modules/IO/PhilipsREC/src/itkPhilipsRECImageIO.cxx index 53775ab15f3..a72e641c597 100644 --- a/Modules/IO/PhilipsREC/src/itkPhilipsRECImageIO.cxx +++ b/Modules/IO/PhilipsREC/src/itkPhilipsRECImageIO.cxx @@ -321,16 +321,16 @@ PhilipsRECImageIO::SwapBytesIfNecessary(void *buffer, ( (char *)buffer, numberOfPixels ); break; case UCHAR: - ByteSwapper< unsigned char >::SwapRangeFromSystemToLittleEndian - ( (unsigned char *)buffer, numberOfPixels ); + ByteSwapper< uint8_t >::SwapRangeFromSystemToLittleEndian + ( (uint8_t *)buffer, numberOfPixels ); break; case SHORT: ByteSwapper< short >::SwapRangeFromSystemToLittleEndian ( (short *)buffer, numberOfPixels ); break; case USHORT: - ByteSwapper< unsigned short >::SwapRangeFromSystemToLittleEndian - ( (unsigned short *)buffer, numberOfPixels ); + ByteSwapper< uint16_t >::SwapRangeFromSystemToLittleEndian + ( (uint16_t *)buffer, numberOfPixels ); break; case INT: ByteSwapper< int >::SwapRangeFromSystemToLittleEndian @@ -372,16 +372,16 @@ PhilipsRECImageIO::SwapBytesIfNecessary(void *buffer, ( (char *)buffer, numberOfPixels ); break; case UCHAR: - ByteSwapper< unsigned char >::SwapRangeFromSystemToBigEndian - ( (unsigned char *)buffer, numberOfPixels ); + ByteSwapper< uint8_t >::SwapRangeFromSystemToBigEndian + ( (uint8_t *)buffer, numberOfPixels ); break; case SHORT: ByteSwapper< short >::SwapRangeFromSystemToBigEndian ( (short *)buffer, numberOfPixels ); break; case USHORT: - ByteSwapper< unsigned short >::SwapRangeFromSystemToBigEndian - ( (unsigned short *)buffer, numberOfPixels ); + ByteSwapper< uint16_t >::SwapRangeFromSystemToBigEndian + ( (uint16_t *)buffer, numberOfPixels ); break; case INT: ByteSwapper< int >::SwapRangeFromSystemToBigEndian diff --git a/Modules/IO/PhilipsREC/test/itkPhilipsRECImageIOTest.cxx b/Modules/IO/PhilipsREC/test/itkPhilipsRECImageIOTest.cxx index 2490e2e9746..114576f258e 100644 --- a/Modules/IO/PhilipsREC/test/itkPhilipsRECImageIOTest.cxx +++ b/Modules/IO/PhilipsREC/test/itkPhilipsRECImageIOTest.cxx @@ -30,7 +30,7 @@ int itkPhilipsRECImageIOTest( int argc, char * argv [] ) return EXIT_FAILURE; } - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image< PixelType, 2 > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/IO/RAW/include/itkRawImageIO.h b/Modules/IO/RAW/include/itkRawImageIO.h index 35e4bbaf72c..7e8dd307793 100644 --- a/Modules/IO/RAW/include/itkRawImageIO.h +++ b/Modules/IO/RAW/include/itkRawImageIO.h @@ -107,11 +107,11 @@ class ITK_EXPORT RawImageIO:public ImageIOBase virtual void Read(void *buffer); /** Set/Get the Data mask. */ - itkGetConstReferenceMacro(ImageMask, unsigned short); + itkGetConstReferenceMacro(ImageMask, uint16_t); void SetImageMask(unsigned long val) { if ( val == m_ImageMask ) { return; } - m_ImageMask = ( (unsigned short)( val ) ); + m_ImageMask = ( (uint16_t)( val ) ); this->Modified(); } @@ -150,7 +150,7 @@ class ITK_EXPORT RawImageIO:public ImageIOBase unsigned long m_FileDimensionality; bool m_ManualHeaderSize; SizeValueType m_HeaderSize; - unsigned short m_ImageMask; + uint16_t m_ImageMask; }; template< class TPixel, unsigned int VImageDimension > diff --git a/Modules/IO/RAW/include/itkRawImageIO.hxx b/Modules/IO/RAW/include/itkRawImageIO.hxx index 52a17906b05..a9b587f1022 100644 --- a/Modules/IO/RAW/include/itkRawImageIO.hxx +++ b/Modules/IO/RAW/include/itkRawImageIO.hxx @@ -220,10 +220,10 @@ void RawImageIO< TPixel, VImageDimension > } // Swap bytes if necessary - if itkReadRawBytesAfterSwappingMacro(unsigned short, USHORT) + if itkReadRawBytesAfterSwappingMacro(uint16_t, USHORT) else if itkReadRawBytesAfterSwappingMacro(short, SHORT) else if itkReadRawBytesAfterSwappingMacro(char, CHAR) - else if itkReadRawBytesAfterSwappingMacro(unsigned char, UCHAR) + else if itkReadRawBytesAfterSwappingMacro(uint8_t, UCHAR) else if itkReadRawBytesAfterSwappingMacro(unsigned int, UINT) else if itkReadRawBytesAfterSwappingMacro(int, INT) else if itkReadRawBytesAfterSwappingMacro(long, LONG) @@ -301,10 +301,10 @@ void RawImageIO< TPixel, VImageDimension > } // Swap bytes if necessary - if itkWriteRawBytesAfterSwappingMacro(unsigned short, USHORT) + if itkWriteRawBytesAfterSwappingMacro(uint16_t, USHORT) else if itkWriteRawBytesAfterSwappingMacro(short, SHORT) else if itkWriteRawBytesAfterSwappingMacro(char, CHAR) - else if itkWriteRawBytesAfterSwappingMacro(unsigned char, UCHAR) + else if itkWriteRawBytesAfterSwappingMacro(uint8_t, UCHAR) else if itkWriteRawBytesAfterSwappingMacro(unsigned int, UINT) else if itkWriteRawBytesAfterSwappingMacro(int, INT) else if itkWriteRawBytesAfterSwappingMacro(long, LONG) diff --git a/Modules/IO/RAW/test/itkRawImageIOTest.cxx b/Modules/IO/RAW/test/itkRawImageIOTest.cxx index fdf1454bba7..b0d5a76cd4f 100644 --- a/Modules/IO/RAW/test/itkRawImageIOTest.cxx +++ b/Modules/IO/RAW/test/itkRawImageIOTest.cxx @@ -27,7 +27,7 @@ int itkRawImageIOTest(int argc, char* argv[]) { - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef ImageType::PixelType PixelType; typedef itk::ImageRegionConstIterator< ImageType > ImageIteratorType; @@ -53,8 +53,8 @@ int itkRawImageIOTest(int argc, char* argv[]) // Create a mapper (in this case a writer). A mapper // is templated on the input type. // - itk::RawImageIO::Pointer io; - io = itk::RawImageIO::New(); + itk::RawImageIO::Pointer io; + io = itk::RawImageIO::New(); // io->SetFileTypeToASCII(); diff --git a/Modules/IO/RAW/test/itkRawImageIOTest2.cxx b/Modules/IO/RAW/test/itkRawImageIOTest2.cxx index 689f4931756..8747d608d74 100644 --- a/Modules/IO/RAW/test/itkRawImageIOTest2.cxx +++ b/Modules/IO/RAW/test/itkRawImageIOTest2.cxx @@ -40,7 +40,7 @@ int itkRawImageIOTest2(int argc, char * argv []) // itk::OutputWindow::GetInstance()->PromptUserOn(); // We are reading a RGB pixel - typedef itk::RGBPixel RGBPixelType; + typedef itk::RGBPixel RGBPixelType; // Create a source object (in this case a reader) itk::RawImageIO::Pointer io; diff --git a/Modules/IO/RAW/test/itkRawImageIOTest3.cxx b/Modules/IO/RAW/test/itkRawImageIOTest3.cxx index fb7be635f0f..5a0c606ba37 100644 --- a/Modules/IO/RAW/test/itkRawImageIOTest3.cxx +++ b/Modules/IO/RAW/test/itkRawImageIOTest3.cxx @@ -26,7 +26,7 @@ int itkRawImageIOTest3(int argc, char*argv[]) { - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef ImageType::PixelType PixelType; typedef itk::ImageRegionIterator< diff --git a/Modules/IO/RAW/test/itkRawImageIOTest4.cxx b/Modules/IO/RAW/test/itkRawImageIOTest4.cxx index fe20616aa2f..366ad390f60 100644 --- a/Modules/IO/RAW/test/itkRawImageIOTest4.cxx +++ b/Modules/IO/RAW/test/itkRawImageIOTest4.cxx @@ -118,7 +118,7 @@ int Read( const char *filename , bool ReadBigEndian, unsigned int dims[] ) int itkRawImageIOTest4(int argc, char*argv[]) { - typedef unsigned short PixelType; + typedef uint16_t PixelType; const unsigned int ImageDimension = 2; typedef itk::RawImageIO IOType; diff --git a/Modules/IO/RAW/test/itkRawImageIOTest5.cxx b/Modules/IO/RAW/test/itkRawImageIOTest5.cxx index 5338965f91b..c62765f9fb5 100644 --- a/Modules/IO/RAW/test/itkRawImageIOTest5.cxx +++ b/Modules/IO/RAW/test/itkRawImageIOTest5.cxx @@ -29,7 +29,7 @@ class RawImageReaderAndWriter { public: - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::RawImageIO< PixelType, 2 > RawImageIOType; @@ -228,11 +228,11 @@ int itkRawImageIOTest5(int argc, char*argv[]) // - // Test the pixel type = "signed char" + // Test the pixel type = "int8_t" // - std::cout << "Testing for pixel type = signed char " << std::endl; + std::cout << "Testing for pixel type = int8_t " << std::endl; - RawImageReaderAndWriter< signed char > tester2; + RawImageReaderAndWriter< int8_t > tester2; filename = directory + "/RawImageIOTest5b.raw"; @@ -245,7 +245,7 @@ int itkRawImageIOTest5(int argc, char*argv[]) } catch( itk::ExceptionObject & excp ) { - std::cerr << "Exception caught while writing signed char type." << std::endl; + std::cerr << "Exception caught while writing int8_t type." << std::endl; std::cerr << excp << std::endl; return EXIT_FAILURE; } @@ -257,14 +257,14 @@ int itkRawImageIOTest5(int argc, char*argv[]) } catch( itk::ExceptionObject & excp ) { - std::cerr << "Exception caught while reading signed char type." << std::endl; + std::cerr << "Exception caught while reading int8_t type." << std::endl; std::cerr << excp << std::endl; return EXIT_FAILURE; } if( tester2.GetError() ) { - std::cerr << "Error while comparing the signed char type images." << std::endl; + std::cerr << "Error while comparing the int8_t type images." << std::endl; return EXIT_FAILURE; } @@ -273,11 +273,11 @@ int itkRawImageIOTest5(int argc, char*argv[]) // - // Test the pixel type = "unsigned char" + // Test the pixel type = "uint8_t" // - std::cout << "Testing for pixel type = unsigned char " << std::endl; + std::cout << "Testing for pixel type = uint8_t " << std::endl; - RawImageReaderAndWriter< unsigned char > tester3; + RawImageReaderAndWriter< uint8_t > tester3; filename = directory + "/RawImageIOTest5c.raw"; @@ -291,7 +291,7 @@ int itkRawImageIOTest5(int argc, char*argv[]) } catch( itk::ExceptionObject & excp ) { - std::cerr << "Exception caught while writing unsigned char type." << std::endl; + std::cerr << "Exception caught while writing uint8_t type." << std::endl; std::cerr << excp << std::endl; return EXIT_FAILURE; } @@ -303,14 +303,14 @@ int itkRawImageIOTest5(int argc, char*argv[]) } catch( itk::ExceptionObject & excp ) { - std::cerr << "Exception caught while reading unsigned char type." << std::endl; + std::cerr << "Exception caught while reading uint8_t type." << std::endl; std::cerr << excp << std::endl; return EXIT_FAILURE; } if( tester3.GetError() ) { - std::cerr << "Error while comparing the unsigned char type images." << std::endl; + std::cerr << "Error while comparing the uint8_t type images." << std::endl; return EXIT_FAILURE; } diff --git a/Modules/IO/Siemens/include/itkSiemensVisionImageIO.h b/Modules/IO/Siemens/include/itkSiemensVisionImageIO.h index 46ad9eb0bbe..ac9ab1696dc 100644 --- a/Modules/IO/Siemens/include/itkSiemensVisionImageIO.h +++ b/Modules/IO/Siemens/include/itkSiemensVisionImageIO.h @@ -83,7 +83,7 @@ class ITK_EXPORT SiemensVisionImageIO:public IPLCommonImageIO // virtual void Read(void* buffer); /* * Compute the size (in bytes) of the components of a pixel. For - * example, and RGB pixel of unsigned char would have a + * example, and RGB pixel of uint8_t would have a * component size of 1 byte. */ // Implemented in superclass // virtual unsigned int GetComponentSize() const; diff --git a/Modules/IO/SpatialObjects/include/itkSpatialObjectReader.h b/Modules/IO/SpatialObjects/include/itkSpatialObjectReader.h index 8d193cc8b4d..67ceca2d61a 100644 --- a/Modules/IO/SpatialObjects/include/itkSpatialObjectReader.h +++ b/Modules/IO/SpatialObjects/include/itkSpatialObjectReader.h @@ -31,7 +31,7 @@ namespace itk * \ingroup ITKIOSpatialObjects */ template< unsigned int NDimensions = 3, - typename PixelType = unsigned char, + typename PixelType = uint8_t, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions > > class SpatialObjectReader:public Object diff --git a/Modules/IO/SpatialObjects/include/itkSpatialObjectWriter.h b/Modules/IO/SpatialObjects/include/itkSpatialObjectWriter.h index 2c56127f61b..9b150bfbbbd 100644 --- a/Modules/IO/SpatialObjects/include/itkSpatialObjectWriter.h +++ b/Modules/IO/SpatialObjects/include/itkSpatialObjectWriter.h @@ -30,7 +30,7 @@ namespace itk * \ingroup ITKIOSpatialObjects */ template< unsigned int NDimensions = 3, - typename PixelType = unsigned char, + typename PixelType = uint8_t, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions > diff --git a/Modules/IO/SpatialObjects/test/itkReadWriteSpatialObjectTest.cxx b/Modules/IO/SpatialObjects/test/itkReadWriteSpatialObjectTest.cxx index a1d4d661f74..4ed7bb50d23 100644 --- a/Modules/IO/SpatialObjects/test/itkReadWriteSpatialObjectTest.cxx +++ b/Modules/IO/SpatialObjects/test/itkReadWriteSpatialObjectTest.cxx @@ -41,11 +41,11 @@ int itkReadWriteSpatialObjectTest(int argc, char* argv[]) typedef itk::ContourSpatialObject<3> ContourType; - typedef itk::ImageSpatialObject<3,unsigned short> ImageType; + typedef itk::ImageSpatialObject<3,uint16_t> ImageType; typedef itk::ImageMaskSpatialObject<3> ImageMaskType; - typedef itk::SpatialObjectWriter<3,unsigned short> WriterType; - typedef itk::SpatialObjectReader<3,unsigned short> ReaderType; + typedef itk::SpatialObjectWriter<3,uint16_t> WriterType; + typedef itk::SpatialObjectReader<3,uint16_t> ReaderType; typedef itk::TubeSpatialObjectPoint<3> TubePointType; typedef itk::VesselTubeSpatialObjectPoint<3> VesselTubePointType; @@ -730,7 +730,7 @@ int itkReadWriteSpatialObjectTest(int argc, char* argv[]) maskFound = true; itkImageMaskType::ConstPointer constImage = dynamic_cast((*obj).GetPointer())->GetImage(); itk::ImageRegionConstIteratorWithIndex< itkImageMaskType > it(constImage, constImage->GetLargestPossibleRegion()); - for(unsigned char i = 0; !it.IsAtEnd(); i++, ++it) + for(uint8_t i = 0; !it.IsAtEnd(); i++, ++it) { if(it.Get() != i) { diff --git a/Modules/IO/TIFF/include/itkTIFFImageIO.h b/Modules/IO/TIFF/include/itkTIFFImageIO.h index 04b0e504908..8f0c96307cb 100644 --- a/Modules/IO/TIFF/include/itkTIFFImageIO.h +++ b/Modules/IO/TIFF/include/itkTIFFImageIO.h @@ -148,8 +148,8 @@ class ITK_EXPORT TIFFImageIO:public ImageIOBase unsigned int GetFormat(); - void GetColor(int index, unsigned short *red, - unsigned short *green, unsigned short *blue); + void GetColor(int index, uint16_t *red, + uint16_t *green, uint16_t *blue); // Check that tag t can be found bool CanFindTIFFTag(unsigned int t); @@ -170,9 +170,9 @@ class ITK_EXPORT TIFFImageIO:public ImageIOBase TIFFImageIO(const Self &); //purposely not implemented void operator=(const Self &); //purposely not implemented - unsigned short *m_ColorRed; - unsigned short *m_ColorGreen; - unsigned short *m_ColorBlue; + uint16_t *m_ColorRed; + uint16_t *m_ColorGreen; + uint16_t *m_ColorBlue; int m_TotalColors; unsigned int m_ImageFormat; }; diff --git a/Modules/IO/TIFF/src/itkTIFFImageIO.cxx b/Modules/IO/TIFF/src/itkTIFFImageIO.cxx index b1c3646a762..48c49043407 100644 --- a/Modules/IO/TIFF/src/itkTIFFImageIO.cxx +++ b/Modules/IO/TIFF/src/itkTIFFImageIO.cxx @@ -39,15 +39,15 @@ class TIFFReaderInternal bool m_IsOpen; uint32_t m_Width; uint32_t m_Height; - unsigned short m_NumberOfPages; - unsigned short m_CurrentPage; - unsigned short m_SamplesPerPixel; - unsigned short m_Compression; - unsigned short m_BitsPerSample; - unsigned short m_Photometrics; + uint16_t m_NumberOfPages; + uint16_t m_CurrentPage; + uint16_t m_SamplesPerPixel; + uint16_t m_Compression; + uint16_t m_BitsPerSample; + uint16_t m_Photometrics; bool m_HasValidPhotometricInterpretation; - unsigned short m_PlanarConfig; - unsigned short m_Orientation; + uint16_t m_PlanarConfig; + uint16_t m_Orientation; uint32 m_TileDepth; unsigned int m_TileRows; unsigned int m_TileColumns; @@ -310,7 +310,7 @@ void TIFFImageIO::ReadTwoSamplesPerPixelImage(void *out, if ( m_ComponentType == UCHAR ) { - unsigned char *image; + uint8_t *image; if ( m_InternalImage->m_PlanarConfig == PLANARCONFIG_CONTIG ) { for ( row = 0; row < (int)height; row++ ) @@ -323,18 +323,18 @@ void TIFFImageIO::ReadTwoSamplesPerPixelImage(void *out, if ( m_InternalImage->m_Orientation == ORIENTATION_TOPLEFT ) { - image = reinterpret_cast< unsigned char * >( out ) + row * width * inc; + image = reinterpret_cast< uint8_t * >( out ) + row * width * inc; } else { - image = reinterpret_cast< unsigned char * >( out ) + width * inc * ( height - ( row + 1 ) ); + image = reinterpret_cast< uint8_t * >( out ) + width * inc * ( height - ( row + 1 ) ); } for ( cc = 0; cc < isize; cc += m_InternalImage->m_SamplesPerPixel ) { inc = this->EvaluateImageAt(image, - static_cast< unsigned char * >( buf ) + static_cast< uint8_t * >( buf ) + cc); image += inc; } @@ -359,11 +359,11 @@ void TIFFImageIO::ReadTwoSamplesPerPixelImage(void *out, if ( m_InternalImage->m_Orientation == ORIENTATION_TOPLEFT ) { - image = reinterpret_cast< unsigned char * >( out ) + row * width * inc; + image = reinterpret_cast< uint8_t * >( out ) + row * width * inc; } else { - image = reinterpret_cast< unsigned char * >( out ) + width * inc * ( height - ( row + 1 ) ); + image = reinterpret_cast< uint8_t * >( out ) + width * inc * ( height - ( row + 1 ) ); } // We translate the output pixel to be on the right RGB @@ -371,7 +371,7 @@ void TIFFImageIO::ReadTwoSamplesPerPixelImage(void *out, for ( cc = 0; cc < isize; cc += 1 ) { - ( *image ) = *( static_cast< unsigned char * >( buf ) + cc ); + ( *image ) = *( static_cast< uint8_t * >( buf ) + cc ); inc = 3; image += inc; } @@ -382,7 +382,7 @@ void TIFFImageIO::ReadTwoSamplesPerPixelImage(void *out, else if ( m_ComponentType == USHORT ) { isize /= 2; - unsigned short *image; + uint16_t *image; if ( m_InternalImage->m_PlanarConfig == PLANARCONFIG_CONTIG ) { for ( row = 0; row < (int)height; row++ ) @@ -395,18 +395,18 @@ void TIFFImageIO::ReadTwoSamplesPerPixelImage(void *out, if ( m_InternalImage->m_Orientation == ORIENTATION_TOPLEFT ) { - image = reinterpret_cast< unsigned short * >( out ) + row * width * inc; + image = reinterpret_cast< uint16_t * >( out ) + row * width * inc; } else { - image = reinterpret_cast< unsigned short * >( out ) + width * inc * ( height - ( row + 1 ) ); + image = reinterpret_cast< uint16_t * >( out ) + width * inc * ( height - ( row + 1 ) ); } for ( cc = 0; cc < isize; cc += m_InternalImage->m_SamplesPerPixel ) { inc = this->EvaluateImageAt(image, - static_cast< unsigned short * >( buf ) + static_cast< uint16_t * >( buf ) + cc); image += inc; } @@ -428,18 +428,18 @@ void TIFFImageIO::ReadTwoSamplesPerPixelImage(void *out, if ( m_InternalImage->m_Orientation == ORIENTATION_TOPLEFT ) { - image = reinterpret_cast< unsigned short * >( out ) + row * width * inc; + image = reinterpret_cast< uint16_t * >( out ) + row * width * inc; } else { - image = reinterpret_cast< unsigned short * >( out ) + width * inc * ( height - ( row + 1 ) ); + image = reinterpret_cast< uint16_t * >( out ) + width * inc * ( height - ( row + 1 ) ); } // We translate the output pixel to be on the right RGB image += s; for ( cc = 0; cc < isize; cc += 1 ) { - ( *image ) = *( static_cast< unsigned short * >( buf ) + cc ); + ( *image ) = *( static_cast< uint16_t * >( buf ) + cc ); inc = 3; image += inc; } @@ -495,7 +495,7 @@ void TIFFImageIO::ReadGenericImage(void *out, if ( m_ComponentType == UCHAR ) { - unsigned char *image; + uint8_t *image; if ( m_InternalImage->m_PlanarConfig == PLANARCONFIG_CONTIG ) { for ( row = 0; row < (int)height; row++ ) @@ -508,18 +508,18 @@ void TIFFImageIO::ReadGenericImage(void *out, if ( m_InternalImage->m_Orientation == ORIENTATION_TOPLEFT ) { - image = reinterpret_cast< unsigned char * >( out ) + row * width * inc; + image = reinterpret_cast< uint8_t * >( out ) + row * width * inc; } else { - image = reinterpret_cast< unsigned char * >( out ) + width * inc * ( height - ( row + 1 ) ); + image = reinterpret_cast< uint8_t * >( out ) + width * inc * ( height - ( row + 1 ) ); } for ( cc = 0; cc < isize; cc += m_InternalImage->m_SamplesPerPixel ) { inc = this->EvaluateImageAt(image, - static_cast< unsigned char * >( buf ) + static_cast< uint8_t * >( buf ) + cc); image += inc; } @@ -543,18 +543,18 @@ void TIFFImageIO::ReadGenericImage(void *out, inc = 3; if ( m_InternalImage->m_Orientation == ORIENTATION_TOPLEFT ) { - image = reinterpret_cast< unsigned char * >( out ) + row * width * inc; + image = reinterpret_cast< uint8_t * >( out ) + row * width * inc; } else { - image = reinterpret_cast< unsigned char * >( out ) + width * inc * ( height - ( row + 1 ) ); + image = reinterpret_cast< uint8_t * >( out ) + width * inc * ( height - ( row + 1 ) ); } for ( cc = 0; cc < isize; cc += m_InternalImage->m_SamplesPerPixel ) { inc = this->EvaluateImageAt(image, - static_cast< unsigned char * >( buf ) + static_cast< uint8_t * >( buf ) + cc); image += inc; } @@ -634,7 +634,7 @@ void TIFFImageIO::ReadGenericImage(void *out, else if ( m_ComponentType == USHORT ) { isize /= 2; - unsigned short *image; + uint16_t *image; if ( m_InternalImage->m_PlanarConfig == PLANARCONFIG_CONTIG ) { for ( row = 0; row < (int)height; row++ ) @@ -647,18 +647,18 @@ void TIFFImageIO::ReadGenericImage(void *out, if ( m_InternalImage->m_Orientation == ORIENTATION_TOPLEFT ) { - image = reinterpret_cast< unsigned short * >( out ) + row * width * inc; + image = reinterpret_cast< uint16_t * >( out ) + row * width * inc; } else { - image = reinterpret_cast< unsigned short * >( out ) + width * inc * ( height - ( row + 1 ) ); + image = reinterpret_cast< uint16_t * >( out ) + width * inc * ( height - ( row + 1 ) ); } for ( cc = 0; cc < isize; cc += m_InternalImage->m_SamplesPerPixel ) { inc = this->EvaluateImageAt(image, - static_cast< unsigned short * >( buf ) + static_cast< uint16_t * >( buf ) + cc); image += inc; } @@ -680,17 +680,17 @@ void TIFFImageIO::ReadGenericImage(void *out, if ( m_InternalImage->m_Orientation == ORIENTATION_TOPLEFT ) { - image = reinterpret_cast< unsigned short * >( out ) + row * width * inc; + image = reinterpret_cast< uint16_t * >( out ) + row * width * inc; } else { - image = reinterpret_cast< unsigned short * >( out ) + width * inc * ( height - ( row + 1 ) ); + image = reinterpret_cast< uint16_t * >( out ) + width * inc * ( height - ( row + 1 ) ); } for ( cc = 0; cc < isize; cc += m_InternalImage->m_SamplesPerPixel ) { inc = this->EvaluateImageAt(image, - static_cast< unsigned short * >( buf ) + static_cast< uint16_t * >( buf ) + cc); image += inc; } @@ -838,11 +838,11 @@ void TIFFImageIO::ReadGenericImage(void *out, int TIFFImageIO::EvaluateImageAt(void *out, void *in) { - unsigned char *image = (unsigned char *)out; - unsigned char *source = (unsigned char *)in; + uint8_t *image = (uint8_t *)out; + uint8_t *source = (uint8_t *)in; int increment; - unsigned short red, green, blue, alpha; + uint16_t red, green, blue, alpha; switch ( this->GetFormat() ) { @@ -852,8 +852,8 @@ int TIFFImageIO::EvaluateImageAt(void *out, void *in) { if ( m_ComponentType == USHORT ) { - unsigned short *image_us = (unsigned short *)out; - unsigned short *source_us = (unsigned short *)in; + uint16_t *image_us = (uint16_t *)out; + uint16_t *source_us = (uint16_t *)in; *image_us = *source_us; } else if ( m_ComponentType == SHORT ) @@ -887,14 +887,14 @@ int TIFFImageIO::EvaluateImageAt(void *out, void *in) break; case TIFFImageIO::PALETTE_GRAYSCALE: this->GetColor(*source, &red, &green, &blue); - *image = static_cast< unsigned char >( red >> 8 ); + *image = static_cast< uint8_t >( red >> 8 ); increment = 1; break; case TIFFImageIO::RGB_: if ( m_ComponentType == USHORT ) { - unsigned short *image_us = (unsigned short *)out; - unsigned short *source_us = (unsigned short *)in; + uint16_t *image_us = (uint16_t *)out; + uint16_t *source_us = (uint16_t *)in; red = *( source_us ); green = *( source_us + 1 ); @@ -927,8 +927,8 @@ int TIFFImageIO::EvaluateImageAt(void *out, void *in) case TIFFImageIO::PALETTE_RGB: if ( m_ComponentType == USHORT ) { - unsigned short *image_us = (unsigned short *)out; - unsigned short *source_us = (unsigned short *)in; + uint16_t *image_us = (uint16_t *)out; + uint16_t *source_us = (uint16_t *)in; this->GetColor(*source_us, &red, &green, &blue); *( image_us ) = red << 8; *( image_us + 1 ) = green << 8; @@ -953,9 +953,9 @@ int TIFFImageIO::EvaluateImageAt(void *out, void *in) else { this->GetColor(*source, &red, &green, &blue); - *( image ) = static_cast< unsigned char >( red >> 8 ); - *( image + 1 ) = static_cast< unsigned char >( green >> 8 ); - *( image + 2 ) = static_cast< unsigned char >( blue >> 8 ); + *( image ) = static_cast< uint8_t >( red >> 8 ); + *( image + 1 ) = static_cast< uint8_t >( green >> 8 ); + *( image + 2 ) = static_cast< uint8_t >( blue >> 8 ); } increment = 3; break; @@ -966,8 +966,8 @@ int TIFFImageIO::EvaluateImageAt(void *out, void *in) return increment; } -void TIFFImageIO::GetColor(int index, unsigned short *red, - unsigned short *green, unsigned short *blue) +void TIFFImageIO::GetColor(int index, uint16_t *red, + uint16_t *green, uint16_t *blue) { *red = 0; *green = 0; @@ -992,7 +992,7 @@ void TIFFImageIO::GetColor(int index, unsigned short *red, return; } - unsigned short photometric; + uint16_t photometric; if ( !TIFFGetField(m_InternalImage->m_Image, TIFFTAG_PHOTOMETRIC, &photometric) ) { @@ -1003,7 +1003,7 @@ void TIFFImageIO::GetColor(int index, unsigned short *red, } } - unsigned short *red_orig, *green_orig, *blue_orig; + uint16_t *red_orig, *green_orig, *blue_orig; switch ( m_InternalImage->m_BitsPerSample ) { @@ -1064,7 +1064,7 @@ unsigned int TIFFImageIO::GetFormat() case PHOTOMETRIC_PALETTE: for ( cc = 0; cc < 256; cc++ ) { - unsigned short red, green, blue; + uint16_t red, green, blue; this->GetColor(cc, &red, &green, &blue); if ( red != green || red != blue ) { @@ -1082,15 +1082,15 @@ unsigned int TIFFImageIO::GetFormat() /** Read a tiled tiff */ void TIFFImageIO::ReadTiles(void *buffer) { - unsigned char *volume = reinterpret_cast< unsigned char * >( buffer ); + uint8_t *volume = reinterpret_cast< uint8_t * >( buffer ); for ( unsigned int col = 0; col < m_InternalImage->m_Width; col += m_InternalImage->m_TileWidth ) { for ( unsigned int row = 0; row < m_InternalImage->m_Height; row += m_InternalImage->m_TileHeight ) { - unsigned char *tempImage; + uint8_t *tempImage; tempImage = - new unsigned char[m_InternalImage->m_TileWidth * m_InternalImage->m_TileHeight + new uint8_t[m_InternalImage->m_TileWidth * m_InternalImage->m_TileHeight * m_InternalImage->m_SamplesPerPixel]; if ( TIFFReadTile(m_InternalImage->m_Image, tempImage, col, row, 0, 0) < 0 ) @@ -1153,7 +1153,7 @@ void TIFFImageIO::ReadVolume(void *buffer) { if ( m_ComponentType == USHORT ) { - unsigned short *volume = reinterpret_cast< unsigned short * >( buffer ); + uint16_t *volume = reinterpret_cast< uint16_t * >( buffer ); volume += width * height * m_InternalImage->m_SamplesPerPixel * page; this->ReadTwoSamplesPerPixelImage(volume, width, height); } @@ -1171,7 +1171,7 @@ void TIFFImageIO::ReadVolume(void *buffer) } else { - unsigned char *volume = reinterpret_cast< unsigned char * >( buffer ); + uint8_t *volume = reinterpret_cast< uint8_t * >( buffer ); volume += width * height * m_InternalImage->m_SamplesPerPixel * page; this->ReadTwoSamplesPerPixelImage(volume, width, height); } @@ -1198,17 +1198,17 @@ void TIFFImageIO::ReadVolume(void *buffer) if ( m_ComponentType == USHORT ) { - unsigned short *fimage = (unsigned short *)buffer; + uint16_t *fimage = (uint16_t *)buffer; fimage += width * height * 4 * page; for ( yy = 0; yy < height; yy++ ) { ssimage = tempImage + ( height - yy - 1 ) * width; for ( xx = 0; xx < width; xx++ ) { - unsigned short red = static_cast< unsigned short >( TIFFGetR(*ssimage) ); - unsigned short green = static_cast< unsigned short >( TIFFGetG(*ssimage) ); - unsigned short blue = static_cast< unsigned short >( TIFFGetB(*ssimage) ); - unsigned short alpha = static_cast< unsigned short >( TIFFGetA(*ssimage) ); + uint16_t red = static_cast< uint16_t >( TIFFGetR(*ssimage) ); + uint16_t green = static_cast< uint16_t >( TIFFGetG(*ssimage) ); + uint16_t blue = static_cast< uint16_t >( TIFFGetB(*ssimage) ); + uint16_t alpha = static_cast< uint16_t >( TIFFGetA(*ssimage) ); *( fimage ) = red; *( fimage + 1 ) = green; @@ -1267,17 +1267,17 @@ void TIFFImageIO::ReadVolume(void *buffer) } else { - unsigned char *fimage = (unsigned char *)buffer; + uint8_t *fimage = (uint8_t *)buffer; fimage += width * height * 4 * page / 2; for ( yy = 0; yy < height; yy++ ) { ssimage = tempImage + ( height - yy - 1 ) * width; for ( xx = 0; xx < width; xx++ ) { - unsigned char red = static_cast< unsigned char >( TIFFGetR(*ssimage) ); - unsigned char green = static_cast< unsigned char >( TIFFGetG(*ssimage) ); - unsigned char blue = static_cast< unsigned char >( TIFFGetB(*ssimage) ); - unsigned char alpha = static_cast< unsigned char >( TIFFGetA(*ssimage) ); + uint8_t red = static_cast< uint8_t >( TIFFGetR(*ssimage) ); + uint8_t green = static_cast< uint8_t >( TIFFGetG(*ssimage) ); + uint8_t blue = static_cast< uint8_t >( TIFFGetB(*ssimage) ); + uint8_t alpha = static_cast< uint8_t >( TIFFGetA(*ssimage) ); *( fimage ) = red; *( fimage + 1 ) = green; @@ -1304,7 +1304,7 @@ void TIFFImageIO::ReadVolume(void *buffer) case TIFFImageIO::PALETTE_GRAYSCALE: if ( m_ComponentType == USHORT ) { - unsigned short *volume = reinterpret_cast< unsigned short * >( buffer ); + uint16_t *volume = reinterpret_cast< uint16_t * >( buffer ); volume += width * height * m_InternalImage->m_SamplesPerPixel * page; this->ReadGenericImage(volume, width, height); } @@ -1328,7 +1328,7 @@ void TIFFImageIO::ReadVolume(void *buffer) } else { - unsigned char *volume = reinterpret_cast< unsigned char * >( buffer ); + uint8_t *volume = reinterpret_cast< uint8_t * >( buffer ); volume += width * height * m_InternalImage->m_SamplesPerPixel * page; this->ReadGenericImage(volume, width, height); } @@ -1339,7 +1339,7 @@ void TIFFImageIO::ReadVolume(void *buffer) // consists of RGB. if ( m_ComponentType == USHORT ) { - unsigned short *volume = reinterpret_cast< unsigned short * >( buffer ); + uint16_t *volume = reinterpret_cast< uint16_t * >( buffer ); volume += width * height * m_InternalImage->m_SamplesPerPixel * page * 3; this->ReadGenericImage(volume, width, height); } @@ -1357,7 +1357,7 @@ void TIFFImageIO::ReadVolume(void *buffer) } else { - unsigned char *volume = reinterpret_cast< unsigned char * >( buffer ); + uint8_t *volume = reinterpret_cast< uint8_t * >( buffer ); volume += width * height * m_InternalImage->m_SamplesPerPixel * page * 3; this->ReadGenericImage(volume, width, height); } @@ -1428,17 +1428,17 @@ void TIFFImageIO::Read(void *buffer) } int xx, yy; uint32 * ssimage; - unsigned char *fimage = (unsigned char *)buffer; + uint8_t *fimage = (uint8_t *)buffer; for ( yy = 0; yy < height; yy++ ) { ssimage = tempImage + ( height - yy - 1 ) * width; for ( xx = 0; xx < width; xx++ ) { - unsigned char red = static_cast< unsigned char >( TIFFGetR(*ssimage) ); - unsigned char green = static_cast< unsigned char >( TIFFGetG(*ssimage) ); - unsigned char blue = static_cast< unsigned char >( TIFFGetB(*ssimage) ); - unsigned char alpha = static_cast< unsigned char >( TIFFGetA(*ssimage) ); + uint8_t red = static_cast< uint8_t >( TIFFGetR(*ssimage) ); + uint8_t green = static_cast< uint8_t >( TIFFGetG(*ssimage) ); + uint8_t blue = static_cast< uint8_t >( TIFFGetB(*ssimage) ); + uint8_t alpha = static_cast< uint8_t >( TIFFGetA(*ssimage) ); *( fimage ) = red; *( fimage + 1 ) = green; @@ -1755,7 +1755,7 @@ void TIFFImageIO::InternalWrite(const void *buffer) break; default: itkExceptionMacro( - << "TIFF supports unsigned/signed char, unsigned/signed short, and float"); + << "TIFF supports unsigned/int8_t, unsigned/int16_t, and float"); } int predictor; @@ -1912,10 +1912,10 @@ void TIFFImageIO::InternalWrite(const void *buffer) switch ( this->GetComponentType() ) { case UCHAR: - rowLength = sizeof( unsigned char ); + rowLength = sizeof( uint8_t ); break; case USHORT: - rowLength = sizeof( unsigned short ); + rowLength = sizeof( uint16_t ); break; case CHAR: rowLength = sizeof( char ); @@ -1928,7 +1928,7 @@ void TIFFImageIO::InternalWrite(const void *buffer) break; default: itkExceptionMacro( - << "TIFF supports unsigned/signed char, unsigned/signed short, and float"); + << "TIFF supports unsigned/int8_t, unsigned/int16_t, and float"); } rowLength *= this->GetNumberOfComponents(); diff --git a/Modules/IO/TIFF/test/itkLargeTIFFImageWriteReadTest.cxx b/Modules/IO/TIFF/test/itkLargeTIFFImageWriteReadTest.cxx index 4ad5d5e6d4a..c0910b770c1 100644 --- a/Modules/IO/TIFF/test/itkLargeTIFFImageWriteReadTest.cxx +++ b/Modules/IO/TIFF/test/itkLargeTIFFImageWriteReadTest.cxx @@ -178,7 +178,7 @@ int itkLargeTIFFImageWriteReadTest(int ac, char* argv[]) { const unsigned int Dimension = 2; - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image< PixelType, Dimension> ImageType; ImageType::SizeType size; @@ -192,7 +192,7 @@ int itkLargeTIFFImageWriteReadTest(int ac, char* argv[]) { const unsigned int Dimension = 3; - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image< PixelType, Dimension> ImageType; ImageType::SizeType size; diff --git a/Modules/IO/TIFF/test/itkTIFFImageIOTest.cxx b/Modules/IO/TIFF/test/itkTIFFImageIOTest.cxx index 93ab40d77cd..445b68b36e0 100644 --- a/Modules/IO/TIFF/test/itkTIFFImageIOTest.cxx +++ b/Modules/IO/TIFF/test/itkTIFFImageIOTest.cxx @@ -130,14 +130,14 @@ int itkTIFFImageIOTest( int argc, char* argv[] ) if (dimension == 2 && pixelType == 1) { - typedef itk::RGBPixel PixelType; + typedef itk::RGBPixel PixelType; itk::Image::Pointer dummy; return DoIt >( argc, argv, dummy); } else if (dimension == 2 && pixelType == 2) { - typedef itk::RGBPixel PixelType; + typedef itk::RGBPixel PixelType; itk::Image::Pointer dummy; return DoIt >( argc, argv, dummy); } @@ -149,13 +149,13 @@ int itkTIFFImageIOTest( int argc, char* argv[] ) } else if (dimension == 3 && pixelType == 1) { - itk::Image::Pointer dummy; - return DoIt >( argc, argv, dummy); + itk::Image::Pointer dummy; + return DoIt >( argc, argv, dummy); } else if (dimension == 3 && pixelType == 2) { - itk::Image::Pointer dummy; - return DoIt >( argc, argv, dummy); + itk::Image::Pointer dummy; + return DoIt >( argc, argv, dummy); } else if (dimension == 3 && pixelType == 3) { @@ -169,13 +169,13 @@ int itkTIFFImageIOTest( int argc, char* argv[] ) } else if (dimension == 4 && pixelType == 1) { - itk::Image::Pointer dummy; - return DoIt >( argc, argv, dummy); + itk::Image::Pointer dummy; + return DoIt >( argc, argv, dummy); } else if (dimension == 4 && pixelType == 2) { - itk::Image::Pointer dummy; - return DoIt >( argc, argv, dummy); + itk::Image::Pointer dummy; + return DoIt >( argc, argv, dummy); } else if (dimension == 4 && pixelType == 3) { diff --git a/Modules/IO/TIFF/test/itkTIFFImageIOTest2.cxx b/Modules/IO/TIFF/test/itkTIFFImageIOTest2.cxx index 76ee1775720..33a5d40bace 100644 --- a/Modules/IO/TIFF/test/itkTIFFImageIOTest2.cxx +++ b/Modules/IO/TIFF/test/itkTIFFImageIOTest2.cxx @@ -28,7 +28,7 @@ int itkTIFFImageIOTest2( int argc, char* argv[] ) } const unsigned int Dimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Modules/IO/VTK/test/itkVTKImageIO2Test.cxx b/Modules/IO/VTK/test/itkVTKImageIO2Test.cxx index 15828321790..37c6de292bc 100644 --- a/Modules/IO/VTK/test/itkVTKImageIO2Test.cxx +++ b/Modules/IO/VTK/test/itkVTKImageIO2Test.cxx @@ -332,33 +332,33 @@ int itkVTKImageIO2Test(int argc, char* argv[]) // test all usable pixel types // - // unsigned char (ascii) - if (!(VTKImageIOTester::Write( filePrefix, outputPath, true ))) + // uint8_t (ascii) + if (!(VTKImageIOTester::Write( filePrefix, outputPath, true ))) { - std::cout << "[FAILED] writing (unsigned char - ascii)" << std::endl; + std::cout << "[FAILED] writing (uint8_t - ascii)" << std::endl; return EXIT_FAILURE; } - std::cout << "[PASSED] writing (unsigned char - ascii)" << std::endl; - if (!(VTKImageIOTester::Read( filePrefix, outputPath, true ))) + std::cout << "[PASSED] writing (uint8_t - ascii)" << std::endl; + if (!(VTKImageIOTester::Read( filePrefix, outputPath, true ))) { - std::cout << "[FAILED] reading (unsigned char - ascii)" << std::endl; + std::cout << "[FAILED] reading (uint8_t - ascii)" << std::endl; return EXIT_FAILURE; } - std::cout << "[PASSED] reading (unsigned char - ascii)" << std::endl; + std::cout << "[PASSED] reading (uint8_t - ascii)" << std::endl; - // unsigned char (binary) - if (!(VTKImageIOTester::Write( filePrefix, outputPath, false ))) + // uint8_t (binary) + if (!(VTKImageIOTester::Write( filePrefix, outputPath, false ))) { - std::cout << "[FAILED] writing (unsigned char - binary)" << std::endl; + std::cout << "[FAILED] writing (uint8_t - binary)" << std::endl; return EXIT_FAILURE; } - std::cout << "[PASSED] writing (unsigned char - binary)" << std::endl; - if (!(VTKImageIOTester::Read( filePrefix, outputPath, false ))) + std::cout << "[PASSED] writing (uint8_t - binary)" << std::endl; + if (!(VTKImageIOTester::Read( filePrefix, outputPath, false ))) { - std::cout << "[FAILED] reading (unsigned char - binary)" << std::endl; + std::cout << "[FAILED] reading (uint8_t - binary)" << std::endl; return EXIT_FAILURE; } - std::cout << "[PASSED] reading (unsigned char - binary)" << std::endl; + std::cout << "[PASSED] reading (uint8_t - binary)" << std::endl; // char (ascii) if (!(VTKImageIOTester::Write( filePrefix, outputPath, true ))) @@ -388,33 +388,33 @@ int itkVTKImageIO2Test(int argc, char* argv[]) } std::cout << "[PASSED] reading (char - binary)" << std::endl; - // unsigned short (ascii) - if (!(VTKImageIOTester::Write( filePrefix, outputPath, true ))) + // uint16_t (ascii) + if (!(VTKImageIOTester::Write( filePrefix, outputPath, true ))) { - std::cout << "[FAILED] writing (unsigned short - ascii)" << std::endl; + std::cout << "[FAILED] writing (uint16_t - ascii)" << std::endl; return EXIT_FAILURE; } - std::cout << "[PASSED] writing (unsigned short - ascii)" << std::endl; - if (!(VTKImageIOTester::Read( filePrefix, outputPath, true ))) + std::cout << "[PASSED] writing (uint16_t - ascii)" << std::endl; + if (!(VTKImageIOTester::Read( filePrefix, outputPath, true ))) { - std::cout << "[FAILED] reading (unsigned short - ascii)" << std::endl; + std::cout << "[FAILED] reading (uint16_t - ascii)" << std::endl; return EXIT_FAILURE; } - std::cout << "[PASSED] reading (unsigned short - ascii)" << std::endl; + std::cout << "[PASSED] reading (uint16_t - ascii)" << std::endl; - // unsigned short (binary) - if (!(VTKImageIOTester::Write( filePrefix, outputPath, false ))) + // uint16_t (binary) + if (!(VTKImageIOTester::Write( filePrefix, outputPath, false ))) { - std::cout << "[FAILED] writing (unsigned short - binary)" << std::endl; + std::cout << "[FAILED] writing (uint16_t - binary)" << std::endl; return EXIT_FAILURE; } - std::cout << "[PASSED] writing (unsigned short - binary)" << std::endl; - if (!(VTKImageIOTester::Read( filePrefix, outputPath, false ))) + std::cout << "[PASSED] writing (uint16_t - binary)" << std::endl; + if (!(VTKImageIOTester::Read( filePrefix, outputPath, false ))) { - std::cout << "[FAILED] reading (unsigned short - binary)" << std::endl; + std::cout << "[FAILED] reading (uint16_t - binary)" << std::endl; return EXIT_FAILURE; } - std::cout << "[PASSED] reading (unsigned short - binary)" << std::endl; + std::cout << "[PASSED] reading (uint16_t - binary)" << std::endl; // short (ascii) if (!(VTKImageIOTester::Write( filePrefix, outputPath, true ))) @@ -612,61 +612,61 @@ int itkVTKImageIO2Test(int argc, char* argv[]) } std::cout << "[PASSED] reading (double - binary)" << std::endl; - // RGBPixel - ascii - if (!(VTKImageIOTester< itk::RGBPixel, 3>::Write( filePrefix, outputPath, true ))) + // RGBPixel - ascii + if (!(VTKImageIOTester< itk::RGBPixel, 3>::Write( filePrefix, outputPath, true ))) { - std::cout << "[FAILED] writing (RGBPixel - ascii)" << std::endl; + std::cout << "[FAILED] writing (RGBPixel - ascii)" << std::endl; return EXIT_FAILURE; } - std::cout << "[PASSED] writing (RGBPixel - ascii)" << std::endl; - if (!(VTKImageIOTester< itk::RGBPixel, 3>::Read( filePrefix, outputPath, true ))) + std::cout << "[PASSED] writing (RGBPixel - ascii)" << std::endl; + if (!(VTKImageIOTester< itk::RGBPixel, 3>::Read( filePrefix, outputPath, true ))) { - std::cout << "[FAILED] reading (RGBPixel - ascii)" << std::endl; + std::cout << "[FAILED] reading (RGBPixel - ascii)" << std::endl; return EXIT_FAILURE; } - std::cout << "[PASSED] reading (RGBPixel - ascii)" << std::endl; + std::cout << "[PASSED] reading (RGBPixel - ascii)" << std::endl; - // RGBPixel - binary - if (!(VTKImageIOTester< itk::RGBPixel, 3>::Write( filePrefix, outputPath, false ))) + // RGBPixel - binary + if (!(VTKImageIOTester< itk::RGBPixel, 3>::Write( filePrefix, outputPath, false ))) { - std::cout << "[FAILED] writing (RGBPixel - binary)" << std::endl; + std::cout << "[FAILED] writing (RGBPixel - binary)" << std::endl; return EXIT_FAILURE; } - std::cout << "[PASSED] writing (RGBPixel - binary)" << std::endl; - if (!(VTKImageIOTester< itk::RGBPixel, 3>::Read( filePrefix, outputPath, false ))) + std::cout << "[PASSED] writing (RGBPixel - binary)" << std::endl; + if (!(VTKImageIOTester< itk::RGBPixel, 3>::Read( filePrefix, outputPath, false ))) { - std::cout << "[FAILED] reading (RGBPixel - binary)" << std::endl; + std::cout << "[FAILED] reading (RGBPixel - binary)" << std::endl; return EXIT_FAILURE; } - std::cout << "[PASSED] reading (RGBPixel - binary)" << std::endl; + std::cout << "[PASSED] reading (RGBPixel - binary)" << std::endl; - // RGBAPixel - ascii - if (!(VTKImageIOTester< itk::RGBAPixel, 3>::Write( filePrefix, outputPath, true ))) + // RGBAPixel - ascii + if (!(VTKImageIOTester< itk::RGBAPixel, 3>::Write( filePrefix, outputPath, true ))) { - std::cout << "[FAILED] writing (RGBAPixel - ascii)" << std::endl; + std::cout << "[FAILED] writing (RGBAPixel - ascii)" << std::endl; return EXIT_FAILURE; } - std::cout << "[PASSED] writing (RGBAPixel - ascii)" << std::endl; - if (!(VTKImageIOTester< itk::RGBAPixel, 3>::Read( filePrefix, outputPath, true ))) + std::cout << "[PASSED] writing (RGBAPixel - ascii)" << std::endl; + if (!(VTKImageIOTester< itk::RGBAPixel, 3>::Read( filePrefix, outputPath, true ))) { - std::cout << "[FAILED] reading (RGBAPixel - ascii)" << std::endl; + std::cout << "[FAILED] reading (RGBAPixel - ascii)" << std::endl; return EXIT_FAILURE; } - std::cout << "[PASSED] reading (RGBAPixel - ascii)" << std::endl; + std::cout << "[PASSED] reading (RGBAPixel - ascii)" << std::endl; - // RGBAPixel - binary - if (!(VTKImageIOTester< itk::RGBAPixel, 3>::Write( filePrefix, outputPath, false ))) + // RGBAPixel - binary + if (!(VTKImageIOTester< itk::RGBAPixel, 3>::Write( filePrefix, outputPath, false ))) { - std::cout << "[FAILED] writing (RGBAPixel - binary)" << std::endl; + std::cout << "[FAILED] writing (RGBAPixel - binary)" << std::endl; return EXIT_FAILURE; } - std::cout << "[PASSED] writing (RGBAPixel - binary)" << std::endl; - if (!(VTKImageIOTester< itk::RGBAPixel, 3>::Read( filePrefix, outputPath, false ))) + std::cout << "[PASSED] writing (RGBAPixel - binary)" << std::endl; + if (!(VTKImageIOTester< itk::RGBAPixel, 3>::Read( filePrefix, outputPath, false ))) { - std::cout << "[FAILED] reading (RGBAPixel - binary)" << std::endl; + std::cout << "[FAILED] reading (RGBAPixel - binary)" << std::endl; return EXIT_FAILURE; } - std::cout << "[PASSED] reading (RGBAPixel - binary)" << std::endl; + std::cout << "[PASSED] reading (RGBAPixel - binary)" << std::endl; // Vector - ascii if (!(VTKImageIOTester< itk::Vector, 3 >::Write( filePrefix, outputPath, true ))) diff --git a/Modules/IO/VTK/test/itkVTKImageIOTest.cxx b/Modules/IO/VTK/test/itkVTKImageIOTest.cxx index 507733093be..e28151855a7 100644 --- a/Modules/IO/VTK/test/itkVTKImageIOTest.cxx +++ b/Modules/IO/VTK/test/itkVTKImageIOTest.cxx @@ -144,17 +144,17 @@ int itkVTKImageIOTest(int argc, char* argv[] ) itk::NumericTraits::max(), argv[1], argv[2], true); - status += ReadWrite(itk::NumericTraits::NonpositiveMin(), - itk::NumericTraits::max(), + status += ReadWrite(itk::NumericTraits::NonpositiveMin(), + itk::NumericTraits::max(), argv[1], argv[2], false); - status += ReadWrite(itk::NumericTraits::NonpositiveMin(), - itk::NumericTraits::max(), + status += ReadWrite(itk::NumericTraits::NonpositiveMin(), + itk::NumericTraits::max(), argv[1], argv[2], true); - status += ReadWrite(itk::NumericTraits::NonpositiveMin(), - itk::NumericTraits::max(), + status += ReadWrite(itk::NumericTraits::NonpositiveMin(), + itk::NumericTraits::max(), argv[1], argv[2], false); - status += ReadWrite(itk::NumericTraits::NonpositiveMin(), - itk::NumericTraits::max(), + status += ReadWrite(itk::NumericTraits::NonpositiveMin(), + itk::NumericTraits::max(), argv[1], argv[2], true); @@ -171,17 +171,17 @@ int itkVTKImageIOTest(int argc, char* argv[] ) itk::NumericTraits::max(), argv[1], argv[2], true); - status += ReadWrite(itk::NumericTraits::NonpositiveMin(), - itk::NumericTraits::max(), + status += ReadWrite(itk::NumericTraits::NonpositiveMin(), + itk::NumericTraits::max(), argv[1], argv[2], false); - status += ReadWrite(itk::NumericTraits::NonpositiveMin(), - itk::NumericTraits::max(), + status += ReadWrite(itk::NumericTraits::NonpositiveMin(), + itk::NumericTraits::max(), argv[1], argv[2], true); - status += ReadWrite(itk::NumericTraits::NonpositiveMin(), - itk::NumericTraits::max(), + status += ReadWrite(itk::NumericTraits::NonpositiveMin(), + itk::NumericTraits::max(), argv[1], argv[2], false); - status += ReadWrite(itk::NumericTraits::NonpositiveMin(), - itk::NumericTraits::max(), + status += ReadWrite(itk::NumericTraits::NonpositiveMin(), + itk::NumericTraits::max(), argv[1], argv[2], true); status += ReadWrite(itk::NumericTraits::NonpositiveMin(), diff --git a/Modules/IO/XML/test/itkDOMTest6.cxx b/Modules/IO/XML/test/itkDOMTest6.cxx index b8b5a388973..7ecc20b6d1c 100644 --- a/Modules/IO/XML/test/itkDOMTest6.cxx +++ b/Modules/IO/XML/test/itkDOMTest6.cxx @@ -67,9 +67,9 @@ int itkDOMTest6( int, char*[] ) // test for basic data type void testStringToolsWithBasicType() { - // for unsigned char + // for uint8_t { - typedef unsigned char DataType; + typedef uint8_t DataType; std::string s; diff --git a/Modules/IO/XML/test/itkDOMTest7.cxx b/Modules/IO/XML/test/itkDOMTest7.cxx index 1bba1f710da..966911469f6 100644 --- a/Modules/IO/XML/test/itkDOMTest7.cxx +++ b/Modules/IO/XML/test/itkDOMTest7.cxx @@ -67,9 +67,9 @@ int itkDOMTest7( int, char*[] ) // test for basic data type void testFancyStringWithBasicType() { - // for unsigned char + // for uint8_t { - typedef unsigned char DataType; + typedef uint8_t DataType; itk::FancyString s; diff --git a/Modules/Nonunit/IntegratedTest/test/itkAlgorithmsPrintTest.cxx b/Modules/Nonunit/IntegratedTest/test/itkAlgorithmsPrintTest.cxx index ad36c50045b..406c2a59781 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkAlgorithmsPrintTest.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkAlgorithmsPrintTest.cxx @@ -31,8 +31,8 @@ int main (int , char* []) typedef itk::Image InputType3D; typedef itk::Image OutputType; typedef itk::Image BinaryImageType; - typedef itk::Image UShortImageType; - typedef itk::Image CharType; + typedef itk::Image UShortImageType; + typedef itk::Image CharType; typedef itk::Mesh MeshType; diff --git a/Modules/Nonunit/IntegratedTest/test/itkAlgorithmsPrintTest2.cxx b/Modules/Nonunit/IntegratedTest/test/itkAlgorithmsPrintTest2.cxx index 759e72f2ddb..6916b047966 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkAlgorithmsPrintTest2.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkAlgorithmsPrintTest2.cxx @@ -37,9 +37,9 @@ int main(int , char* []) typedef itk::Image InputType; typedef itk::Image OutputType; typedef itk::Image BinaryImageType; - typedef itk::Image UShortImageType; - typedef itk::Image UShortImageType3D; - typedef itk::Image CharType; + typedef itk::Image UShortImageType; + typedef itk::Image UShortImageType3D; + typedef itk::Image CharType; typedef itk::Mesh MeshType; diff --git a/Modules/Nonunit/IntegratedTest/test/itkAlgorithmsPrintTest3.cxx b/Modules/Nonunit/IntegratedTest/test/itkAlgorithmsPrintTest3.cxx index 6cadc5bf35b..b30a4a6e0ca 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkAlgorithmsPrintTest3.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkAlgorithmsPrintTest3.cxx @@ -37,8 +37,8 @@ int main(int , char* []) { typedef itk::Image InputType; typedef itk::Image OutputType; - typedef itk::Image UShortImageType; - typedef itk::Image CharType; + typedef itk::Image UShortImageType; + typedef itk::Image CharType; typedef itk::Mesh MeshType; diff --git a/Modules/Nonunit/IntegratedTest/test/itkAlgorithmsPrintTest4.cxx b/Modules/Nonunit/IntegratedTest/test/itkAlgorithmsPrintTest4.cxx index 0641edbf2b3..10d0cadea3e 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkAlgorithmsPrintTest4.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkAlgorithmsPrintTest4.cxx @@ -41,8 +41,8 @@ int main(int , char* []) typedef itk::Image InputType; typedef itk::Image OutputType; typedef itk::Image BinaryImageType; - typedef itk::Image UShortImageType; - typedef itk::Image CharType; + typedef itk::Image UShortImageType; + typedef itk::Image CharType; typedef itk::Mesh MeshType; typedef itk::Vector VectorType; typedef itk::Image VectorImageType; diff --git a/Modules/Nonunit/IntegratedTest/test/itkBasicFiltersPrintTest.cxx b/Modules/Nonunit/IntegratedTest/test/itkBasicFiltersPrintTest.cxx index b28d6d98210..1923f2c816d 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkBasicFiltersPrintTest.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkBasicFiltersPrintTest.cxx @@ -80,8 +80,8 @@ int itkBasicFiltersPrintTest(int , char* []) { typedef itk::Image InputType; typedef itk::Image OutputType; - typedef itk::Image CharType; - typedef itk::Image CharType3D; + typedef itk::Image CharType; + typedef itk::Image CharType3D; typedef itk::Point MeshPixelType; typedef itk::Mesh MeshType; @@ -92,11 +92,11 @@ int itkBasicFiltersPrintTest(int , char* []) typedef itk::CovariantVector CovariantVectorType; typedef itk::Image CovariantVectorImageType; - //typedef itk::Neighborhood KernelType; - typedef itk::BinaryBallStructuringElement KernelType; + //typedef itk::Neighborhood KernelType; + typedef itk::BinaryBallStructuringElement KernelType; // Used for MaskImageFilter - typedef itk::Image MaskImageType; + typedef itk::Image MaskImageType; // Used for TransformMeshFilter typedef itk::AffineTransform AffineTransformType; diff --git a/Modules/Nonunit/IntegratedTest/test/itkBasicFiltersPrintTest2.cxx b/Modules/Nonunit/IntegratedTest/test/itkBasicFiltersPrintTest2.cxx index 5a31fd7e34f..dd8e72ac1d9 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkBasicFiltersPrintTest2.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkBasicFiltersPrintTest2.cxx @@ -111,8 +111,8 @@ int itkBasicFiltersPrintTest2(int , char* []) { typedef itk::Image InputType; typedef itk::Image OutputType; - typedef itk::Image CharType; - typedef itk::Image CharType3D; + typedef itk::Image CharType; + typedef itk::Image CharType3D; typedef itk::Point MeshPixelType; typedef itk::Mesh MeshType; @@ -135,7 +135,7 @@ int itkBasicFiltersPrintTest2(int , char* []) typedef itk::GaussianSpatialFunction GaussianSpatialFunctionType; // Used for MaskImageFilter - typedef itk::Image MaskImageType; + typedef itk::Image MaskImageType; itk::ImageToParametricSpaceFilter::Pointer ImageToParametricSpaceFilterObj = itk::ImageToParametricSpaceFilter::New(); diff --git a/Modules/Nonunit/IntegratedTest/test/itkBioRadImageIOTest.cxx b/Modules/Nonunit/IntegratedTest/test/itkBioRadImageIOTest.cxx index 1a070fe4785..e238bd76629 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkBioRadImageIOTest.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkBioRadImageIOTest.cxx @@ -31,7 +31,7 @@ int itkBioRadImageIOTest(int argc, char* argv[]) return EXIT_FAILURE; } - typedef unsigned char InputPixelType; + typedef uint8_t InputPixelType; typedef itk::Image< InputPixelType, 2 > InputImageType; typedef itk::ImageFileReader< InputImageType > ReaderType; typedef itk::BioRadImageIO ImageIOType; diff --git a/Modules/Nonunit/IntegratedTest/test/itkCommonPrintTest.cxx b/Modules/Nonunit/IntegratedTest/test/itkCommonPrintTest.cxx index 69eb930360c..32440fb65c8 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkCommonPrintTest.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkCommonPrintTest.cxx @@ -108,7 +108,7 @@ struct TestObject int itkCommonPrintTest(int , char* []) { typedef itk::Image InputType; - typedef itk::Image CharType; + typedef itk::Image CharType; typedef itk::Image OutputType; typedef itk::Point Point3DType; @@ -118,7 +118,7 @@ int itkCommonPrintTest(int , char* []) typedef itk::Vector VectorType; typedef itk::Image VectorImageType; - typedef itk::RGBPixel RGBPixelType; + typedef itk::RGBPixel RGBPixelType; typedef itk::Image RGBImageType; // Used for CenteredTransformInitializer diff --git a/Modules/Nonunit/IntegratedTest/test/itkIOPrintTest.cxx b/Modules/Nonunit/IntegratedTest/test/itkIOPrintTest.cxx index 2a5c45cb985..775e01d9fb0 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkIOPrintTest.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkIOPrintTest.cxx @@ -36,7 +36,7 @@ int itkIOPrintTest(int , char* []) { - typedef itk::Image ImageType; + typedef itk::Image ImageType; itk::ImageFileReader::Pointer reader = itk::ImageFileReader::New(); @@ -87,8 +87,8 @@ int itkIOPrintTest(int , char* []) reader->SetImageIO(Metaio); std::cout << "---------------Meta" << reader; - itk::RawImageIO::Pointer Rawio; - Rawio = itk::RawImageIO::New(); + itk::RawImageIO::Pointer Rawio; + Rawio = itk::RawImageIO::New(); reader->SetImageIO(Rawio); std::cout << "---------------Raw" << reader; diff --git a/Modules/Nonunit/IntegratedTest/test/itkImageToHistogramFilterTest4.cxx b/Modules/Nonunit/IntegratedTest/test/itkImageToHistogramFilterTest4.cxx index fc4ef053b1e..761e34114b1 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkImageToHistogramFilterTest4.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkImageToHistogramFilterTest4.cxx @@ -42,11 +42,11 @@ int itkImageToHistogramFilterTest4Templated( int argc, char * argv [] ) } - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; const unsigned int Dimension = 3; typedef itk::Vector< PixelComponentType, 2 > VectorPixelType; - typedef itk::Image< unsigned char, Dimension > ImageType; + typedef itk::Image< uint8_t, Dimension > ImageType; typedef TVectorImage VectorImageType; typedef itk::ImageFileReader< ImageType > ReaderType; @@ -120,17 +120,17 @@ int itkImageToHistogramFilterTest4( int argc, char * argv [] ) } else if( command == "RGBPixel" ) { - typedef itk::Image, 3> VectorImageType; + typedef itk::Image, 3> VectorImageType; return itkImageToHistogramFilterTest4Templated< VectorImageType >( argc, argv ); } else if( command == "RGBAPixel" ) { - typedef itk::Image, 3> VectorImageType; + typedef itk::Image, 3> VectorImageType; return itkImageToHistogramFilterTest4Templated< VectorImageType >( argc, argv ); } else if( command == "FixedArray" ) { - typedef itk::Image, 3> VectorImageType; + typedef itk::Image, 3> VectorImageType; return itkImageToHistogramFilterTest4Templated< VectorImageType >( argc, argv ); } else if( command == "complex" ) @@ -140,7 +140,7 @@ int itkImageToHistogramFilterTest4( int argc, char * argv [] ) } else if( command == "VectorImage" ) { - typedef itk::VectorImage VectorImageType; + typedef itk::VectorImage VectorImageType; return itkImageToHistogramFilterTest4Templated< VectorImageType >( argc, argv ); } return EXIT_FAILURE; diff --git a/Modules/Nonunit/IntegratedTest/test/itkImageToMeshFilterTest.cxx b/Modules/Nonunit/IntegratedTest/test/itkImageToMeshFilterTest.cxx index 5d0b93d2398..a889fccb972 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkImageToMeshFilterTest.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkImageToMeshFilterTest.cxx @@ -27,7 +27,7 @@ int itkImageToMeshFilterTest(int , char *[] ) const unsigned int Dimension = 2; - typedef unsigned char BinaryMaskPixelType; + typedef uint8_t BinaryMaskPixelType; typedef itk::Image< BinaryMaskPixelType, diff --git a/Modules/Nonunit/IntegratedTest/test/itkMaskedImageToHistogramFilterTest1.cxx b/Modules/Nonunit/IntegratedTest/test/itkMaskedImageToHistogramFilterTest1.cxx index cc9a6c1b016..e6ed3d905be 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkMaskedImageToHistogramFilterTest1.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkMaskedImageToHistogramFilterTest1.cxx @@ -37,11 +37,11 @@ int itkMaskedImageToHistogramFilterTest1( int argc, char * argv [] ) } - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; const unsigned int Dimension = 3; typedef itk::Vector< PixelComponentType, 2 > VectorPixelType; - typedef itk::Image< unsigned char, Dimension > ImageType; + typedef itk::Image< uint8_t, Dimension > ImageType; typedef itk::Image< VectorPixelType, Dimension > VectorImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Nonunit/IntegratedTest/test/itkSpatialObjectPrintTest.cxx b/Modules/Nonunit/IntegratedTest/test/itkSpatialObjectPrintTest.cxx index 77cd216dcb5..2db8aaa5eff 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkSpatialObjectPrintTest.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkSpatialObjectPrintTest.cxx @@ -41,7 +41,7 @@ int itkSpatialObjectPrintTest(int , char* []) itk::GroupSpatialObject<3>::New(); std::cout << "----------GroupSpatialObject " << GroupSpatialObjectObj; - typedef unsigned short Pixel; + typedef uint16_t Pixel; itk::ImageSpatialObject<3,Pixel>::Pointer ImageSpatialObjectObj = itk::ImageSpatialObject<3,Pixel>::New(); std::cout << "----------ImageSpatialObject " << ImageSpatialObjectObj; diff --git a/Modules/Nonunit/IntegratedTest/test/itkStatisticsPrintTest.cxx b/Modules/Nonunit/IntegratedTest/test/itkStatisticsPrintTest.cxx index c23e556a85b..978a1465a0c 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkStatisticsPrintTest.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkStatisticsPrintTest.cxx @@ -42,7 +42,7 @@ int itkStatisticsPrintTest(int , char* []) typedef itk::FixedArray< TMeasurementType, 2 > TMeasurementVectorType; typedef itk::Image< TMeasurementVectorType, 3 > ImageType; - typedef itk::Image< unsigned char, 3> ScalarImageType; + typedef itk::Image< uint8_t, 3> ScalarImageType; typedef itk::PointSet< TMeasurementType, 2 > PointSetType; typedef itk::Image< unsigned long , 3 > OutputImageType; diff --git a/Modules/Nonunit/Review/include/itkContourExtractor2DImageFilter.hxx b/Modules/Nonunit/Review/include/itkContourExtractor2DImageFilter.hxx index 7a1acc760b0..869d3d3a860 100644 --- a/Modules/Nonunit/Review/include/itkContourExtractor2DImageFilter.hxx +++ b/Modules/Nonunit/Review/include/itkContourExtractor2DImageFilter.hxx @@ -131,7 +131,7 @@ ContourExtractor2DImageFilter< TInputImage > v2 = it.GetPixel(7); v3 = it.GetPixel(8); InputIndexType index = it.GetIndex(); - unsigned char squareCase = 0; + uint8_t squareCase = 0; if ( v0 > m_ContourValue ) { squareCase += 1; } if ( v1 > m_ContourValue ) { squareCase += 2; } if ( v2 > m_ContourValue ) { squareCase += 4; } diff --git a/Modules/Nonunit/Review/include/itkDirectFourierReconstructionImageToImageFilter.h b/Modules/Nonunit/Review/include/itkDirectFourierReconstructionImageToImageFilter.h index 124dbcef512..bf9f0e10d3b 100644 --- a/Modules/Nonunit/Review/include/itkDirectFourierReconstructionImageToImageFilter.h +++ b/Modules/Nonunit/Review/include/itkDirectFourierReconstructionImageToImageFilter.h @@ -89,11 +89,11 @@ class ITK_EXPORT DirectFourierReconstructionImageToImageFilter: /** OutputImagePointer */ typedef typename OutputImageType::Pointer OutputImagePointer; - itkSetMacro(ZeroPadding, unsigned short int); - itkGetConstMacro(ZeroPadding, unsigned short int); + itkSetMacro(ZeroPadding, uint16_t); + itkGetConstMacro(ZeroPadding, uint16_t); - itkSetMacro(OverSampling, unsigned short int); - itkGetConstMacro(OverSampling, unsigned short int); + itkSetMacro(OverSampling, uint16_t); + itkGetConstMacro(OverSampling, uint16_t); itkSetMacro(Cutoff, double); itkGetConstMacro(Cutoff, double); @@ -101,17 +101,17 @@ class ITK_EXPORT DirectFourierReconstructionImageToImageFilter: itkSetMacro(AlphaRange, double); itkGetConstMacro(AlphaRange, double); - itkSetMacro(AlphaDirection, unsigned short int); - itkGetConstMacro(AlphaDirection, unsigned short int); + itkSetMacro(AlphaDirection, uint16_t); + itkGetConstMacro(AlphaDirection, uint16_t); - itkSetMacro(ZDirection, unsigned short int); - itkGetConstMacro(ZDirection, unsigned short int); + itkSetMacro(ZDirection, uint16_t); + itkGetConstMacro(ZDirection, uint16_t); - itkSetMacro(RDirection, unsigned short int); - itkGetConstMacro(RDirection, unsigned short int); + itkSetMacro(RDirection, uint16_t); + itkGetConstMacro(RDirection, uint16_t); - itkSetMacro(RadialSplineOrder, unsigned short int); - itkGetConstMacro(RadialSplineOrder, unsigned short int); + itkSetMacro(RadialSplineOrder, uint16_t); + itkGetConstMacro(RadialSplineOrder, uint16_t); protected: /** Constructor */ @@ -159,19 +159,19 @@ class ITK_EXPORT DirectFourierReconstructionImageToImageFilter: /** 2D output slice iterator */ typedef ImageRegionIteratorWithIndex< OutputSliceType > OutputSliceIteratorType; - unsigned short int m_ZeroPadding; /**< n-fold zero-padding */ - unsigned short int m_OverSampling; /**< n-fold oversampling */ + uint16_t m_ZeroPadding; /**< n-fold zero-padding */ + uint16_t m_OverSampling; /**< n-fold oversampling */ double m_Cutoff; /**< Radial lowpass cut-off frequency */ double m_AlphaRange; /**< Covered angular range */ - unsigned short int m_ZDirection; /**< Axial index in the input image */ - unsigned short int m_AlphaDirection; /**< Angular index in the input image + uint16_t m_ZDirection; /**< Axial index in the input image */ + uint16_t m_AlphaDirection; /**< Angular index in the input image */ - unsigned short int m_RDirection; /**< Radial index in the input image + uint16_t m_RDirection; /**< Radial index in the input image */ - unsigned short int m_RadialSplineOrder; /**< Spline order for the radial + uint16_t m_RadialSplineOrder; /**< Spline order for the radial BSpline interpolation */ double m_PI; /**< The constant pi.... */ diff --git a/Modules/Nonunit/Review/include/itkKappaSigmaThresholdImageFilter.h b/Modules/Nonunit/Review/include/itkKappaSigmaThresholdImageFilter.h index 9db3dba2d0d..d59432f0cb6 100644 --- a/Modules/Nonunit/Review/include/itkKappaSigmaThresholdImageFilter.h +++ b/Modules/Nonunit/Review/include/itkKappaSigmaThresholdImageFilter.h @@ -48,7 +48,7 @@ namespace itk */ template< class TInputImage, - class TMaskImage = Image< unsigned char, TInputImage::ImageDimension >, + class TMaskImage = Image< uint8_t, TInputImage::ImageDimension >, class TOutputImage = TInputImage > class ITK_EXPORT KappaSigmaThresholdImageFilter: public ImageToImageFilter< TInputImage, TOutputImage > diff --git a/Modules/Nonunit/Review/include/itkMRCHeaderObject.h b/Modules/Nonunit/Review/include/itkMRCHeaderObject.h index baa8e2d1817..22ba8bf4082 100644 --- a/Modules/Nonunit/Review/include/itkMRCHeaderObject.h +++ b/Modules/Nonunit/Review/include/itkMRCHeaderObject.h @@ -70,12 +70,12 @@ class ITK_EXPORT MRCHeaderObject: /** Types of pixel in image. Values used by IMOD: * 0 = unsigned bytes, - * 1 = signed short integers (16 bits), + * 1 = int16_tegers (16 bits), * 2 = float, * 3 = short * 2, (used for complex data) * 4 = float * 2, (used for complex data) * 6 = unsigned 16-bit integers (non-standard) - * 16 = unsigned char * 3 (for rgb data, non-standard) + * 16 = uint8_t * 3 (for rgb data, non-standard) */ int32_t mode; diff --git a/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.h b/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.h index 0e9412b6821..7bba182c94a 100644 --- a/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.h +++ b/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.h @@ -251,7 +251,7 @@ class ITK_EXPORT MultiphaseSparseFiniteDifferenceImageFilter: typedef typename LayerListType::const_iterator LayerListConstIterator; /** Type used for storing status information */ - typedef signed char StatusType; + typedef int8_t StatusType; /** The type of the image used to index status information. Necessary for * the internals of the algorithm. */ diff --git a/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.hxx b/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.hxx index ea8aaf1c714..b87b60f5891 100644 --- a/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.hxx +++ b/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.hxx @@ -365,9 +365,9 @@ MultiphaseSparseFiniteDifferenceImageFilter< TInputImage, TFeatureImage, // Now we are left with the lists of indices which must be // brought into the outermost layers. Bring UpList into last inside layer // and DownList into last outside layer. - this->ProcessOutsideList (UpList[k], static_cast< signed char >( + this->ProcessOutsideList (UpList[k], static_cast< int8_t >( sparsePtr->m_Layers.size() ) - 2); - this->ProcessOutsideList (DownList[k], static_cast< signed char >( + this->ProcessOutsideList (DownList[k], static_cast< int8_t >( sparsePtr->m_Layers.size() ) - 1); // Finally, we update all of the layer values (excluding the active layer, diff --git a/Modules/Nonunit/Review/include/itkRankHistogram.h b/Modules/Nonunit/Review/include/itkRankHistogram.h index b960fbc1638..bbe92a56fe4 100644 --- a/Modules/Nonunit/Review/include/itkRankHistogram.h +++ b/Modules/Nonunit/Review/include/itkRankHistogram.h @@ -373,14 +373,14 @@ class VectorRankHistogram /** \cond HIDE_SPECIALIZATION_DOCUMENTATION */ template<> -class RankHistogram: - public VectorRankHistogram +class RankHistogram: + public VectorRankHistogram { }; template<> -class RankHistogram: - public VectorRankHistogram +class RankHistogram: + public VectorRankHistogram { }; diff --git a/Modules/Nonunit/Review/include/itkStochasticFractalDimensionImageFilter.h b/Modules/Nonunit/Review/include/itkStochasticFractalDimensionImageFilter.h index b0ff9275492..f9fcffaeec6 100644 --- a/Modules/Nonunit/Review/include/itkStochasticFractalDimensionImageFilter.h +++ b/Modules/Nonunit/Review/include/itkStochasticFractalDimensionImageFilter.h @@ -49,7 +49,7 @@ namespace itk * * \ingroup ITKReview */ -template< class TInputImage, class TMaskImage = Image< unsigned char, +template< class TInputImage, class TMaskImage = Image< uint8_t, TInputImage::ImageDimension >, class TOutputImage = TInputImage > class ITK_EXPORT StochasticFractalDimensionImageFilter: diff --git a/Modules/Nonunit/Review/src/itkBruker2DSEQImageIO.cxx b/Modules/Nonunit/Review/src/itkBruker2DSEQImageIO.cxx index a9a04f564f3..77f4be3632e 100644 --- a/Modules/Nonunit/Review/src/itkBruker2DSEQImageIO.cxx +++ b/Modules/Nonunit/Review/src/itkBruker2DSEQImageIO.cxx @@ -106,16 +106,16 @@ Bruker2DSEQImageIO::SwapBytesIfNecessary(void *buffer, ( (char *)buffer, numberOfPixels ); break; case UCHAR: - ByteSwapper< unsigned char >::SwapRangeFromSystemToLittleEndian - ( (unsigned char *)buffer, numberOfPixels ); + ByteSwapper< uint8_t >::SwapRangeFromSystemToLittleEndian + ( (uint8_t *)buffer, numberOfPixels ); break; case SHORT: ByteSwapper< short >::SwapRangeFromSystemToLittleEndian ( (short *)buffer, numberOfPixels ); break; case USHORT: - ByteSwapper< unsigned short >::SwapRangeFromSystemToLittleEndian - ( (unsigned short *)buffer, numberOfPixels ); + ByteSwapper< uint16_t >::SwapRangeFromSystemToLittleEndian + ( (uint16_t *)buffer, numberOfPixels ); break; case INT: ByteSwapper< int >::SwapRangeFromSystemToLittleEndian @@ -157,16 +157,16 @@ Bruker2DSEQImageIO::SwapBytesIfNecessary(void *buffer, ( (char *)buffer, numberOfPixels ); break; case UCHAR: - ByteSwapper< unsigned char >::SwapRangeFromSystemToBigEndian - ( (unsigned char *)buffer, numberOfPixels ); + ByteSwapper< uint8_t >::SwapRangeFromSystemToBigEndian + ( (uint8_t *)buffer, numberOfPixels ); break; case SHORT: ByteSwapper< short >::SwapRangeFromSystemToBigEndian ( (short *)buffer, numberOfPixels ); break; case USHORT: - ByteSwapper< unsigned short >::SwapRangeFromSystemToBigEndian - ( (unsigned short *)buffer, numberOfPixels ); + ByteSwapper< uint16_t >::SwapRangeFromSystemToBigEndian + ( (uint16_t *)buffer, numberOfPixels ); break; case INT: ByteSwapper< int >::SwapRangeFromSystemToBigEndian @@ -348,7 +348,7 @@ bool Bruker2DSEQImageIO::CanReadFile(const char *FileNameToRead) } else if ( dattypeString.find(BRUKER_UNSIGNED_CHAR) != std::string::npos ) { - calcLength *= (SizeValueType)sizeof( unsigned char ); + calcLength *= (SizeValueType)sizeof( uint8_t ); } else if ( dattypeString.find(BRUKER_SIGNED_SHORT) != std::string::npos ) { diff --git a/Modules/Nonunit/Review/src/itkJPEG2000ImageIO.cxx b/Modules/Nonunit/Review/src/itkJPEG2000ImageIO.cxx index 1af9bc3bcad..bed1c672b9f 100644 --- a/Modules/Nonunit/Review/src/itkJPEG2000ImageIO.cxx +++ b/Modules/Nonunit/Review/src/itkJPEG2000ImageIO.cxx @@ -699,7 +699,7 @@ void JPEG2000ImageIO::Read(void *buffer) // tile ROI iteration for ( unsigned int k = 0; k < numberOfComponents; k++ ) { - unsigned char *charBuffer = (unsigned char *)buffer; + uint8_t *charBuffer = (uint8_t *)buffer; charBuffer += k * sizePerComponentInBytes; charBuffer += initialStrideInBytes; @@ -709,7 +709,7 @@ void JPEG2000ImageIO::Read(void *buffer) charBuffer += priorStrideInBytes; for ( SizeValueType j = 0; j < sizePerStrideXInBytes; j++ ) { - *charBuffer = (unsigned char)( *l_data_ptr++ ); + *charBuffer = (uint8_t)( *l_data_ptr++ ); charBuffer += numberOfComponents; } charBuffer += postStrideInBytes; @@ -810,7 +810,7 @@ ::WriteImageInformation(void) << this->GetFileName() << std::endl << "Reason: " - << "JPEG 2000 writer only supports unsigned char/unsigned short int" ); + << "JPEG 2000 writer only supports uint8_t/uint16_t" ); } if ( this->GetNumberOfComponents() != 1 @@ -1014,7 +1014,7 @@ ::Write(const void *buffer) itkDebugMacro(<< " START COPY BUFFER"); if ( this->GetComponentType() == UCHAR ) { - unsigned char *charBuffer = (unsigned char *)buffer; + uint8_t *charBuffer = (uint8_t *)buffer; for ( SizeValueType j = 0; j < numberOfPixels; j++ ) { for ( unsigned int k = 0; k < this->GetNumberOfComponents(); k++ ) @@ -1027,7 +1027,7 @@ ::Write(const void *buffer) if ( this->GetComponentType() == USHORT ) { - unsigned short *shortBuffer = (unsigned short *)buffer; + uint16_t *shortBuffer = (uint16_t *)buffer; for ( SizeValueType j = 0; j < numberOfPixels; j++ ) { for ( unsigned int k = 0; k < this->GetNumberOfComponents(); k++ ) diff --git a/Modules/Nonunit/Review/src/itkMINC2ImageIO.cxx b/Modules/Nonunit/Review/src/itkMINC2ImageIO.cxx index 91b1ab82f7a..0e1b3db2442 100644 --- a/Modules/Nonunit/Review/src/itkMINC2ImageIO.cxx +++ b/Modules/Nonunit/Review/src/itkMINC2ImageIO.cxx @@ -1112,7 +1112,7 @@ void MINC2ImageIO::Write(const void *buffer) break; case UCHAR: minctype = MI_TYPE_UBYTE; - MINCWriteHyperSlab(volume, ndims, minctype, offsets, counts, (unsigned char *)buffer); + MINCWriteHyperSlab(volume, ndims, minctype, offsets, counts, (uint8_t *)buffer); break; case SHORT: minctype = MI_TYPE_SHORT; @@ -1120,7 +1120,7 @@ void MINC2ImageIO::Write(const void *buffer) break; case USHORT: minctype = MI_TYPE_USHORT; - MINCWriteHyperSlab(volume, ndims, minctype, offsets, counts, (unsigned short *)buffer); + MINCWriteHyperSlab(volume, ndims, minctype, offsets, counts, (uint16_t *)buffer); break; case INT: minctype = MI_TYPE_INT; @@ -1167,13 +1167,13 @@ void MINC2ImageIO::Write(const void *buffer) MINCComputeScalarRange(Strides, Sizes, this->GetNumberOfComponents(), maxval, minval, (char *)buffer); break; case MI_TYPE_UBYTE: - MINCComputeScalarRange(Strides, Sizes, this->GetNumberOfComponents(), maxval, minval, (unsigned char *)buffer); + MINCComputeScalarRange(Strides, Sizes, this->GetNumberOfComponents(), maxval, minval, (uint8_t *)buffer); break; case MI_TYPE_SHORT: MINCComputeScalarRange(Strides, Sizes, this->GetNumberOfComponents(), maxval, minval, (short *)buffer); break; case MI_TYPE_USHORT: - MINCComputeScalarRange(Strides, Sizes, this->GetNumberOfComponents(), maxval, minval, (unsigned short *)buffer); + MINCComputeScalarRange(Strides, Sizes, this->GetNumberOfComponents(), maxval, minval, (uint16_t *)buffer); break; case MI_TYPE_INT: MINCComputeScalarRange(Strides, Sizes, this->GetNumberOfComponents(), maxval, minval, (int *)buffer); diff --git a/Modules/Nonunit/Review/src/itkMRCImageIO.cxx b/Modules/Nonunit/Review/src/itkMRCImageIO.cxx index 66e386bf1a5..240f3e14cdf 100644 --- a/Modules/Nonunit/Review/src/itkMRCImageIO.cxx +++ b/Modules/Nonunit/Review/src/itkMRCImageIO.cxx @@ -421,7 +421,7 @@ void MRCImageIO::UpdateHeaderFromImageIO(void) this->GetComponentType() ) << std::endl << - "Supported pixel types include unsigned byte, unsigned short, signed short, float, rgb unsigned char, float complex" + "Supported pixel types include unsigned byte, uint16_t, int16_t, float, rgb uint8_t, float complex" ); } @@ -471,8 +471,8 @@ ::UpdateHeaderWithMinMaxMean(const void *bufferBegin) { case 0: { - // scalar unsigned char - this->UpdateHeaderWithMinMaxMean( static_cast< const unsigned char * >( bufferBegin ) ); + // scalar uint8_t + this->UpdateHeaderWithMinMaxMean( static_cast< const uint8_t * >( bufferBegin ) ); break; } case 1: @@ -511,13 +511,13 @@ ::UpdateHeaderWithMinMaxMean(const void *bufferBegin) } case 6: { - // scalar unsigned short - this->UpdateHeaderWithMinMaxMean( static_cast< const unsigned short * >( bufferBegin ) ); + // scalar uint16_t + this->UpdateHeaderWithMinMaxMean( static_cast< const uint16_t * >( bufferBegin ) ); break; } case 16: { - // RGB of unsigned char + // RGB of uint8_t // just set resonable values m_MRCHeader->m_Header.amin = 0.0f; diff --git a/Modules/Nonunit/Review/src/itkVoxBoCUBImageIO.cxx b/Modules/Nonunit/Review/src/itkVoxBoCUBImageIO.cxx index 26312042788..7b663b35ebb 100644 --- a/Modules/Nonunit/Review/src/itkVoxBoCUBImageIO.cxx +++ b/Modules/Nonunit/Review/src/itkVoxBoCUBImageIO.cxx @@ -55,7 +55,7 @@ class GenericCUBFileAdaptor typedef ImageIOBase::SizeType SizeType; - virtual unsigned char ReadByte() = 0; + virtual uint8_t ReadByte() = 0; virtual void ReadData(void *data, SizeType bytes) = 0; @@ -65,7 +65,7 @@ class GenericCUBFileAdaptor { // Read everything up to the \f symbol itksys_ios::ostringstream oss; - unsigned char byte = ReadByte(); + uint8_t byte = ReadByte(); while ( byte != '\f' ) { @@ -74,7 +74,7 @@ class GenericCUBFileAdaptor } // Read the next byte - unsigned char term = ReadByte(); + uint8_t term = ReadByte(); if ( term == '\r' ) { term = ReadByte(); @@ -119,7 +119,7 @@ class CompressedCUBFileAdaptor:public GenericCUBFileAdaptor } } - unsigned char ReadByte() + uint8_t ReadByte() { int byte = gzgetc(m_GzFile); @@ -131,7 +131,7 @@ class CompressedCUBFileAdaptor:public GenericCUBFileAdaptor exception.SetDescription( oss.str().c_str() ); throw exception; } - return static_cast< unsigned char >( byte ); + return static_cast< uint8_t >( byte ); } void ReadData(void *data, SizeType bytes) @@ -208,7 +208,7 @@ class DirectCUBFileAdaptor:public GenericCUBFileAdaptor } } - unsigned char ReadByte() + uint8_t ReadByte() { int byte = fgetc(m_File); @@ -220,7 +220,7 @@ class DirectCUBFileAdaptor:public GenericCUBFileAdaptor exception.SetDescription( oss.str().c_str() ); throw exception; } - return static_cast< unsigned char >( byte ); + return static_cast< uint8_t >( byte ); } void ReadData(void *data, SizeType bytes) @@ -865,7 +865,7 @@ ::SwapBytesIfNecessary(void *buffer, BufferSizeType numberOfBytes) } else if ( m_ComponentType == UCHAR ) { - VoxBoCUBImageIOSwapHelper< unsigned char >::SwapIfNecessary( + VoxBoCUBImageIOSwapHelper< uint8_t >::SwapIfNecessary( buffer, numberOfBytes, m_ByteOrder); } else if ( m_ComponentType == SHORT ) @@ -875,7 +875,7 @@ ::SwapBytesIfNecessary(void *buffer, BufferSizeType numberOfBytes) } else if ( m_ComponentType == USHORT ) { - VoxBoCUBImageIOSwapHelper< unsigned short >::SwapIfNecessary( + VoxBoCUBImageIOSwapHelper< uint16_t >::SwapIfNecessary( buffer, numberOfBytes, m_ByteOrder); } else if ( m_ComponentType == INT ) diff --git a/Modules/Nonunit/Review/test/itkAreaClosingImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkAreaClosingImageFilterTest.cxx index 42ff3b6485a..84e9b0dbe38 100644 --- a/Modules/Nonunit/Review/test/itkAreaClosingImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkAreaClosingImageFilterTest.cxx @@ -35,7 +35,7 @@ int itkAreaClosingImageFilterTest(int argc, char * argv[]) const int dim = 3; - typedef unsigned char PType; + typedef uint8_t PType; typedef itk::Image< PType, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; diff --git a/Modules/Nonunit/Review/test/itkAreaOpeningImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkAreaOpeningImageFilterTest.cxx index 9543a208ea4..9fc9dfcc483 100644 --- a/Modules/Nonunit/Review/test/itkAreaOpeningImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkAreaOpeningImageFilterTest.cxx @@ -35,7 +35,7 @@ int itkAreaOpeningImageFilterTest(int argc, char * argv[]) const int dim = 3; - typedef unsigned char PType; + typedef uint8_t PType; typedef itk::Image< PType, dim > IType; typedef itk::ImageFileReader< IType > ReaderType; diff --git a/Modules/Nonunit/Review/test/itkBoxMeanImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkBoxMeanImageFilterTest.cxx index 28c79cfd84f..34402ecd564 100644 --- a/Modules/Nonunit/Review/test/itkBoxMeanImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkBoxMeanImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkBoxMeanImageFilterTest(int ac, char* av[] ) return -1; } - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; ReaderType::Pointer input = ReaderType::New(); diff --git a/Modules/Nonunit/Review/test/itkBoxSigmaImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkBoxSigmaImageFilterTest.cxx index 3546a23238d..8c98af458af 100644 --- a/Modules/Nonunit/Review/test/itkBoxSigmaImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkBoxSigmaImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkBoxSigmaImageFilterTest(int ac, char* av[] ) return -1; } - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; ReaderType::Pointer input = ReaderType::New(); diff --git a/Modules/Nonunit/Review/test/itkBruker2DSEQImageIOTest.cxx b/Modules/Nonunit/Review/test/itkBruker2DSEQImageIOTest.cxx index d06cce0c531..3b696f99d48 100644 --- a/Modules/Nonunit/Review/test/itkBruker2DSEQImageIOTest.cxx +++ b/Modules/Nonunit/Review/test/itkBruker2DSEQImageIOTest.cxx @@ -30,7 +30,7 @@ int itkBruker2DSEQImageIOTest( int argc, char * argv [] ) return EXIT_FAILURE; } - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image< PixelType, 2 > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Nonunit/Review/test/itkContourExtractor2DImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkContourExtractor2DImageFilterTest.cxx index 501d09ee3a7..a2e8bade36e 100644 --- a/Modules/Nonunit/Review/test/itkContourExtractor2DImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkContourExtractor2DImageFilterTest.cxx @@ -21,7 +21,7 @@ namespace itkContourExtractor2DImageFilterTestNamespace { const unsigned int Dimension = 2; -typedef unsigned char PixelType; +typedef uint8_t PixelType; typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; typedef itk::ContourExtractor2DImageFilter ExtractorType; diff --git a/Modules/Nonunit/Review/test/itkDiffeomorphicDemonsRegistrationFilterTest.cxx b/Modules/Nonunit/Review/test/itkDiffeomorphicDemonsRegistrationFilterTest.cxx index cf42992571f..284335ac3a8 100644 --- a/Modules/Nonunit/Review/test/itkDiffeomorphicDemonsRegistrationFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkDiffeomorphicDemonsRegistrationFilterTest.cxx @@ -112,7 +112,7 @@ int itkDiffeomorphicDemonsRegistrationFilterTest(int argc, char * argv [] ) return EXIT_FAILURE; } - typedef unsigned char PixelType; + typedef uint8_t PixelType; enum {ImageDimension = 2}; typedef itk::Image ImageType; typedef itk::Vector VectorType; diff --git a/Modules/Nonunit/Review/test/itkDiscreteGaussianDerivativeImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkDiscreteGaussianDerivativeImageFilterTest.cxx index b474f64b006..cd384933a8d 100644 --- a/Modules/Nonunit/Review/test/itkDiscreteGaussianDerivativeImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkDiscreteGaussianDerivativeImageFilterTest.cxx @@ -15,109 +15,3 @@ * limitations under the License. * *=========================================================================*/ -// Author : Iván Macía (imacia@vicomtech.org) -// Date : 02/01/2009 -// VICOMTech, Spain -// http://www.vicomtech.org -// Description : calculates the gaussian derivatives at non-zero -// points of a gaussian input image. For derivative calculation the class -// itkDiscreteGaussianDerivativeImageFilter is used. This example operates on 2D images. - - -#include "itkImageFileReader.h" -#include "itkImageFileWriter.h" -#include "itkRescaleIntensityImageFilter.h" -#include "itkDiscreteGaussianDerivativeImageFilter.h" -#include "itkSimpleFilterWatcher.h" - - -int itkDiscreteGaussianDerivativeImageFilterTest( int argc, char* argv[] ) -{ - // Verify the number of parameters in the command line - if( argc < 6 ) - { - std::cerr << "Usage: " << std::endl; - std::cerr << argv[0] << " inputFileName outputFileName orderX orderY sigma (maximum_error) (maximum_kernel_width)" << std::endl; - return EXIT_FAILURE; - } - - const unsigned int Dimension = 2; - //const unsigned int Dimension = 3; - typedef float PixelType; - typedef unsigned short OutputPixelType; - - typedef itk::Image ImageType; - typedef itk::Image OutputImageType; - - typedef itk::ImageFileReader< ImageType > ReaderType; - - ReaderType::Pointer reader = ReaderType::New(); - reader->SetFileName( argv[1] ); - - try - { - reader->Update(); - } - catch ( itk::ExceptionObject &err) - { - std::cout << "ExceptionObject caught !" << std::endl; - std::cout << err << std::endl; - return EXIT_FAILURE; - } - - typedef itk::DiscreteGaussianDerivativeImageFilter< ImageType, ImageType > DerivativeFilterType; - DerivativeFilterType::Pointer derivativeFilter = DerivativeFilterType::New(); - derivativeFilter->SetInput( reader->GetOutput() ); - - // Now proceed to apply the gaussian derivative filter in both directions - - double maxError = 0.001; - unsigned int maxKernelWidth = 100; - - if( argc >= 7 ) - { - maxError = atof( argv[6] ); - } - else if( argc >= 8 ) - { - maxError = atof( argv[6] ); - maxKernelWidth = atoi( argv[7] ); - } - - DerivativeFilterType::OrderArrayType order; - order[0] = atoi( argv[3] ); - order[1] = atoi( argv[4] ); - - double variance = atof( argv[5] ); - variance *= variance; - - derivativeFilter->SetMaximumError( maxError ); - derivativeFilter->SetMaximumKernelWidth( maxKernelWidth ); - derivativeFilter->SetVariance( variance ); - derivativeFilter->SetOrder( order ); - itk::SimpleFilterWatcher watcher(derivativeFilter, "derivativeFilter"); - - typedef itk::RescaleIntensityImageFilter< ImageType, OutputImageType > - RescaleFilterType; - RescaleFilterType::Pointer rescaler = RescaleFilterType::New(); - rescaler->SetOutputMinimum( itk::NumericTraits::min() ); - rescaler->SetOutputMaximum( itk::NumericTraits::max() ); - rescaler->SetInput( derivativeFilter->GetOutput() ); - - typedef itk::ImageFileWriter< OutputImageType > WriterType; - WriterType::Pointer writer = WriterType::New(); - writer->SetFileName( argv[2] ); - writer->SetInput( rescaler->GetOutput() ); - - try - { - writer->Update(); - } - catch ( itk::ExceptionObject &err) - { - std::cout << "ExceptionObject caught !" << std::endl; - std::cout << err << std::endl; - return EXIT_FAILURE; - } - return EXIT_SUCCESS; -} diff --git a/Modules/Nonunit/Review/test/itkDiscreteGaussianDerivativeImageFunctionTest.cxx b/Modules/Nonunit/Review/test/itkDiscreteGaussianDerivativeImageFunctionTest.cxx index 005d0320892..c4882fc04f7 100644 --- a/Modules/Nonunit/Review/test/itkDiscreteGaussianDerivativeImageFunctionTest.cxx +++ b/Modules/Nonunit/Review/test/itkDiscreteGaussianDerivativeImageFunctionTest.cxx @@ -141,7 +141,7 @@ int itkDiscreteGaussianDerivativeImageFunctionTestND( int argc, char* argv[] ) } // Rescale output - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::RescaleIntensityImageFilter< ImageType, OutputImageType > RescaleType; diff --git a/Modules/Nonunit/Review/test/itkDiscreteGradientMagnitudeGaussianImageFunctionTest.cxx b/Modules/Nonunit/Review/test/itkDiscreteGradientMagnitudeGaussianImageFunctionTest.cxx index dbcde24eaea..70a34f38980 100644 --- a/Modules/Nonunit/Review/test/itkDiscreteGradientMagnitudeGaussianImageFunctionTest.cxx +++ b/Modules/Nonunit/Review/test/itkDiscreteGradientMagnitudeGaussianImageFunctionTest.cxx @@ -133,7 +133,7 @@ int itkDiscreteGradientMagnitudeGaussianImageFunctionTestND( int argc, char* arg } // Rescale output - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::RescaleIntensityImageFilter< ImageType, OutputImageType > RescaleType; typename RescaleType::Pointer rescaler = RescaleType::New(); diff --git a/Modules/Nonunit/Review/test/itkDiscreteHessianGaussianImageFunctionTest.cxx b/Modules/Nonunit/Review/test/itkDiscreteHessianGaussianImageFunctionTest.cxx index 3fc9d714574..4c04d831fb2 100644 --- a/Modules/Nonunit/Review/test/itkDiscreteHessianGaussianImageFunctionTest.cxx +++ b/Modules/Nonunit/Review/test/itkDiscreteHessianGaussianImageFunctionTest.cxx @@ -152,7 +152,7 @@ int itkDiscreteHessianGaussianImageFunctionTestND( int argc, char* argv[] ) } // Write outputs - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::ImageFileWriter< OutputImageType > WriterType; diff --git a/Modules/Nonunit/Review/test/itkFastApproximateRankImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkFastApproximateRankImageFilterTest.cxx index d7d0bcc485c..626c90700da 100644 --- a/Modules/Nonunit/Review/test/itkFastApproximateRankImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkFastApproximateRankImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkFastApproximateRankImageFilterTest(int ac, char* av[] ) return -1; } - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; ReaderType::Pointer input = ReaderType::New(); diff --git a/Modules/Nonunit/Review/test/itkFastSymmetricForcesDemonsRegistrationFilterTest.cxx b/Modules/Nonunit/Review/test/itkFastSymmetricForcesDemonsRegistrationFilterTest.cxx index 47d380e8c51..6945e6ec280 100644 --- a/Modules/Nonunit/Review/test/itkFastSymmetricForcesDemonsRegistrationFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkFastSymmetricForcesDemonsRegistrationFilterTest.cxx @@ -99,7 +99,7 @@ TImage *output ) int itkFastSymmetricForcesDemonsRegistrationFilterTest(int, char* [] ) { - typedef unsigned char PixelType; + typedef uint8_t PixelType; enum {ImageDimension = 2}; typedef itk::Image ImageType; typedef itk::Vector VectorType; diff --git a/Modules/Nonunit/Review/test/itkGridForwardWarpImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkGridForwardWarpImageFilterTest.cxx index 6cd5b80d645..2ebcb839c56 100644 --- a/Modules/Nonunit/Review/test/itkGridForwardWarpImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkGridForwardWarpImageFilterTest.cxx @@ -26,7 +26,7 @@ int itkGridForwardWarpImageFilterTest(int, char* [] ) const unsigned int ImageDimension = 3; typedef itk::Vector< double, ImageDimension > DeformationPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; // Declare the types of the images typedef itk::Image DisplacementFieldType; diff --git a/Modules/Nonunit/Review/test/itkHessianToObjectnessMeasureImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkHessianToObjectnessMeasureImageFilterTest.cxx index 52e0ecfb4c5..9b4f2a77908 100644 --- a/Modules/Nonunit/Review/test/itkHessianToObjectnessMeasureImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkHessianToObjectnessMeasureImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkHessianToObjectnessMeasureImageFilterTest( int argc, char *argv[] ) } // Define the dimension of the images - const unsigned char Dim = 2; + const uint8_t Dim = 2; typedef float PixelType; diff --git a/Modules/Nonunit/Review/test/itkJPEG2000ImageIORegionOfInterest.cxx b/Modules/Nonunit/Review/test/itkJPEG2000ImageIORegionOfInterest.cxx index c490a6795d7..3b3c43ca8ec 100644 --- a/Modules/Nonunit/Review/test/itkJPEG2000ImageIORegionOfInterest.cxx +++ b/Modules/Nonunit/Review/test/itkJPEG2000ImageIORegionOfInterest.cxx @@ -36,8 +36,8 @@ int itkJPEG2000ImageIORegionOfInterest( int argc, char * argv[] ) itk::JPEG2000ImageIOFactory::RegisterOneFactory(); // Image types are defined below. - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; diff --git a/Modules/Nonunit/Review/test/itkJPEG2000ImageIOTest01.cxx b/Modules/Nonunit/Review/test/itkJPEG2000ImageIOTest01.cxx index be51b4b224d..fa66feb658e 100644 --- a/Modules/Nonunit/Review/test/itkJPEG2000ImageIOTest01.cxx +++ b/Modules/Nonunit/Review/test/itkJPEG2000ImageIOTest01.cxx @@ -36,8 +36,8 @@ int itkJPEG2000ImageIOTest01( int argc, char * argv[] ) // Image types are defined below. - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; diff --git a/Modules/Nonunit/Review/test/itkJPEG2000ImageIOTest02.cxx b/Modules/Nonunit/Review/test/itkJPEG2000ImageIOTest02.cxx index ea147a871c3..4b8db62f853 100644 --- a/Modules/Nonunit/Review/test/itkJPEG2000ImageIOTest02.cxx +++ b/Modules/Nonunit/Review/test/itkJPEG2000ImageIOTest02.cxx @@ -36,8 +36,8 @@ int itkJPEG2000ImageIOTest02( int argc, char * argv[] ) // Image types are defined below. - typedef unsigned short int InputPixelType; - typedef unsigned short int OutputPixelType; + typedef uint16_t InputPixelType; + typedef uint16_t OutputPixelType; const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; diff --git a/Modules/Nonunit/Review/test/itkJPEG2000ImageIOTest03.cxx b/Modules/Nonunit/Review/test/itkJPEG2000ImageIOTest03.cxx index 66e88c54123..b58c3971e9e 100644 --- a/Modules/Nonunit/Review/test/itkJPEG2000ImageIOTest03.cxx +++ b/Modules/Nonunit/Review/test/itkJPEG2000ImageIOTest03.cxx @@ -36,7 +36,7 @@ int itkJPEG2000ImageIOTest03( int argc, char * argv[] ) // Image types are defined below. - typedef itk::RGBPixel PixelType; + typedef itk::RGBPixel PixelType; const unsigned int Dimension = 2; typedef itk::Image< PixelType, Dimension > InputImageType; diff --git a/Modules/Nonunit/Review/test/itkJPEG2000ImageIOTest04.cxx b/Modules/Nonunit/Review/test/itkJPEG2000ImageIOTest04.cxx index eb1486fa50c..c856059efe5 100644 --- a/Modules/Nonunit/Review/test/itkJPEG2000ImageIOTest04.cxx +++ b/Modules/Nonunit/Review/test/itkJPEG2000ImageIOTest04.cxx @@ -37,7 +37,7 @@ int itkJPEG2000ImageIOTest04( int argc, char * argv[] ) // Image types are defined below. - typedef itk::RGBPixel PixelType; + typedef itk::RGBPixel PixelType; const unsigned int Dimension = 2; typedef itk::Image< PixelType, Dimension > InputImageType; diff --git a/Modules/Nonunit/Review/test/itkJPEG2000ImageIOTest05.cxx b/Modules/Nonunit/Review/test/itkJPEG2000ImageIOTest05.cxx index 38ecb15e70f..2d69c006d30 100644 --- a/Modules/Nonunit/Review/test/itkJPEG2000ImageIOTest05.cxx +++ b/Modules/Nonunit/Review/test/itkJPEG2000ImageIOTest05.cxx @@ -31,7 +31,7 @@ int itkJPEG2000ImageIOTest05( int argc, char * argv[] ) } - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image ImageType; typedef itk::Image OutputImageType; diff --git a/Modules/Nonunit/Review/test/itkJPEG2000ImageIOTest06.cxx b/Modules/Nonunit/Review/test/itkJPEG2000ImageIOTest06.cxx index 1ae95149e44..5d7c92f7b05 100644 --- a/Modules/Nonunit/Review/test/itkJPEG2000ImageIOTest06.cxx +++ b/Modules/Nonunit/Review/test/itkJPEG2000ImageIOTest06.cxx @@ -36,7 +36,7 @@ int itkJPEG2000ImageIOTest06( int argc, char * argv[] ) // Image types are defined below. - typedef itk::RGBPixel PixelType; + typedef itk::RGBPixel PixelType; const unsigned int Dimension = 2; typedef itk::Image< PixelType, Dimension > InputImageType; diff --git a/Modules/Nonunit/Review/test/itkKappaSigmaThresholdImageCalculatorTest.cxx b/Modules/Nonunit/Review/test/itkKappaSigmaThresholdImageCalculatorTest.cxx index 4496a57627b..97ac97987f7 100644 --- a/Modules/Nonunit/Review/test/itkKappaSigmaThresholdImageCalculatorTest.cxx +++ b/Modules/Nonunit/Review/test/itkKappaSigmaThresholdImageCalculatorTest.cxx @@ -31,11 +31,11 @@ int itkKappaSigmaThresholdImageCalculatorTest( int argc, char * argv [] ) return EXIT_FAILURE; } - typedef signed short PixelType; + typedef int16_t PixelType; const unsigned int Dimension = 2; typedef itk::Image< PixelType, Dimension > ImageType; - typedef itk::Image< unsigned char, Dimension > MaskType; + typedef itk::Image< uint8_t, Dimension > MaskType; typedef itk::ImageFileReader< ImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Nonunit/Review/test/itkKappaSigmaThresholdImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkKappaSigmaThresholdImageFilterTest.cxx index d8d2cab7815..6589f9d0bbe 100644 --- a/Modules/Nonunit/Review/test/itkKappaSigmaThresholdImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkKappaSigmaThresholdImageFilterTest.cxx @@ -33,9 +33,9 @@ int itkKappaSigmaThresholdImageFilterTest(int argc, char* argv[] ) return EXIT_FAILURE; } - typedef unsigned char InputPixelType; - typedef unsigned char MaskPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t MaskPixelType; + typedef uint8_t OutputPixelType; const unsigned int Dimension = 2; diff --git a/Modules/Nonunit/Review/test/itkLabelGeometryImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkLabelGeometryImageFilterTest.cxx index e307c466022..7cf8c1a8001 100644 --- a/Modules/Nonunit/Review/test/itkLabelGeometryImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkLabelGeometryImageFilterTest.cxx @@ -25,9 +25,9 @@ template < const unsigned int NDimension > int LabelGeometryImageFilterTest(const char * labelImageName,const char * outputImageName,const char * intensityImageName, const char * outputOrientedImagePath) { - typedef unsigned short LabelPixelType; - typedef unsigned short IntensityPixelType; - typedef unsigned char UCharPixelType; + typedef uint16_t LabelPixelType; + typedef uint16_t IntensityPixelType; + typedef uint8_t UCharPixelType; typedef itk::Image LabelImageType; typedef itk::Image IntensityImageType; @@ -119,7 +119,7 @@ int LabelGeometryImageFilterTest(const char * labelImageName,const char * output typedef itk::LabelGeometryImageFilter< UCharImageType, IntensityImageType > LabelGeometryType2; typename LabelGeometryType2::Pointer labelGeometryFilter2 = LabelGeometryType2::New(); - // Convert the labeled image to unsigned char. + // Convert the labeled image to uint8_t. typedef itk::CastImageFilter< LabelImageType, UCharImageType > CastType; typename CastType::Pointer caster = CastType::New(); caster->SetInput( relabeler->GetOutput() ); diff --git a/Modules/Nonunit/Review/test/itkMINC2ImageIOTest.cxx b/Modules/Nonunit/Review/test/itkMINC2ImageIOTest.cxx index d1609095465..7a7f9bd18fe 100644 --- a/Modules/Nonunit/Review/test/itkMINC2ImageIOTest.cxx +++ b/Modules/Nonunit/Review/test/itkMINC2ImageIOTest.cxx @@ -43,7 +43,7 @@ int itkMINC2ImageIOTest( int ac, char* av[] ) std::cerr << "This is a test for MINC2!!\n"; - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image myImage; typedef itk::Image ImageType; diff --git a/Modules/Nonunit/Review/test/itkMRCImageIOTest.cxx b/Modules/Nonunit/Review/test/itkMRCImageIOTest.cxx index e429ed8fb9a..6382e132664 100644 --- a/Modules/Nonunit/Review/test/itkMRCImageIOTest.cxx +++ b/Modules/Nonunit/Review/test/itkMRCImageIOTest.cxx @@ -292,8 +292,8 @@ int itkMRCImageIOTest(int argc, char* argv[]) // test all usable pixeltypes // - // unsigned char - typedef itk::Image ImageTypeUnsignedChar3; + // uint8_t + typedef itk::Image ImageTypeUnsignedChar3; if (!(MRCImageIOTester< ImageTypeUnsignedChar3 >::Write(filePrefix, outputPath))) { std::cout << "[FAILED] writing (unsighed char)" << std::endl; @@ -337,8 +337,8 @@ int itkMRCImageIOTest(int argc, char* argv[]) } std::cout << "[PASSED] reading (float)" << std::endl; - // unsigned short - typedef itk::Image ImageTypeUnsignedShort3; + // uint16_t + typedef itk::Image ImageTypeUnsignedShort3; if (!(MRCImageIOTester< ImageTypeUnsignedShort3 >::Write(filePrefix, outputPath))) { std::cout << "[FAILED] writing (unsighed short)" << std::endl; @@ -352,21 +352,21 @@ int itkMRCImageIOTest(int argc, char* argv[]) } std::cout << "[PASSED] reading (unsighed short)" << std::endl; - // RGBPixel - typedef itk::RGBPixel PixelTypeRGB; + // RGBPixel + typedef itk::RGBPixel PixelTypeRGB; typedef itk::Image ImageTypeRGB3; if (!(MRCImageIOTester< ImageTypeRGB3 >::Write(filePrefix, outputPath))) { std::cout << "[FAILED] writing (RGBPixel)" << std::endl; return EXIT_FAILURE; } - std::cout << "[PASSED] writing (RGBPixel)" << std::endl; + std::cout << "[PASSED] writing (RGBPixel)" << std::endl; if (!(MRCImageIOTester< ImageTypeRGB3 >::Read(filePrefix, outputPath, m_CallNumber))) { - std::cout << "[FAILED] reading (RGBPixel)" << std::endl; + std::cout << "[FAILED] reading (RGBPixel)" << std::endl; return EXIT_FAILURE; } - std::cout << "[PASSED] reading (RGBPixel)" << std::endl; + std::cout << "[PASSED] reading (RGBPixel)" << std::endl; // complex typedef std::complex PixelTypeComplexFloat; @@ -390,7 +390,7 @@ int itkMRCImageIOTest(int argc, char* argv[]) // // 1D - typedef itk::Image ImageTypeUnsignedChar1; + typedef itk::Image ImageTypeUnsignedChar1; if (!(MRCImageIOTester< ImageTypeUnsignedChar1 >::Write(filePrefix, outputPath))) { std::cout << "[FAILED] writing (1D)" << std::endl; @@ -405,7 +405,7 @@ int itkMRCImageIOTest(int argc, char* argv[]) std::cout << "[PASSED] reading (1D)" << std::endl; // 2D - typedef itk::Image ImageTypeUnsignedChar2; + typedef itk::Image ImageTypeUnsignedChar2; if (!(MRCImageIOTester< ImageTypeUnsignedChar2 >::Write(filePrefix, outputPath))) { std::cout << "[FAILED] writing (2D)" << std::endl; @@ -453,7 +453,7 @@ int itkMRCImageIOTest(int argc, char* argv[]) // // test unusable dimensions // - typedef itk::Image ImageTypeUnsignedChar4; + typedef itk::Image ImageTypeUnsignedChar4; if (MRCImageIOTester< ImageTypeUnsignedChar4 >::Write(filePrefix, outputPath)) { std::cout << "[FAILED] incorrectly returned true (4D)" << std::endl; @@ -461,7 +461,7 @@ int itkMRCImageIOTest(int argc, char* argv[]) } std::cout << "[PASSED] threw exception (4D)" << std::endl; - typedef itk::Image ImageTypeUnsignedChar5; + typedef itk::Image ImageTypeUnsignedChar5; if (MRCImageIOTester< ImageTypeUnsignedChar5 >::Write(filePrefix, outputPath)) { std::cout << "[FAILED] incorrectly returned true (5D)" << std::endl; diff --git a/Modules/Nonunit/Review/test/itkMapMaskedRankImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkMapMaskedRankImageFilterTest.cxx index 57d73e2f5fa..a2a71063f1e 100644 --- a/Modules/Nonunit/Review/test/itkMapMaskedRankImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkMapMaskedRankImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkMapMaskedRankImageFilterTest(int ac, char* av[] ) return -1; } - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; ReaderType::Pointer input = ReaderType::New(); diff --git a/Modules/Nonunit/Review/test/itkMapRankImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkMapRankImageFilterTest.cxx index f1649f47034..3f3a8a3f8b2 100644 --- a/Modules/Nonunit/Review/test/itkMapRankImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkMapRankImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkMapRankImageFilterTest(int ac, char* av[] ) return -1; } - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; ReaderType::Pointer input = ReaderType::New(); diff --git a/Modules/Nonunit/Review/test/itkMaskedRankImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkMaskedRankImageFilterTest.cxx index edbc037f163..16ee3ea4d49 100644 --- a/Modules/Nonunit/Review/test/itkMaskedRankImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkMaskedRankImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkMaskedRankImageFilterTest(int ac, char* av[] ) return -1; } - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; ReaderType::Pointer input = ReaderType::New(); diff --git a/Modules/Nonunit/Review/test/itkMorphologicalWatershedFromMarkersImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkMorphologicalWatershedFromMarkersImageFilterTest.cxx index 50b8081ccf7..25944dd88cf 100644 --- a/Modules/Nonunit/Review/test/itkMorphologicalWatershedFromMarkersImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkMorphologicalWatershedFromMarkersImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkMorphologicalWatershedFromMarkersImageFilterTest(int argc, char * argv[]) } const int dim = 2; - typedef unsigned char PType; + typedef uint8_t PType; typedef itk::Image< PType, dim > IType; @@ -95,7 +95,7 @@ int itkMorphologicalWatershedFromMarkersImageFilterTest(int argc, char * argv[]) if( argc > 6 ) { - typedef itk::RGBPixel RGBPixelType; + typedef itk::RGBPixel RGBPixelType; typedef itk::Image RGBImageType; typedef itk::LabelOverlayImageFilter OverlayType; diff --git a/Modules/Nonunit/Review/test/itkMorphologicalWatershedImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkMorphologicalWatershedImageFilterTest.cxx index 667adde1926..dc5dab86363 100644 --- a/Modules/Nonunit/Review/test/itkMorphologicalWatershedImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkMorphologicalWatershedImageFilterTest.cxx @@ -36,7 +36,7 @@ int itkMorphologicalWatershedImageFilterTest(int argc, char * argv[]) } const int dim = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; @@ -134,7 +134,7 @@ int itkMorphologicalWatershedImageFilterTest(int argc, char * argv[]) if( argc > 6 ) { - typedef itk::RGBPixel< unsigned char > RGBPixelType; + typedef itk::RGBPixel< uint8_t > RGBPixelType; typedef itk::Image< RGBPixelType, dim > RGBImageType; typedef itk::LabelOverlayImageFilter< diff --git a/Modules/Nonunit/Review/test/itkMultiphaseDenseFiniteDifferenceImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkMultiphaseDenseFiniteDifferenceImageFilterTest.cxx index 774fdbb1382..34eacdb35e1 100644 --- a/Modules/Nonunit/Review/test/itkMultiphaseDenseFiniteDifferenceImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkMultiphaseDenseFiniteDifferenceImageFilterTest.cxx @@ -65,7 +65,7 @@ int itkMultiphaseDenseFiniteDifferenceImageFilterTest( int, char* [] ) typedef itk::Image< double, Dimension > LevelSetImageType; typedef itk::Image< float, Dimension > FeatureImageType; - typedef itk::Image< unsigned char, Dimension > OutputImageType; + typedef itk::Image< uint8_t, Dimension > OutputImageType; typedef itk::ScalarChanAndVeseLevelSetFunctionData< LevelSetImageType, FeatureImageType > DataHelperType; diff --git a/Modules/Nonunit/Review/test/itkMultiphaseFiniteDifferenceImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkMultiphaseFiniteDifferenceImageFilterTest.cxx index 60a5fcacfce..c7b1b583c05 100644 --- a/Modules/Nonunit/Review/test/itkMultiphaseFiniteDifferenceImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkMultiphaseFiniteDifferenceImageFilterTest.cxx @@ -64,7 +64,7 @@ int itkMultiphaseFiniteDifferenceImageFilterTest( int, char* [] ) typedef itk::Image< double, Dimension > LevelSetImageType; typedef itk::Image< float, Dimension > FeatureImageType; - typedef itk::Image< unsigned char, Dimension > OutputImageType; + typedef itk::Image< uint8_t, Dimension > OutputImageType; typedef itk::ScalarChanAndVeseLevelSetFunctionData< LevelSetImageType, FeatureImageType > DataHelperType; diff --git a/Modules/Nonunit/Review/test/itkMultiphaseSparseFiniteDifferenceImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkMultiphaseSparseFiniteDifferenceImageFilterTest.cxx index ed12bcd8825..d4c1450483e 100644 --- a/Modules/Nonunit/Review/test/itkMultiphaseSparseFiniteDifferenceImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkMultiphaseSparseFiniteDifferenceImageFilterTest.cxx @@ -66,7 +66,7 @@ int itkMultiphaseSparseFiniteDifferenceImageFilterTest( int, char* [] ) typedef itk::Image< double, Dimension > LevelSetImageType; typedef itk::Image< float, Dimension > FeatureImageType; - typedef itk::Image< unsigned char, Dimension > OutputImageType; + typedef itk::Image< uint8_t, Dimension > OutputImageType; typedef itk::ScalarChanAndVeseLevelSetFunctionData< LevelSetImageType, FeatureImageType > DataHelperType; diff --git a/Modules/Nonunit/Review/test/itkOptMattesMutualInformationImageToImageMetricThreadsTest1.cxx b/Modules/Nonunit/Review/test/itkOptMattesMutualInformationImageToImageMetricThreadsTest1.cxx index 6729bbbda23..d762648678e 100644 --- a/Modules/Nonunit/Review/test/itkOptMattesMutualInformationImageToImageMetricThreadsTest1.cxx +++ b/Modules/Nonunit/Review/test/itkOptMattesMutualInformationImageToImageMetricThreadsTest1.cxx @@ -43,7 +43,7 @@ int itkOptMattesMutualInformationImageToImageMetricThreadsTest1( int argc, char* std::cout << std::endl; - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 2; typedef itk::Image< PixelType > ImageType; diff --git a/Modules/Nonunit/Review/test/itkRankImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkRankImageFilterTest.cxx index a889531f5ba..ef043e8d033 100644 --- a/Modules/Nonunit/Review/test/itkRankImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkRankImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkRankImageFilterTest(int ac, char* av[] ) return -1; } - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; ReaderType::Pointer input = ReaderType::New(); diff --git a/Modules/Nonunit/Review/test/itkRegionalMaximaImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkRegionalMaximaImageFilterTest.cxx index 3e58d6ba945..2a557936324 100644 --- a/Modules/Nonunit/Review/test/itkRegionalMaximaImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkRegionalMaximaImageFilterTest.cxx @@ -37,7 +37,7 @@ int itkRegionalMaximaImageFilterTest(int argc, char * argv[]) const int dim = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Nonunit/Review/test/itkRegionalMaximaImageFilterTest2.cxx b/Modules/Nonunit/Review/test/itkRegionalMaximaImageFilterTest2.cxx index d66d34c2c70..1bf03682682 100644 --- a/Modules/Nonunit/Review/test/itkRegionalMaximaImageFilterTest2.cxx +++ b/Modules/Nonunit/Review/test/itkRegionalMaximaImageFilterTest2.cxx @@ -37,7 +37,7 @@ int itkRegionalMaximaImageFilterTest2(int argc, char * argv[]) return EXIT_FAILURE; } - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Nonunit/Review/test/itkRegionalMinimaImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkRegionalMinimaImageFilterTest.cxx index 9b7f2fec459..684dacfbdb5 100644 --- a/Modules/Nonunit/Review/test/itkRegionalMinimaImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkRegionalMinimaImageFilterTest.cxx @@ -37,7 +37,7 @@ int itkRegionalMinimaImageFilterTest(int argc, char * argv[]) return EXIT_FAILURE; } - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Nonunit/Review/test/itkRegionalMinimaImageFilterTest2.cxx b/Modules/Nonunit/Review/test/itkRegionalMinimaImageFilterTest2.cxx index 6d9bd515c46..362694d50a3 100644 --- a/Modules/Nonunit/Review/test/itkRegionalMinimaImageFilterTest2.cxx +++ b/Modules/Nonunit/Review/test/itkRegionalMinimaImageFilterTest2.cxx @@ -38,7 +38,7 @@ int itkRegionalMinimaImageFilterTest2(int argc, char * argv[]) } - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Nonunit/Review/test/itkReviewPrintTest.cxx b/Modules/Nonunit/Review/test/itkReviewPrintTest.cxx index 20e3759d99a..25c0f9a227f 100644 --- a/Modules/Nonunit/Review/test/itkReviewPrintTest.cxx +++ b/Modules/Nonunit/Review/test/itkReviewPrintTest.cxx @@ -44,8 +44,8 @@ int main(int , char* []) { typedef itk::Image Input2DImageType; typedef itk::Image OutputType; - typedef itk::Image CharType; - typedef itk::RGBPixel RGBPixelType; + typedef itk::Image CharType; + typedef itk::RGBPixel RGBPixelType; typedef itk::Image< RGBPixelType, 2 > RGBImageType; typedef itk::Vector VectorType; @@ -56,7 +56,7 @@ int main(int , char* []) typedef itk::Vector MeasurementVectorType; typedef itk::Vector TargetVectorType; - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Mesh< float, 3 > MeshType; typedef itk::NumericTraits< PixelType >::RealType RealPixelType; diff --git a/Modules/Nonunit/Review/test/itkRobustAutomaticThresholdImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkRobustAutomaticThresholdImageFilterTest.cxx index fdef0d2efc0..a9ec183af32 100644 --- a/Modules/Nonunit/Review/test/itkRobustAutomaticThresholdImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkRobustAutomaticThresholdImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkRobustAutomaticThresholdImageFilterTest(int argc, char * argv[]) const int dim = 2; - typedef unsigned short PType; + typedef uint16_t PType; typedef itk::Image< PType, dim > IType; typedef float RPType; diff --git a/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest1.cxx b/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest1.cxx index 22c37bfa47c..b9e4b187327 100644 --- a/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest1.cxx +++ b/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest1.cxx @@ -35,7 +35,7 @@ int itkShapedFloodFilledImageFunctionConditionalConstIteratorTest1(int argc, cha try { const unsigned int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image ImageType; typedef ImageType::RegionType RegionType; diff --git a/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest2.cxx b/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest2.cxx index 8becb29ceea..381909e6f55 100644 --- a/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest2.cxx +++ b/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest2.cxx @@ -29,7 +29,7 @@ int itkShapedFloodFilledImageFunctionConditionalConstIteratorTest2( int, char * try { const unsigned int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image ImageType; typedef ImageType::RegionType RegionType; @@ -98,7 +98,7 @@ int itkShapedFloodFilledImageFunctionConditionalConstIteratorTest2( int, char * shapedFloodIt.SetFullyConnected(false); // 4-connected, default - for (unsigned short i = 1; !floodIt.IsAtEnd(); ++floodIt, + for (uint16_t i = 1; !floodIt.IsAtEnd(); ++floodIt, ++shapedFloodIt, ++i) { diff --git a/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest3.cxx b/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest3.cxx index 94bda4aff6a..d2668b63cd9 100644 --- a/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest3.cxx +++ b/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest3.cxx @@ -29,7 +29,7 @@ int itkShapedFloodFilledImageFunctionConditionalConstIteratorTest3(int, char * [ try { const unsigned int ImageDimension = 3; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image ImageType; typedef ImageType::RegionType RegionType; @@ -100,7 +100,7 @@ int itkShapedFloodFilledImageFunctionConditionalConstIteratorTest3(int, char * [ shapedFloodIt.SetFullyConnected(false); // 4-connected, default - for (unsigned short i = 1; !floodIt.IsAtEnd(); ++floodIt, + for (uint16_t i = 1; !floodIt.IsAtEnd(); ++floodIt, ++shapedFloodIt, ++i) { diff --git a/Modules/Nonunit/Review/test/itkValuedRegionalMaximaImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkValuedRegionalMaximaImageFilterTest.cxx index bfc61859099..a5d9c82afc8 100644 --- a/Modules/Nonunit/Review/test/itkValuedRegionalMaximaImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkValuedRegionalMaximaImageFilterTest.cxx @@ -37,7 +37,7 @@ int itkValuedRegionalMaximaImageFilterTest(int argc, char * argv[]) return EXIT_FAILURE; } - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Nonunit/Review/test/itkValuedRegionalMinimaImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkValuedRegionalMinimaImageFilterTest.cxx index 873d5ba06c2..99768895b9a 100644 --- a/Modules/Nonunit/Review/test/itkValuedRegionalMinimaImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkValuedRegionalMinimaImageFilterTest.cxx @@ -39,7 +39,7 @@ int itkValuedRegionalMinimaImageFilterTest(int argc, char * argv[]) return EXIT_FAILURE; } - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image< PixelType, dim > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Nonunit/Review/test/itkVoxBoCUBImageIOTest.cxx b/Modules/Nonunit/Review/test/itkVoxBoCUBImageIOTest.cxx index 829eee94f16..b991a9d2503 100644 --- a/Modules/Nonunit/Review/test/itkVoxBoCUBImageIOTest.cxx +++ b/Modules/Nonunit/Review/test/itkVoxBoCUBImageIOTest.cxx @@ -30,7 +30,7 @@ int itkVoxBoCUBImageIOTest( int argc, char * argv [] ) return EXIT_FAILURE; } - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image< PixelType, 3 > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; diff --git a/Modules/Nonunit/Review/test/itkWarpHarmonicEnergyCalculatorTest.cxx b/Modules/Nonunit/Review/test/itkWarpHarmonicEnergyCalculatorTest.cxx index 000cc0838b8..12060930397 100644 --- a/Modules/Nonunit/Review/test/itkWarpHarmonicEnergyCalculatorTest.cxx +++ b/Modules/Nonunit/Review/test/itkWarpHarmonicEnergyCalculatorTest.cxx @@ -27,7 +27,7 @@ int itkWarpHarmonicEnergyCalculatorTest(int, char* [] ) const unsigned int ImageDimension = 3; typedef itk::Vector< double, ImageDimension > DeformationPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; // Declare the types of the images typedef itk::Image DisplacementFieldType; diff --git a/Modules/Nonunit/Review/test/itkWarpJacobianDeterminantFilterTest.cxx b/Modules/Nonunit/Review/test/itkWarpJacobianDeterminantFilterTest.cxx index 649f0547884..454cfa7cf5f 100644 --- a/Modules/Nonunit/Review/test/itkWarpJacobianDeterminantFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkWarpJacobianDeterminantFilterTest.cxx @@ -26,7 +26,7 @@ int itkWarpJacobianDeterminantFilterTest(int, char* [] ) const unsigned int ImageDimension = 3; typedef itk::Vector< double, ImageDimension > DeformationPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; // Declare the types of the images typedef itk::Image DisplacementFieldType; diff --git a/Modules/Numerics/FEM/include/itkFEMSpatialObjectReader.h b/Modules/Numerics/FEM/include/itkFEMSpatialObjectReader.h index dc78be081fc..36887ae81d0 100644 --- a/Modules/Numerics/FEM/include/itkFEMSpatialObjectReader.h +++ b/Modules/Numerics/FEM/include/itkFEMSpatialObjectReader.h @@ -30,7 +30,7 @@ namespace itk * \ingroup ITKFEM */ template< unsigned int NDimensions = 3, - typename PixelType = unsigned char, + typename PixelType = uint8_t, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions > > class FEMSpatialObjectReader : public SpatialObjectReader diff --git a/Modules/Numerics/FEM/include/itkFEMSpatialObjectWriter.h b/Modules/Numerics/FEM/include/itkFEMSpatialObjectWriter.h index 1c429e673ac..07e096e61b7 100644 --- a/Modules/Numerics/FEM/include/itkFEMSpatialObjectWriter.h +++ b/Modules/Numerics/FEM/include/itkFEMSpatialObjectWriter.h @@ -30,7 +30,7 @@ namespace itk * \ingroup ITKFEM */ template< unsigned int NDimensions = 3, - typename PixelType = unsigned char, + typename PixelType = uint8_t, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions > > class FEMSpatialObjectWriter : public SpatialObjectWriter diff --git a/Modules/Numerics/FEM/test/itkImageToRectilinearFEMObjectFilter2DTest.cxx b/Modules/Numerics/FEM/test/itkImageToRectilinearFEMObjectFilter2DTest.cxx index 1e3b4b07fd6..5edb5d8a308 100644 --- a/Modules/Numerics/FEM/test/itkImageToRectilinearFEMObjectFilter2DTest.cxx +++ b/Modules/Numerics/FEM/test/itkImageToRectilinearFEMObjectFilter2DTest.cxx @@ -34,7 +34,7 @@ int itkImageToRectilinearFEMObjectFilter2DTest(int argc, char *argv[]) //the initializaiton of the itk::FEMFactoryBase::GetFactory() itk::FEMFactoryBase::GetFactory()->RegisterDefaultTypes(); - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::ImageFileReader ImageFileReaderType; double tolerance = 0.0001; diff --git a/Modules/Numerics/FEM/test/itkImageToRectilinearFEMObjectFilter3DTest.cxx b/Modules/Numerics/FEM/test/itkImageToRectilinearFEMObjectFilter3DTest.cxx index 5ecd66e43e6..6459ec28de1 100644 --- a/Modules/Numerics/FEM/test/itkImageToRectilinearFEMObjectFilter3DTest.cxx +++ b/Modules/Numerics/FEM/test/itkImageToRectilinearFEMObjectFilter3DTest.cxx @@ -34,7 +34,7 @@ int itkImageToRectilinearFEMObjectFilter3DTest(int argc, char *argv[]) //the initializaiton of the itk::FEMFactoryBase::GetFactory() itk::FEMFactoryBase::GetFactory()->RegisterDefaultTypes(); - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::ImageFileReader ImageFileReaderType; double tolerance = 0.001; diff --git a/Modules/Numerics/NarrowBand/include/itkNarrowBand.h b/Modules/Numerics/NarrowBand/include/itkNarrowBand.h index e8f18f1e57f..63757de9252 100644 --- a/Modules/Numerics/NarrowBand/include/itkNarrowBand.h +++ b/Modules/Numerics/NarrowBand/include/itkNarrowBand.h @@ -36,7 +36,7 @@ class BandNode public: TDataType m_Data; TIndexType m_Index; - signed char m_NodeState; + int8_t m_NodeState; BandNode() : m_NodeState( 0 ) {} }; diff --git a/Modules/Numerics/NarrowBand/include/itkNarrowBandImageFilterBase.h b/Modules/Numerics/NarrowBand/include/itkNarrowBandImageFilterBase.h index cd0ea4a923c..037c9b6a286 100644 --- a/Modules/Numerics/NarrowBand/include/itkNarrowBandImageFilterBase.h +++ b/Modules/Numerics/NarrowBand/include/itkNarrowBandImageFilterBase.h @@ -138,7 +138,7 @@ class NarrowBandImageFilterBase: void InsertNarrowBandNode(const IndexType & index, const PixelType & value, - const signed char & nodestate) + const int8_t & nodestate) { BandNodeType tmpnode; diff --git a/Modules/Numerics/NarrowBand/include/itkNarrowBandImageFilterBase.hxx b/Modules/Numerics/NarrowBand/include/itkNarrowBandImageFilterBase.hxx index 3adbc0d82d0..d57a60c4d71 100644 --- a/Modules/Numerics/NarrowBand/include/itkNarrowBandImageFilterBase.hxx +++ b/Modules/Numerics/NarrowBand/include/itkNarrowBandImageFilterBase.hxx @@ -276,7 +276,7 @@ NarrowBandImageFilterBase< TInputImage, TOutputImage > ThreadIdType threadId) { //const int INNER_MASK = 2; - const signed char INNER_MASK = 2; + const int8_t INNER_MASK = 2; typename NarrowBandType::ConstIterator it; typename OutputImageType::Pointer image = this->GetOutput(); diff --git a/Modules/Numerics/NarrowBand/test/itkNarrowBandImageFilterBaseTest.cxx b/Modules/Numerics/NarrowBand/test/itkNarrowBandImageFilterBaseTest.cxx index 1a8a82edef4..e03d28298da 100644 --- a/Modules/Numerics/NarrowBand/test/itkNarrowBandImageFilterBaseTest.cxx +++ b/Modules/Numerics/NarrowBand/test/itkNarrowBandImageFilterBaseTest.cxx @@ -111,7 +111,7 @@ int itkNarrowBandImageFilterBaseTest(int argc, char* argv[]) } typedef float PixelType; - typedef unsigned char WriterPixelType; + typedef uint8_t WriterPixelType; const unsigned int ImageDimension = 2; typedef itk::Image ImageType; typedef itk::Image WriterImageType; diff --git a/Modules/Numerics/Optimizersv4/test/itkObjectToObjectMetricBaseTest.cxx b/Modules/Numerics/Optimizersv4/test/itkObjectToObjectMetricBaseTest.cxx index 94d70fc095e..13d49311513 100644 --- a/Modules/Numerics/Optimizersv4/test/itkObjectToObjectMetricBaseTest.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkObjectToObjectMetricBaseTest.cxx @@ -92,7 +92,7 @@ class ITK_EXPORT ObjectToObjectMetricTestMetric: int itkObjectToObjectMetricBaseTest(int ,char * []) { - typedef itk::Image< unsigned char, 3 > ImageType; + typedef itk::Image< uint8_t, 3 > ImageType; typedef ObjectToObjectMetricTestMetric ObjectMetricType; ObjectMetricType::Pointer objectMetric = ObjectMetricType::New(); diff --git a/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.hxx b/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.hxx index 629c0bb2f16..d446df21092 100644 --- a/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.hxx @@ -43,7 +43,7 @@ ImageToHistogramFilter< TImage > SimpleDataObjectDecorator::Pointer autoMinMax = SimpleDataObjectDecorator::New(); - if( typeid(ValueType) == typeid(signed char) || typeid(ValueType) == typeid(unsigned char) ) + if( typeid(ValueType) == typeid(int8_t) || typeid(ValueType) == typeid(uint8_t) ) { autoMinMax->Set(false); } diff --git a/Modules/Numerics/Statistics/include/itkMeasurementVectorTraits.h b/Modules/Numerics/Statistics/include/itkMeasurementVectorTraits.h index 17a8316f03f..5cc393bc3be 100644 --- a/Modules/Numerics/Statistics/include/itkMeasurementVectorTraits.h +++ b/Modules/Numerics/Statistics/include/itkMeasurementVectorTraits.h @@ -442,31 +442,31 @@ class MeasurementVectorPixelTraits< char > }; template< > -class MeasurementVectorPixelTraits< unsigned char > +class MeasurementVectorPixelTraits< uint8_t > { public: - typedef FixedArray< unsigned char, 1 > MeasurementVectorType; + typedef FixedArray< uint8_t, 1 > MeasurementVectorType; }; template< > -class MeasurementVectorPixelTraits< signed char > +class MeasurementVectorPixelTraits< int8_t > { public: - typedef FixedArray< signed char, 1 > MeasurementVectorType; + typedef FixedArray< int8_t, 1 > MeasurementVectorType; }; template< > -class MeasurementVectorPixelTraits< unsigned short > +class MeasurementVectorPixelTraits< uint16_t > { public: - typedef FixedArray< unsigned short, 1 > MeasurementVectorType; + typedef FixedArray< uint16_t, 1 > MeasurementVectorType; }; template< > -class MeasurementVectorPixelTraits< signed short > +class MeasurementVectorPixelTraits< int16_t > { public: - typedef FixedArray< signed short, 1 > MeasurementVectorType; + typedef FixedArray< int16_t, 1 > MeasurementVectorType; }; template< > diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.h b/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.h index f4677f3d3ef..dc33e98bdba 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.h +++ b/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.h @@ -113,7 +113,7 @@ class ITK_EXPORT ScalarImageToCooccurrenceMatrixFilter:public ProcessObject typedef typename ImageType::RegionType RegionType; typedef typename ImageType::SizeType RadiusType; typedef typename ImageType::OffsetType OffsetType; - typedef VectorContainer< unsigned char, OffsetType > OffsetVector; + typedef VectorContainer< uint8_t, OffsetType > OffsetVector; typedef typename OffsetVector::Pointer OffsetVectorPointer; typedef typename OffsetVector::ConstPointer OffsetVectorConstPointer; diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.h b/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.h index 3cc2510eb01..e01d7eb57a5 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.h +++ b/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.h @@ -114,7 +114,7 @@ class ITK_EXPORT ScalarImageToRunLengthFeaturesFilter:public ProcessObject typedef typename ImageType::PixelType PixelType; typedef typename ImageType::OffsetType OffsetType; - typedef VectorContainer< unsigned char, OffsetType > OffsetVector; + typedef VectorContainer< uint8_t, OffsetType > OffsetVector; typedef typename OffsetVector::Pointer OffsetVectorPointer; typedef typename OffsetVector::ConstPointer OffsetVectorConstPointer; @@ -128,11 +128,11 @@ class ITK_EXPORT ScalarImageToRunLengthFeaturesFilter:public ProcessObject RunLengthFeaturesFilterType; typedef short RunLengthFeatureName; - typedef VectorContainer FeatureNameVector; typedef typename FeatureNameVector::Pointer FeatureNameVectorPointer; typedef typename FeatureNameVector::ConstPointer FeatureNameVectorConstPointer; - typedef VectorContainer< unsigned char, double > FeatureValueVector; + typedef VectorContainer< uint8_t, double > FeatureValueVector; typedef typename FeatureValueVector::Pointer FeatureValueVectorPointer; /** Smart Pointer type to a DataObject. */ diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.h b/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.h index 5ae26c2e9f5..a28798453d4 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.h +++ b/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.h @@ -126,7 +126,7 @@ class ScalarImageToRunLengthMatrixFilter : public ProcessObject typedef typename ImageType::RegionType RegionType; typedef typename ImageType::SizeType RadiusType; typedef typename ImageType::OffsetType OffsetType; - typedef VectorContainer OffsetVector; + typedef VectorContainer OffsetVector; typedef typename OffsetVector::Pointer OffsetVectorPointer; typedef typename ImageType::PointType PointType; diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.h b/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.h index a97a737b75c..538d32597a1 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.h +++ b/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.h @@ -124,7 +124,7 @@ class ITK_EXPORT ScalarImageToTextureFeaturesFilter:public ProcessObject typedef typename ImageType::PixelType PixelType; typedef typename ImageType::OffsetType OffsetType; - typedef VectorContainer< unsigned char, OffsetType > OffsetVector; + typedef VectorContainer< uint8_t, OffsetType > OffsetVector; typedef typename OffsetVector::Pointer OffsetVectorPointer; typedef typename OffsetVector::ConstPointer OffsetVectorConstPointer; @@ -135,11 +135,11 @@ class ITK_EXPORT ScalarImageToTextureFeaturesFilter:public ProcessObject typedef HistogramToTextureFeaturesFilter< HistogramType > TextureFeaturesFilterType; typedef short TextureFeatureName; - typedef VectorContainer< unsigned char, TextureFeatureName > FeatureNameVector; + typedef VectorContainer< uint8_t, TextureFeatureName > FeatureNameVector; typedef typename FeatureNameVector::Pointer FeatureNameVectorPointer; typedef typename FeatureNameVector::ConstPointer FeatureNameVectorConstPointer; - typedef VectorContainer< unsigned char, double > FeatureValueVector; + typedef VectorContainer< uint8_t, double > FeatureValueVector; typedef typename FeatureValueVector::Pointer FeatureValueVectorPointer; /** Smart Pointer type to a DataObject. */ diff --git a/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest.cxx b/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest.cxx index ad672e4a520..1893e5ffd07 100644 --- a/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest.cxx @@ -31,7 +31,7 @@ int itkCovarianceSampleFilterTest(int, char* [] ) typedef itk::FixedArray< MeasurementType, MeasurementVectorSize > MeasurementVectorType; typedef itk::Image< MeasurementVectorType, 3 > ImageType; - typedef itk::Image< unsigned char, 3 > MaskImageType; + typedef itk::Image< uint8_t, 3 > MaskImageType; ImageType::Pointer image = ImageType::New(); ImageType::RegionType region; diff --git a/Modules/Numerics/Statistics/test/itkImageToListSampleAdaptorTest2.cxx b/Modules/Numerics/Statistics/test/itkImageToListSampleAdaptorTest2.cxx index 6ab9a2aac2e..6f9350a6ce0 100644 --- a/Modules/Numerics/Statistics/test/itkImageToListSampleAdaptorTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkImageToListSampleAdaptorTest2.cxx @@ -191,7 +191,7 @@ int itkImageToListSampleAdaptorTest2(int, char* [] ) // // Test an RGB image // - typedef itk::RGBPixel< unsigned char > RGBPixelType; + typedef itk::RGBPixel< uint8_t > RGBPixelType; unsigned int rgbMeasurementVectorSize = 3; diff --git a/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest.cxx b/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest.cxx index f8118e4c0dd..abc3be23271 100644 --- a/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest.cxx @@ -24,10 +24,10 @@ #include "itkImageRegionIteratorWithIndex.h" typedef itk::Image< unsigned int , 2 > ImageType; -typedef itk::Image< unsigned char, 2 > MaskImageType; +typedef itk::Image< uint8_t, 2 > MaskImageType; //------------------------------------------------------------------------ -// Creates a 10 x 10 image of unsigned chars with pixel at location +// Creates a 10 x 10 image of uint8_ts with pixel at location // (x,y) being yx. ie Pixel at (6,4) = 46. // static ImageType::Pointer CreateImage() @@ -57,7 +57,7 @@ static ImageType::Pointer CreateImage() } //------------------------------------------------------------------------ -// Creates a 10 x 10 image of unsigned chars with pixel from (2,3) - (8,5) as +// Creates a 10 x 10 image of uint8_ts with pixel from (2,3) - (8,5) as // 255 and rest as 0 static MaskImageType::Pointer CreateMaskImage() { @@ -88,7 +88,7 @@ static MaskImageType::Pointer CreateMaskImage() it.GoToBegin(); while (!it.IsAtEnd()) { - it.Set((unsigned char)255); + it.Set((uint8_t)255); ++it; } return image; diff --git a/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest2.cxx b/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest2.cxx index 317fd6844af..4e801863d2c 100644 --- a/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest2.cxx @@ -32,7 +32,7 @@ int itkImageToListSampleFilterTest2(int, char* [] ) const unsigned int ImageDimension = 3; typedef itk::Image< PixelType, ImageDimension > ImageType; - typedef itk::Image< unsigned char, ImageDimension > MaskImageType; + typedef itk::Image< uint8_t, ImageDimension > MaskImageType; ImageType::Pointer image = ImageType::New(); ImageType::IndexType start; @@ -79,7 +79,7 @@ int itkImageToListSampleFilterTest2(int, char* [] ) mit.GoToBegin(); while( !mit.IsAtEnd() ) { - mit.Set((unsigned char)255); + mit.Set((uint8_t)255); ++mit; } diff --git a/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest3.cxx b/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest3.cxx index 56635d238c3..d491d450557 100644 --- a/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest3.cxx +++ b/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest3.cxx @@ -32,7 +32,7 @@ int itkImageToListSampleFilterTest3(int, char* [] ) const unsigned int ImageDimension = 3; typedef itk::VectorImage< MeasurementComponentType, ImageDimension > ImageType; - typedef itk::Image< unsigned char, ImageDimension > MaskImageType; + typedef itk::Image< uint8_t, ImageDimension > MaskImageType; typedef ImageType::PixelType PixelType; @@ -88,7 +88,7 @@ int itkImageToListSampleFilterTest3(int, char* [] ) mit.GoToBegin(); while (!mit.IsAtEnd()) { - mit.Set((unsigned char)255); + mit.Set((uint8_t)255); ++mit; } diff --git a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest5.cxx b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest5.cxx index 1c638830db4..d7da7da8a73 100644 --- a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest5.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest5.cxx @@ -41,7 +41,7 @@ int itkSampleToHistogramFilterTest5(int argc, char *argv[] ) // SampleToHistogramFilter can be used for generating the // histogram of an image. // - typedef unsigned char VMeasurementType; // type for the samples + typedef uint8_t VMeasurementType; // type for the samples typedef float HMeasurementType; // type for the histogram diff --git a/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest.cxx b/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest.cxx index 8b62f3f9465..1a50d8f3d48 100644 --- a/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest.cxx @@ -34,7 +34,7 @@ int itkScalarImageToCooccurrenceMatrixFilterTest(int, char* [] ) //------------------------------------------------------ //Create a simple test images //------------------------------------------------------ - typedef itk::Image InputImageType; + typedef itk::Image InputImageType; typedef itk::ImageRegionIterator< InputImageType > InputImageIterator; diff --git a/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest2.cxx b/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest2.cxx index 02321ed3fd0..e979b3b502a 100644 --- a/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest2.cxx @@ -34,7 +34,7 @@ int itkScalarImageToCooccurrenceMatrixFilterTest2(int, char* [] ) //------------------------------------------------------ //Create a simple test images //------------------------------------------------------ - typedef itk::Image InputImageType; + typedef itk::Image InputImageType; typedef itk::ImageRegionIterator< InputImageType > InputImageIterator; diff --git a/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthFeaturesFilterTest.cxx b/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthFeaturesFilterTest.cxx index ccd1aefcf5a..8ba09f693be 100644 --- a/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthFeaturesFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthFeaturesFilterTest.cxx @@ -33,7 +33,7 @@ int itkScalarImageToRunLengthFeaturesFilterTest(int, char* [] ) //------------------------------------------------------ //Create a simple test images //------------------------------------------------------ - typedef itk::Image InputImageType; + typedef itk::Image InputImageType; typedef itk::ImageRegionIterator< InputImageType > InputImageIterator; diff --git a/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthMatrixFilterTest.cxx b/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthMatrixFilterTest.cxx index 03c40e1361b..892b3094e46 100644 --- a/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthMatrixFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthMatrixFilterTest.cxx @@ -34,7 +34,7 @@ int itkScalarImageToRunLengthMatrixFilterTest(int, char* [] ) //------------------------------------------------------ //Create a simple test images //------------------------------------------------------ - typedef itk::Image InputImageType; + typedef itk::Image InputImageType; typedef itk::ImageRegionIterator< InputImageType > InputImageIterator; diff --git a/Modules/Numerics/Statistics/test/itkScalarImageToTextureFeaturesFilterTest.cxx b/Modules/Numerics/Statistics/test/itkScalarImageToTextureFeaturesFilterTest.cxx index d3090df01ca..250a7a5df36 100644 --- a/Modules/Numerics/Statistics/test/itkScalarImageToTextureFeaturesFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkScalarImageToTextureFeaturesFilterTest.cxx @@ -33,7 +33,7 @@ int itkScalarImageToTextureFeaturesFilterTest(int, char* [] ) //------------------------------------------------------ //Create a simple test images //------------------------------------------------------ - typedef itk::Image InputImageType; + typedef itk::Image InputImageType; typedef itk::ImageRegionIterator< InputImageType > InputImageIterator; diff --git a/Modules/Numerics/Statistics/test/itkStandardDeviationPerComponentSampleFilterTest.cxx b/Modules/Numerics/Statistics/test/itkStandardDeviationPerComponentSampleFilterTest.cxx index 5dbba5ce076..eb15f74906a 100644 --- a/Modules/Numerics/Statistics/test/itkStandardDeviationPerComponentSampleFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkStandardDeviationPerComponentSampleFilterTest.cxx @@ -32,7 +32,7 @@ int itkStandardDeviationPerComponentSampleFilterTest(int, char* [] ) typedef itk::FixedArray< MeasurementType, MeasurementVectorSize > MeasurementVectorType; typedef itk::Image< MeasurementVectorType, MeasurementVectorSize > ImageType; - typedef itk::Image< unsigned char, MeasurementVectorSize > MaskImageType; + typedef itk::Image< uint8_t, MeasurementVectorSize > MaskImageType; ImageType::Pointer image = ImageType::New(); ImageType::RegionType region; diff --git a/Modules/Numerics/Statistics/test/itkSubsampleTest.cxx b/Modules/Numerics/Statistics/test/itkSubsampleTest.cxx index 373813af08a..f88a07271a4 100644 --- a/Modules/Numerics/Statistics/test/itkSubsampleTest.cxx +++ b/Modules/Numerics/Statistics/test/itkSubsampleTest.cxx @@ -49,7 +49,7 @@ int itkSubsampleTest(int, char* [] ) typedef itk::FixedArray< FloatImage::PixelType, 1 > ArrayPixelType; typedef itk::Image< ArrayPixelType, 3 > ArrayPixelImageType; - typedef itk::Image< unsigned char, 3 > MaskPixelImageType; + typedef itk::Image< uint8_t, 3 > MaskPixelImageType; typedef itk::ComposeImageFilter< FloatImage, ArrayPixelImageType > ImageCastFilterType; diff --git a/Modules/Registration/Common/include/itkEuclideanDistancePointMetric.h b/Modules/Registration/Common/include/itkEuclideanDistancePointMetric.h index a5be327697e..182eba7903f 100644 --- a/Modules/Registration/Common/include/itkEuclideanDistancePointMetric.h +++ b/Modules/Registration/Common/include/itkEuclideanDistancePointMetric.h @@ -43,7 +43,7 @@ namespace itk */ template< class TFixedPointSet, class TMovingPointSet, class TDistanceMap = - ::itk::Image< unsigned short, TMovingPointSet::PointDimension > > + ::itk::Image< uint16_t, TMovingPointSet::PointDimension > > class ITK_EXPORT EuclideanDistancePointMetric: public PointSetToPointSetMetric< TFixedPointSet, TMovingPointSet > { diff --git a/Modules/Registration/Common/test/itkBlockMatchingImageFilterTest.cxx b/Modules/Registration/Common/test/itkBlockMatchingImageFilterTest.cxx index a43700f86cf..2310a77dd82 100644 --- a/Modules/Registration/Common/test/itkBlockMatchingImageFilterTest.cxx +++ b/Modules/Registration/Common/test/itkBlockMatchingImageFilterTest.cxx @@ -46,7 +46,7 @@ int itkBlockMatchingImageFilterTest( int argc, char * argv[] ) const double selectFraction = 0.01; - typedef unsigned char InputPixelType; + typedef uint8_t InputPixelType; typedef itk::RGBPixel OutputPixelType; static const unsigned int Dimension = 3; diff --git a/Modules/Registration/Common/test/itkCenteredTransformInitializerTest.cxx b/Modules/Registration/Common/test/itkCenteredTransformInitializerTest.cxx index 4e7e0ff77bc..9b9a1279ecc 100644 --- a/Modules/Registration/Common/test/itkCenteredTransformInitializerTest.cxx +++ b/Modules/Registration/Common/test/itkCenteredTransformInitializerTest.cxx @@ -243,8 +243,8 @@ int itkCenteredTransformInitializerTest(int , char* [] ) { // Create Images - typedef itk::Image FixedImageType; - typedef itk::Image MovingImageType; + typedef itk::Image FixedImageType; + typedef itk::Image MovingImageType; typedef FixedImageType::SizeType SizeType; typedef FixedImageType::SpacingType SpacingType; @@ -304,8 +304,8 @@ int itkCenteredTransformInitializerTest(int , char* [] ) { // Create Images - typedef itk::Image FixedImageType; - typedef itk::Image MovingImageType; + typedef itk::Image FixedImageType; + typedef itk::Image MovingImageType; typedef FixedImageType::SizeType SizeType; typedef FixedImageType::SpacingType SpacingType; diff --git a/Modules/Registration/Common/test/itkCenteredVersorTransformInitializerTest.cxx b/Modules/Registration/Common/test/itkCenteredVersorTransformInitializerTest.cxx index 4a9b7fadd37..81b4af538aa 100644 --- a/Modules/Registration/Common/test/itkCenteredVersorTransformInitializerTest.cxx +++ b/Modules/Registration/Common/test/itkCenteredVersorTransformInitializerTest.cxx @@ -35,10 +35,10 @@ int itkCenteredVersorTransformInitializerTest(int , char* [] ) const unsigned int Dimension = 3; // Fixed Image Type - typedef itk::Image FixedImageType; + typedef itk::Image FixedImageType; // Moving Image Type - typedef itk::Image MovingImageType; + typedef itk::Image MovingImageType; // Size Type typedef FixedImageType::SizeType SizeType; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_16.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_16.cxx index 1a4e121dd3b..2712e2087b5 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_16.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_16.cxx @@ -190,9 +190,9 @@ int itkImageRegistrationMethodTest_16(int itkNotUsed(argc), char*[] itkNotUsed(a bool result_uc, result_c, result_us, result_s, result_ui, result_i, result_ul, result_l, result_f, result_d; - result_uc = DoRegistration(); + result_uc = DoRegistration(); result_c = DoRegistration(); - result_us = DoRegistration(); + result_us = DoRegistration(); result_s = DoRegistration(); result_ui = DoRegistration(); result_i = DoRegistration(); @@ -201,9 +201,9 @@ int itkImageRegistrationMethodTest_16(int itkNotUsed(argc), char*[] itkNotUsed(a result_f = DoRegistration(); result_d = DoRegistration(); - std::cout << ": " << result_uc << std::endl; + std::cout << ": " << result_uc << std::endl; std::cout << ": " << result_c << std::endl; - std::cout << ": " << result_us << std::endl; + std::cout << ": " << result_us << std::endl; std::cout << ": " << result_s << std::endl; std::cout << ": " << result_ui << std::endl; std::cout << ": " << result_i << std::endl; diff --git a/Modules/Registration/Common/test/itkKappaStatisticImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkKappaStatisticImageToImageMetricTest.cxx index b6570a3cc17..fee14a6f6a9 100644 --- a/Modules/Registration/Common/test/itkKappaStatisticImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkKappaStatisticImageToImageMetricTest.cxx @@ -30,7 +30,7 @@ int itkKappaStatisticImageToImageMetricTest(int, char* [] ) { - typedef itk::Image< unsigned char, 2 > UCharImage2DType; + typedef itk::Image< uint8_t, 2 > UCharImage2DType; typedef itk::Image< double, 2 > DoubleImage2DType; typedef itk::KappaStatisticImageToImageMetric< UCharImage2DType, UCharImage2DType > MetricType; typedef itk::ImageRegionIteratorWithIndex< UCharImage2DType > UCharIteratorType; diff --git a/Modules/Registration/Common/test/itkKullbackLeiblerCompareHistogramImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkKullbackLeiblerCompareHistogramImageToImageMetricTest.cxx index 13a78443fdd..afcb23038be 100644 --- a/Modules/Registration/Common/test/itkKullbackLeiblerCompareHistogramImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkKullbackLeiblerCompareHistogramImageToImageMetricTest.cxx @@ -41,10 +41,10 @@ int itkKullbackLeiblerCompareHistogramImageToImageMetricTest(int, char* [] ) //------------------------------------------------------------ //Allocate Images - typedef itk::Image MovingImageType; - typedef itk::Image FixedImageType; - typedef itk::Image TrainingMovingImageType; - typedef itk::Image TrainingFixedImageType; + typedef itk::Image MovingImageType; + typedef itk::Image FixedImageType; + typedef itk::Image TrainingMovingImageType; + typedef itk::Image TrainingFixedImageType; enum { ImageDimension = MovingImageType::ImageDimension }; @@ -118,7 +118,7 @@ int itkKullbackLeiblerCompareHistogramImageToImageMetricTest(int, char* [] ) d += displacement; const double x = d[0]; const double y = d[1]; - ri.Set( (unsigned char) ( mag * vcl_exp( - ( x*x + y*y )/(s*s) ) ) ); + ri.Set( (uint8_t) ( mag * vcl_exp( - ( x*x + y*y )/(s*s) ) ) ); ++ri; } @@ -130,7 +130,7 @@ int itkKullbackLeiblerCompareHistogramImageToImageMetricTest(int, char* [] ) d = p-center; const double x = d[0]; const double y = d[1]; - ti.Set( (unsigned char) ( mag * vcl_exp( - ( x*x + y*y )/(s*s) ) ) ); + ti.Set( (uint8_t) ( mag * vcl_exp( - ( x*x + y*y )/(s*s) ) ) ); ++ti; } @@ -145,7 +145,7 @@ int itkKullbackLeiblerCompareHistogramImageToImageMetricTest(int, char* [] ) // d += displacement; const double x = d[0]; const double y = d[1]; - gri.Set( (unsigned char) (( mag * vcl_exp( - ( x*x + y*y )/(s*s) ) ) + + gri.Set( (uint8_t) (( mag * vcl_exp( - ( x*x + y*y )/(s*s) ) ) + vnl_sample_normal(0.0, noisemag))); ++gri; } @@ -158,7 +158,7 @@ int itkKullbackLeiblerCompareHistogramImageToImageMetricTest(int, char* [] ) d = p-center; const double x = d[0]; const double y = d[1]; - gti.Set( (unsigned char) (( mag * vcl_exp( - ( x*x + y*y )/(s*s) ) ) + + gti.Set( (uint8_t) (( mag * vcl_exp( - ( x*x + y*y )/(s*s) ) ) + vnl_sample_normal(0.0, noisemag))); ++gti; } diff --git a/Modules/Registration/Common/test/itkMatchCardinalityImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkMatchCardinalityImageToImageMetricTest.cxx index b29fec6c615..d838c0f443b 100644 --- a/Modules/Registration/Common/test/itkMatchCardinalityImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMatchCardinalityImageToImageMetricTest.cxx @@ -32,7 +32,7 @@ int itkMatchCardinalityImageToImageMetricTest(int argc, char* argv[] ) exit (1); } - typedef itk::Image ImageType; + typedef itk::Image ImageType; typedef itk::TranslationTransform TransformType; typedef TransformType::OutputVectorType OffsetType; typedef itk::MatchCardinalityImageToImageMetric MetricType; diff --git a/Modules/Registration/Common/test/itkMattesMutualInformationImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkMattesMutualInformationImageToImageMetricTest.cxx index 0901bf2b706..94f838a58a4 100644 --- a/Modules/Registration/Common/test/itkMattesMutualInformationImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMattesMutualInformationImageToImageMetricTest.cxx @@ -115,7 +115,7 @@ int TestMattesMetricWithAffineTransform( d += displacement; const double x = d[0]; const double y = d[1]; - ri.Set( (unsigned char) ( 200.0 * vcl_exp( - ( x*x + y*y )/(s*s) ) ) ); + ri.Set( (uint8_t) ( 200.0 * vcl_exp( - ( x*x + y*y )/(s*s) ) ) ); ++ri; } @@ -127,7 +127,7 @@ int TestMattesMetricWithAffineTransform( d = p-center; const double x = d[0]; const double y = d[1]; - ti.Set( (unsigned char) ( 200.0 * vcl_exp( - ( x*x + y*y )/(s*s) ) ) ); + ti.Set( (uint8_t) ( 200.0 * vcl_exp( - ( x*x + y*y )/(s*s) ) ) ); ++ti; } @@ -488,7 +488,7 @@ int TestMattesMetricWithBSplineTransform( d += displacement; const double x = d[0]; const double y = d[1]; - ri.Set( (unsigned char) ( 200.0 * vcl_exp( - ( x*x + y*y )/(s*s) ) ) ); + ri.Set( (uint8_t) ( 200.0 * vcl_exp( - ( x*x + y*y )/(s*s) ) ) ); ++ri; } @@ -500,7 +500,7 @@ int TestMattesMetricWithBSplineTransform( d = p-center; const double x = d[0]; const double y = d[1]; - ti.Set( (unsigned char) ( 200.0 * vcl_exp( - ( x*x + y*y )/(s*s) ) ) ); + ti.Set( (uint8_t) ( 200.0 * vcl_exp( - ( x*x + y*y )/(s*s) ) ) ); ++ti; } @@ -690,7 +690,7 @@ int itkMattesMutualInformationImageToImageMetricTest(int argc, char * argv [] ) } int failed; - typedef itk::Image ImageType; + typedef itk::Image ImageType; bool useSampling = true; diff --git a/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferenceImageMetricTest.cxx b/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferenceImageMetricTest.cxx index 98ab6d81806..cd740421e48 100644 --- a/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferenceImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferenceImageMetricTest.cxx @@ -41,7 +41,7 @@ int itkMeanReciprocalSquareDifferenceImageMetricTest(int, char* [] ) const unsigned int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef double CoordinateRepresentationType; diff --git a/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_1.cxx b/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_1.cxx index d3c36bf9e30..48c9216af87 100644 --- a/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_1.cxx +++ b/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_1.cxx @@ -266,7 +266,7 @@ int itkMultiResolutionImageRegistrationMethodTest_1(int, char* [] ) SimpleMultiResolutionImageRegistrationUI2 simpleUI( registration ); - unsigned short numberOfLevels = 3; + uint16_t numberOfLevels = 3; itk::Array niter( numberOfLevels ); itk::Array rates( numberOfLevels ); @@ -496,7 +496,7 @@ int itkMultiResolutionImageRegistrationMethodTest_1(int, char* [] ) SimpleMultiResolutionImageRegistrationUI2 simpleUI( registration ); - unsigned short numberOfLevels = 3; + uint16_t numberOfLevels = 3; itk::Array niter( numberOfLevels ); itk::Array rates( numberOfLevels ); diff --git a/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_2.cxx b/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_2.cxx index f187cceddce..434452ff31d 100644 --- a/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_2.cxx +++ b/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_2.cxx @@ -263,7 +263,7 @@ int itkMultiResolutionImageRegistrationMethodTest_2(int, char* [] ) SimpleMultiResolutionImageRegistrationUI2 simpleUI( registration ); - unsigned short numberOfLevels = 3; + uint16_t numberOfLevels = 3; itk::Array niter( numberOfLevels ); itk::Array rates( numberOfLevels ); diff --git a/Modules/Registration/Common/test/itkMultiResolutionPyramidImageFilterTest.cxx b/Modules/Registration/Common/test/itkMultiResolutionPyramidImageFilterTest.cxx index 9cdd0d98964..46681038057 100644 --- a/Modules/Registration/Common/test/itkMultiResolutionPyramidImageFilterTest.cxx +++ b/Modules/Registration/Common/test/itkMultiResolutionPyramidImageFilterTest.cxx @@ -90,7 +90,7 @@ int itkMultiResolutionPyramidImageFilterTest(int argc, char* argv[] ) //------------------------------------------------------------ // Allocate Images - //typedef signed short PixelType; + //typedef int16_t PixelType; typedef float PixelType; typedef itk::Image InputImageType; typedef itk::Image OutputImageType; diff --git a/Modules/Registration/Common/test/itkMutualInformationMetricTest.cxx b/Modules/Registration/Common/test/itkMutualInformationMetricTest.cxx index 9a5adbe10ad..2e0854807ce 100644 --- a/Modules/Registration/Common/test/itkMutualInformationMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMutualInformationMetricTest.cxx @@ -40,8 +40,8 @@ int itkMutualInformationMetricTest(int, char* [] ) //------------------------------------------------------------ //Allocate Images - typedef itk::Image MovingImageType; - typedef itk::Image FixedImageType; + typedef itk::Image MovingImageType; + typedef itk::Image FixedImageType; enum { ImageDimension = MovingImageType::ImageDimension }; MovingImageType::SizeType size = {{100,100}}; @@ -93,7 +93,7 @@ int itkMutualInformationMetricTest(int, char* [] ) d += displacement; const double x = d[0]; const double y = d[1]; - ri.Set( (unsigned char) ( 200.0 * vcl_exp( - ( x*x + y*y )/(s*s) ) ) ); + ri.Set( (uint8_t) ( 200.0 * vcl_exp( - ( x*x + y*y )/(s*s) ) ) ); ++ri; } @@ -106,7 +106,7 @@ int itkMutualInformationMetricTest(int, char* [] ) d = p-center; const double x = d[0]; const double y = d[1]; - ti.Set( (unsigned char) ( 200.0 * vcl_exp( - ( x*x + y*y )/(s*s) ) ) ); + ti.Set( (uint8_t) ( 200.0 * vcl_exp( - ( x*x + y*y )/(s*s) ) ) ); ++ti; } diff --git a/Modules/Registration/Common/test/itkPointSetToPointSetRegistrationTest.cxx b/Modules/Registration/Common/test/itkPointSetToPointSetRegistrationTest.cxx index 7c3dc739f45..6dbda9bea89 100644 --- a/Modules/Registration/Common/test/itkPointSetToPointSetRegistrationTest.cxx +++ b/Modules/Registration/Common/test/itkPointSetToPointSetRegistrationTest.cxx @@ -194,8 +194,8 @@ int itkPointSetToPointSetRegistrationTest(int, char* [] ) } /** Test with the danielsson distance map */ - typedef itk::Image BinaryImageType; - typedef itk::Image ImageType; + typedef itk::Image BinaryImageType; + typedef itk::Image ImageType; typedef itk::PointSetToImageFilter PSToImageFilterType; PSToImageFilterType::Pointer psToImageFilter = PSToImageFilterType::New(); diff --git a/Modules/Registration/Common/test/itkRecursiveMultiResolutionPyramidImageFilterTest.cxx b/Modules/Registration/Common/test/itkRecursiveMultiResolutionPyramidImageFilterTest.cxx index dd8d7433aff..72a9dd3bfe3 100644 --- a/Modules/Registration/Common/test/itkRecursiveMultiResolutionPyramidImageFilterTest.cxx +++ b/Modules/Registration/Common/test/itkRecursiveMultiResolutionPyramidImageFilterTest.cxx @@ -69,7 +69,7 @@ int itkRecursiveMultiResolutionPyramidImageFilterTest(int argc, char* argv[] ) //------------------------------------------------------------ // Allocate Images - typedef signed short PixelType; + typedef int16_t PixelType; typedef itk::Image InputImageType; typedef itk::Image OutputImageType; enum { ImageDimension = InputImageType::ImageDimension }; diff --git a/Modules/Registration/FEM/test/itkFEMFiniteDifferenceFunctionLoadTest.cxx b/Modules/Registration/FEM/test/itkFEMFiniteDifferenceFunctionLoadTest.cxx index f1301c849cc..99e250a9ed0 100644 --- a/Modules/Registration/FEM/test/itkFEMFiniteDifferenceFunctionLoadTest.cxx +++ b/Modules/Registration/FEM/test/itkFEMFiniteDifferenceFunctionLoadTest.cxx @@ -29,7 +29,7 @@ // tyepdefs used for registration const unsigned int ImageDimension = 3; const unsigned int ImageWidth = 16; -typedef unsigned char PixelType; +typedef uint8_t PixelType; typedef itk::Image testImageType; typedef itk::Vector VectorType; typedef itk::Image FieldType; diff --git a/Modules/Registration/FEM/test/itkFEMRegistrationFilter2DTest.cxx b/Modules/Registration/FEM/test/itkFEMRegistrationFilter2DTest.cxx index ed423406b2f..30b9389ecc4 100644 --- a/Modules/Registration/FEM/test/itkFEMRegistrationFilter2DTest.cxx +++ b/Modules/Registration/FEM/test/itkFEMRegistrationFilter2DTest.cxx @@ -24,7 +24,7 @@ // tyepdefs used for registration const unsigned int ImageDimension = 2; -typedef unsigned char PixelType; +typedef uint8_t PixelType; typedef itk::Image ImageType; typedef itk::fem::Element2DC0LinearQuadrilateralMembrane ElementType; diff --git a/Modules/Registration/FEM/test/itkFEMRegistrationFilterTest.cxx b/Modules/Registration/FEM/test/itkFEMRegistrationFilterTest.cxx index 100ad926a0a..b6f78b9e8b4 100644 --- a/Modules/Registration/FEM/test/itkFEMRegistrationFilterTest.cxx +++ b/Modules/Registration/FEM/test/itkFEMRegistrationFilterTest.cxx @@ -24,7 +24,7 @@ // tyepdefs used for registration const unsigned int ImageDimension = 3; -typedef unsigned char PixelType; +typedef uint8_t PixelType; typedef itk::Image ImageType; typedef itk::fem::Element3DC0LinearHexahedronMembrane ElementType; diff --git a/Modules/Registration/FEM/test/itkFEMRegistrationFilterTest2.cxx b/Modules/Registration/FEM/test/itkFEMRegistrationFilterTest2.cxx index 39540525a4b..5a334cab1b2 100644 --- a/Modules/Registration/FEM/test/itkFEMRegistrationFilterTest2.cxx +++ b/Modules/Registration/FEM/test/itkFEMRegistrationFilterTest2.cxx @@ -24,7 +24,7 @@ // tyepdefs used for registration const unsigned int ImageDimension = 3; -typedef unsigned char PixelType; +typedef uint8_t PixelType; typedef itk::Image ImageType; typedef itk::fem::Element3DC0LinearHexahedronMembrane ElementType; diff --git a/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFilter.h b/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFilter.h index a2cabba024d..0667013c722 100644 --- a/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFilter.h +++ b/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFilter.h @@ -212,21 +212,21 @@ class GPUDemonsRegistrationFilterFactory : public itk::ObjectFactoryBase { if( IsGPUAvailable() ) { - OverrideDemonsRegistrationFilterTypeMacro(unsigned char, unsigned char, 1); + OverrideDemonsRegistrationFilterTypeMacro(uint8_t, uint8_t, 1); OverrideDemonsRegistrationFilterTypeMacro(char, char, 1); OverrideDemonsRegistrationFilterTypeMacro(float,float,1); OverrideDemonsRegistrationFilterTypeMacro(int,int,1); OverrideDemonsRegistrationFilterTypeMacro(unsigned int,unsigned int,1); OverrideDemonsRegistrationFilterTypeMacro(double,double,1); - OverrideDemonsRegistrationFilterTypeMacro(unsigned char, unsigned char, 2); + OverrideDemonsRegistrationFilterTypeMacro(uint8_t, uint8_t, 2); OverrideDemonsRegistrationFilterTypeMacro(char, char, 2); OverrideDemonsRegistrationFilterTypeMacro(float,float,2); OverrideDemonsRegistrationFilterTypeMacro(int,int,2); OverrideDemonsRegistrationFilterTypeMacro(unsigned int,unsigned int,2); OverrideDemonsRegistrationFilterTypeMacro(double,double,2); - OverrideDemonsRegistrationFilterTypeMacro(unsigned char, unsigned char, 3); + OverrideDemonsRegistrationFilterTypeMacro(uint8_t, uint8_t, 3); OverrideDemonsRegistrationFilterTypeMacro(char, char, 3); OverrideDemonsRegistrationFilterTypeMacro(float,float,3); OverrideDemonsRegistrationFilterTypeMacro(int,int,3); diff --git a/Modules/Registration/GPUPDEDeformable/test/itkGPUDemonsRegistrationFilterTest.cxx b/Modules/Registration/GPUPDEDeformable/test/itkGPUDemonsRegistrationFilterTest.cxx index a94074fa6de..dfa59bdfdc9 100644 --- a/Modules/Registration/GPUPDEDeformable/test/itkGPUDemonsRegistrationFilterTest.cxx +++ b/Modules/Registration/GPUPDEDeformable/test/itkGPUDemonsRegistrationFilterTest.cxx @@ -227,7 +227,7 @@ TDisplacementFieldPointer itkGPUDemons(int, char *argv[]) const unsigned int Dimension = VDimension; unsigned int numOfIterations = atoi( argv[2] ); - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image FixedImageType; typedef itk::Image MovingImageType; @@ -326,7 +326,7 @@ TDisplacementFieldPointer itkGPUDemons(int, char *argv[]) warper->SetDisplacementField( filter->GetOutput() ); // write the warped image into a file - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image OutputImageType; typedef itk::CastImageFilter< @@ -354,7 +354,7 @@ TDisplacementFieldPointer itkCPUDemons(int, char *argv[]) const unsigned int Dimension = VDimension; unsigned int numOfIterations = atoi( argv[2] ); - typedef unsigned short PixelType; + typedef uint16_t PixelType; typedef itk::Image FixedImageType; typedef itk::Image MovingImageType; @@ -444,7 +444,7 @@ TDisplacementFieldPointer itkCPUDemons(int, char *argv[]) warper->SetDisplacementField( filter->GetOutput() ); // write the warped image into a file - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image OutputImageType; typedef itk::CastImageFilter< MovingImageType, OutputImageType> CastFilterType; diff --git a/Modules/Registration/GPUPDEDeformable/test/itkGPUDemonsRegistrationFilterTest2.cxx b/Modules/Registration/GPUPDEDeformable/test/itkGPUDemonsRegistrationFilterTest2.cxx index 99f274eb79a..0a03dd2e17e 100644 --- a/Modules/Registration/GPUPDEDeformable/test/itkGPUDemonsRegistrationFilterTest2.cxx +++ b/Modules/Registration/GPUPDEDeformable/test/itkGPUDemonsRegistrationFilterTest2.cxx @@ -110,7 +110,7 @@ int itkGPUDemonsRegistrationFilterTest2(int argc, char* argv[] ) std::cerr << " fixedImageFile warpedOutputImageFile" << std::endl; } -// typedef unsigned char PixelType; +// typedef uint8_t PixelType; typedef float PixelType; enum {ImageDimension = 2}; typedef itk::GPUImage ImageType; diff --git a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.h b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.h index 50fa778df1f..20d100dad78 100644 --- a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.h @@ -46,7 +46,7 @@ namespace itk * VirtualImage type to define the virtual domain. The VirtualImage type * defaults to TFixedImage. * \note If TFixedImage is type VectorImage, then TVirtualImage must be set - * separately to a non-VectorImage type, e.g. Image. + * separately to a non-VectorImage type, e.g. Image. * * If the user does not set the virtual domain explicitly, * then it is created during the call to \c Initialize from diff --git a/Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageRegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageRegistrationTest.cxx index e603440b5ca..9ea257b5ec5 100644 --- a/Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageRegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageRegistrationTest.cxx @@ -91,7 +91,7 @@ int itkANTSNeighborhoodCorrelationImageToImageRegistrationTest(int argc, char *a std::cout << " iterations "<< numberOfIterations << " learningRate "< FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; diff --git a/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4RegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4RegistrationTest.cxx index e0ccab14d29..16ad4793f0f 100644 --- a/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4RegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4RegistrationTest.cxx @@ -118,7 +118,7 @@ int itkDemonsImageToImageMetricv4RegistrationTest(int argc, char *argv[]) std::cout << " useImageGradientFilter " << useImageGradientFilter << std::endl; const unsigned int Dimension = 2; - typedef double PixelType; //I assume png is unsigned short + typedef double PixelType; //I assume png is uint16_t typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; diff --git a/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricRegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricRegistrationTest.cxx index 551b98fda5d..891f23aaa6d 100644 --- a/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricRegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricRegistrationTest.cxx @@ -216,7 +216,7 @@ int itkEuclideanDistancePointSetMetricRegistrationTest( int argc, char *argv[] ) // // metric - typedef itk::PointSet PointSetType; + typedef itk::PointSet PointSetType; typedef itk::EuclideanDistancePointSetToPointSetMetricv4 PointSetMetricType; PointSetMetricType::Pointer metric = PointSetMetricType::New(); diff --git a/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest.cxx b/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest.cxx index 8d842a4870b..7e92f217b76 100644 --- a/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest.cxx @@ -24,7 +24,7 @@ template int itkEuclideanDistancePointSetMetricTestRun() { - typedef itk::PointSet PointSetType; + typedef itk::PointSet PointSetType; typedef typename PointSetType::PointType PointType; diff --git a/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest2.cxx b/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest2.cxx index 7b22ce7b334..30ddd126a87 100644 --- a/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest2.cxx +++ b/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest2.cxx @@ -30,7 +30,7 @@ template int itkEuclideanDistancePointSetMetricTest2Run() { - typedef itk::PointSet PointSetType; + typedef itk::PointSet PointSetType; typedef typename PointSetType::PointType PointType; diff --git a/Modules/Registration/Metricsv4/test/itkExpectationBasedPointSetMetricRegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkExpectationBasedPointSetMetricRegistrationTest.cxx index 99ee2e8c092..a07537be9f6 100644 --- a/Modules/Registration/Metricsv4/test/itkExpectationBasedPointSetMetricRegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkExpectationBasedPointSetMetricRegistrationTest.cxx @@ -72,7 +72,7 @@ int itkExpectationBasedPointSetMetricRegistrationTest( int argc, char *argv[] ) numberOfIterations = atoi( argv[1] ); } - typedef itk::PointSet PointSetType; + typedef itk::PointSet PointSetType; typedef PointSetType::PointType PointType; diff --git a/Modules/Registration/Metricsv4/test/itkExpectationBasedPointSetMetricTest.cxx b/Modules/Registration/Metricsv4/test/itkExpectationBasedPointSetMetricTest.cxx index 22bb99cfb70..23322ade17d 100644 --- a/Modules/Registration/Metricsv4/test/itkExpectationBasedPointSetMetricTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkExpectationBasedPointSetMetricTest.cxx @@ -24,7 +24,7 @@ template int itkExpectationBasedPointSetMetricTestRun() { - typedef itk::PointSet PointSetType; + typedef itk::PointSet PointSetType; typedef typename PointSetType::PointType PointType; diff --git a/Modules/Registration/Metricsv4/test/itkJensenHavrdaCharvatTsallisPointSetMetricTest.cxx b/Modules/Registration/Metricsv4/test/itkJensenHavrdaCharvatTsallisPointSetMetricTest.cxx index 6278bc31cd2..c9e2d5bdea3 100644 --- a/Modules/Registration/Metricsv4/test/itkJensenHavrdaCharvatTsallisPointSetMetricTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkJensenHavrdaCharvatTsallisPointSetMetricTest.cxx @@ -24,7 +24,7 @@ template int itkJensenHavrdaCharvatTsallisPointSetMetricTestRun() { - typedef itk::PointSet PointSetType; + typedef itk::PointSet PointSetType; typedef typename PointSetType::PointType PointType; diff --git a/Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageRegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageRegistrationTest.cxx index f1d220edc4b..ae836278bc3 100644 --- a/Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageRegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageRegistrationTest.cxx @@ -156,7 +156,7 @@ int itkJointHistogramMutualInformationImageToImageRegistrationTest(int argc, cha << " displacementIterations " << numberOfDisplacementIterations << std::endl; const unsigned int Dimension = 2; - typedef double PixelType; //I assume png is unsigned short + typedef double PixelType; //I assume png is uint16_t typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; diff --git a/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4RegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4RegistrationTest.cxx index 2846a86b841..eecccb84656 100644 --- a/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4RegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4RegistrationTest.cxx @@ -75,7 +75,7 @@ int itkMattesMutualInformationImageToImageMetricv4RegistrationTest(int argc, cha << " displacementIterations " << numberOfDisplacementIterations << std::endl; const unsigned int Dimension = 2; - typedef double PixelType; //I assume png is unsigned short + typedef double PixelType; //I assume png is uint16_t typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; diff --git a/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4Test.cxx index 9a29b670b05..48144484749 100644 --- a/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4Test.cxx @@ -120,7 +120,7 @@ int TestMattesMetricWithAffineTransform( d += displacement; const double x = d[0]; const double y = d[1]; - ri.Set( (unsigned char) ( 200.0 * vcl_exp( - ( x*x + y*y )/(s*s) ) ) ); + ri.Set( (uint8_t) ( 200.0 * vcl_exp( - ( x*x + y*y )/(s*s) ) ) ); ++ri; } @@ -132,7 +132,7 @@ int TestMattesMetricWithAffineTransform( d = p-center; const double x = d[0]; const double y = d[1]; - ti.Set( (unsigned char) ( 200.0 * vcl_exp( - ( x*x + y*y )/(s*s) ) ) ); + ti.Set( (uint8_t) ( 200.0 * vcl_exp( - ( x*x + y*y )/(s*s) ) ) ); ++ti; } @@ -417,7 +417,7 @@ int itkMattesMutualInformationImageToImageMetricv4Test(int, char *[] ) { int failed; - //typedef itk::Image ImageType; + //typedef itk::Image ImageType; typedef itk::Image ImageType; bool useSampling = false; diff --git a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4RegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4RegistrationTest.cxx index 894d3d99cdf..3ce068e2378 100644 --- a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4RegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4RegistrationTest.cxx @@ -67,7 +67,7 @@ int itkMeanSquaresImageToImageMetricv4RegistrationTest(int argc, char *argv[]) << " displacementIterations " << numberOfDisplacementIterations << std::endl; const unsigned int Dimension = 2; - typedef double PixelType; //I assume png is unsigned short + typedef double PixelType; //I assume png is uint16_t typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; diff --git a/Modules/Registration/Metricsv4/test/itkMultiGradientImageToImageMetricv4RegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkMultiGradientImageToImageMetricv4RegistrationTest.cxx index 5b6f68613e3..67f6887155a 100644 --- a/Modules/Registration/Metricsv4/test/itkMultiGradientImageToImageMetricv4RegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkMultiGradientImageToImageMetricv4RegistrationTest.cxx @@ -62,7 +62,7 @@ int itkMultiGradientImageToImageMetricv4RegistrationTest(int argc, char *argv[]) std::cout << " iterations "<< numberOfIterations << std::endl; const unsigned int Dimension = 2; - typedef double PixelType; //I assume png is unsigned short + typedef double PixelType; //I assume png is uint16_t typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; diff --git a/Modules/Registration/Metricsv4/test/itkMultiStartImageToImageMetricv4RegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkMultiStartImageToImageMetricv4RegistrationTest.cxx index 1819816c74d..b6f42b29795 100644 --- a/Modules/Registration/Metricsv4/test/itkMultiStartImageToImageMetricv4RegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkMultiStartImageToImageMetricv4RegistrationTest.cxx @@ -66,7 +66,7 @@ int itkMultiStartImageToImageMetricv4RegistrationTest(int argc, char *argv[]) if( argc > 5 ) if ( atoi(argv[5]) == 1 ) rotateinput=true; const unsigned int Dimension = 2; - typedef unsigned short PixelType; //I assume png is unsigned short + typedef uint16_t PixelType; //I assume png is uint16_t typedef double InternalPixelType; typedef itk::Image< PixelType, Dimension > InputImageType; diff --git a/Modules/Registration/PDEDeformable/test/itkCurvatureRegistrationFilterTest.cxx b/Modules/Registration/PDEDeformable/test/itkCurvatureRegistrationFilterTest.cxx index 21ebcd086c4..1427df4dd35 100644 --- a/Modules/Registration/PDEDeformable/test/itkCurvatureRegistrationFilterTest.cxx +++ b/Modules/Registration/PDEDeformable/test/itkCurvatureRegistrationFilterTest.cxx @@ -98,7 +98,7 @@ TImage *output ) int itkCurvatureRegistrationFilterTest(int, char* [] ) { - typedef unsigned char PixelType; + typedef uint8_t PixelType; enum {ImageDimension = 2}; typedef itk::Image ImageType; typedef itk::Vector VectorType; diff --git a/Modules/Registration/PDEDeformable/test/itkDemonsRegistrationFilterTest.cxx b/Modules/Registration/PDEDeformable/test/itkDemonsRegistrationFilterTest.cxx index 6bda65dc062..b1d44b052da 100644 --- a/Modules/Registration/PDEDeformable/test/itkDemonsRegistrationFilterTest.cxx +++ b/Modules/Registration/PDEDeformable/test/itkDemonsRegistrationFilterTest.cxx @@ -100,7 +100,7 @@ TImage *output ) int itkDemonsRegistrationFilterTest(int, char* [] ) { - typedef unsigned char PixelType; + typedef uint8_t PixelType; enum {ImageDimension = 2}; typedef itk::Image ImageType; typedef itk::Vector VectorType; diff --git a/Modules/Registration/PDEDeformable/test/itkMultiResolutionPDEDeformableRegistrationTest.cxx b/Modules/Registration/PDEDeformable/test/itkMultiResolutionPDEDeformableRegistrationTest.cxx index 2254050eddb..b39ef44b659 100644 --- a/Modules/Registration/PDEDeformable/test/itkMultiResolutionPDEDeformableRegistrationTest.cxx +++ b/Modules/Registration/PDEDeformable/test/itkMultiResolutionPDEDeformableRegistrationTest.cxx @@ -138,7 +138,7 @@ TImage *output ) int itkMultiResolutionPDEDeformableRegistrationTest(int argc, char* argv[] ) { - typedef unsigned char PixelType; + typedef uint8_t PixelType; enum {ImageDimension = 2}; typedef itk::Image ImageType; typedef itk::Vector VectorType; diff --git a/Modules/Registration/PDEDeformable/test/itkSymmetricForcesDemonsRegistrationFilterTest.cxx b/Modules/Registration/PDEDeformable/test/itkSymmetricForcesDemonsRegistrationFilterTest.cxx index d82a54ae5bf..e877f00e3bc 100644 --- a/Modules/Registration/PDEDeformable/test/itkSymmetricForcesDemonsRegistrationFilterTest.cxx +++ b/Modules/Registration/PDEDeformable/test/itkSymmetricForcesDemonsRegistrationFilterTest.cxx @@ -90,7 +90,7 @@ TImage *output ) int itkSymmetricForcesDemonsRegistrationFilterTest(int, char* [] ) { - typedef unsigned char PixelType; + typedef uint8_t PixelType; enum {ImageDimension = 2}; typedef itk::Image ImageType; typedef itk::Vector VectorType; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkQuasiNewtonOptimizerv4RegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkQuasiNewtonOptimizerv4RegistrationTest.cxx index 1559d09f2fc..8f0dfd759c6 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkQuasiNewtonOptimizerv4RegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkQuasiNewtonOptimizerv4RegistrationTest.cxx @@ -66,7 +66,7 @@ int itkQuasiNewtonOptimizerv4RegistrationTestMain(int argc, char *argv[]) std::cout << " iterations "<< numberOfIterations << " displacementIterations " << numberOfDisplacementIterations << std::endl; - typedef double PixelType; //I assume png is unsigned short + typedef double PixelType; //I assume png is uint16_t typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; @@ -296,7 +296,7 @@ int itkQuasiNewtonOptimizerv4RegistrationTestMain(int argc, char *argv[]) //write the warped image into a file //typedef double OutputPixelType; - typedef unsigned short OutputPixelType; + typedef uint16_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::CastImageFilter< MovingImageType, diff --git a/Modules/Segmentation/Classifiers/include/itkBayesianClassifierImageFilter.h b/Modules/Segmentation/Classifiers/include/itkBayesianClassifierImageFilter.h index 0688655fe3e..c0d35612fae 100644 --- a/Modules/Segmentation/Classifiers/include/itkBayesianClassifierImageFilter.h +++ b/Modules/Segmentation/Classifiers/include/itkBayesianClassifierImageFilter.h @@ -36,7 +36,7 @@ namespace itk * generate the membership images or specify your own. * * \par - * The output of the filter is a label map (an image of unsigned char's is the + * The output of the filter is a label map (an image of uint8_t's is the * default.) with pixel values indicating the classes they correspond to. Pixels * with intensity 0 belong to the 0th class, 1 belong to the 1st class etc.... * The classification is done by applying a Maximum decision rule to the posterior @@ -76,7 +76,7 @@ namespace itk * \ingroup ClassificationFilters * \ingroup ITKClassifiers */ -template< class TInputVectorImage, class TLabelsType = unsigned char, +template< class TInputVectorImage, class TLabelsType = uint8_t, class TPosteriorsPrecisionType = double, class TPriorsPrecisionType = double > class ITK_EXPORT BayesianClassifierImageFilter: public ImageToImageFilter< diff --git a/Modules/Segmentation/Classifiers/include/itkBayesianClassifierInitializationImageFilter.hxx b/Modules/Segmentation/Classifiers/include/itkBayesianClassifierInitializationImageFilter.hxx index 85a24b901ee..70ff4f892a1 100644 --- a/Modules/Segmentation/Classifiers/include/itkBayesianClassifierInitializationImageFilter.hxx +++ b/Modules/Segmentation/Classifiers/include/itkBayesianClassifierInitializationImageFilter.hxx @@ -91,9 +91,9 @@ BayesianClassifierInitializationImageFilter< TInputImage, typedef Statistics::GaussianMembershipFunction< MeasurementVectorType > GaussianMembershipFunctionType; - typedef VectorContainer< unsigned short, typename + typedef VectorContainer< uint16_t, typename GaussianMembershipFunctionType::MeanVectorType * > MeanEstimatorsContainerType; - typedef VectorContainer< unsigned short, typename + typedef VectorContainer< uint16_t, typename GaussianMembershipFunctionType::CovarianceMatrixType * > CovarianceEstimatorsContainerType; // Run k means to get the means from the input image diff --git a/Modules/Segmentation/Classifiers/include/itkScalarImageKmeansImageFilter.h b/Modules/Segmentation/Classifiers/include/itkScalarImageKmeansImageFilter.h index 989fee34fa9..149185945b9 100644 --- a/Modules/Segmentation/Classifiers/include/itkScalarImageKmeansImageFilter.h +++ b/Modules/Segmentation/Classifiers/include/itkScalarImageKmeansImageFilter.h @@ -40,7 +40,7 @@ namespace itk * classifier in order to define labels for every pixel in the image. The * filter is templated over the type of the input image. The output image is * predefined as having the same dimension of the input image and pixel type - * unsigned char, under the assumption that the classifier will generate less + * uint8_t, under the assumption that the classifier will generate less * than 256 classes. * * You may want to look also at the RelabelImageFilter that may be used as a @@ -60,7 +60,7 @@ namespace itk * \endwiki */ template< class TInputImage, - class TOutputImage = Image< unsigned char, TInputImage::ImageDimension > > + class TOutputImage = Image< uint8_t, TInputImage::ImageDimension > > class ITK_EXPORT ScalarImageKmeansImageFilter: public ImageToImageFilter< TInputImage, TOutputImage > { diff --git a/Modules/Segmentation/Classifiers/test/itkBayesianClassifierImageFilterTest.cxx b/Modules/Segmentation/Classifiers/test/itkBayesianClassifierImageFilterTest.cxx index abee3728061..d189239e286 100644 --- a/Modules/Segmentation/Classifiers/test/itkBayesianClassifierImageFilterTest.cxx +++ b/Modules/Segmentation/Classifiers/test/itkBayesianClassifierImageFilterTest.cxx @@ -38,14 +38,14 @@ int itkBayesianClassifierImageFilterTest(int argc, char* argv[] ) // setup reader const unsigned int Dimension = 2; - typedef unsigned char InputPixelType; + typedef uint8_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::ImageFileReader< InputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( argv[1] ); - typedef unsigned char LabelType; + typedef uint8_t LabelType; typedef float PriorType; typedef float PosteriorType; @@ -120,7 +120,7 @@ int itkBayesianClassifierImageFilterTest(int argc, char* argv[] ) typedef ClassifierFilterType::OutputImageType ClassifierOutputImageType; - typedef itk::Image< unsigned char, Dimension > OutputImageType; + typedef itk::Image< uint8_t, Dimension > OutputImageType; typedef itk::RescaleIntensityImageFilter< ClassifierOutputImageType, OutputImageType > RescalerType; RescalerType::Pointer rescaler = RescalerType::New(); @@ -173,7 +173,7 @@ int itkBayesianClassifierImageFilterTest(int argc, char* argv[] ) //TestInitialLabelImageType must be the same as for TestPriorType { const unsigned int TestDimension = 2; - typedef unsigned char TestLabelType; + typedef uint8_t TestLabelType; typedef float TestPosteriorType; typedef float TestPriorType; @@ -190,7 +190,7 @@ int itkBayesianClassifierImageFilterTest(int argc, char* argv[] ) { const unsigned int TestDimension = 2; - typedef unsigned char TestLabelType; + typedef uint8_t TestLabelType; typedef float TestPosteriorType; typedef float TestPriorType; @@ -207,7 +207,7 @@ int itkBayesianClassifierImageFilterTest(int argc, char* argv[] ) { const unsigned int TestDimension = 2; - typedef unsigned char TestLabelType; + typedef uint8_t TestLabelType; typedef float TestPosteriorType; typedef double TestPriorType; diff --git a/Modules/Segmentation/Classifiers/test/itkImageClassifierFilterTest.cxx b/Modules/Segmentation/Classifiers/test/itkImageClassifierFilterTest.cxx index 1d06209373e..7534be1959d 100644 --- a/Modules/Segmentation/Classifiers/test/itkImageClassifierFilterTest.cxx +++ b/Modules/Segmentation/Classifiers/test/itkImageClassifierFilterTest.cxx @@ -43,7 +43,7 @@ int itkImageClassifierFilterTest(int argc, char* argv[] ) const unsigned int ImageDimension = 2; typedef itk::Image< InputPixelType, ImageDimension > InputImageType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, ImageDimension > OutputImageType; diff --git a/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilter3DTest.cxx b/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilter3DTest.cxx index 0b6d131c64e..1e463fb556b 100644 --- a/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilter3DTest.cxx +++ b/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilter3DTest.cxx @@ -70,7 +70,7 @@ int itkScalarImageKmeansImageFilter3DTest (int argc, char *argv[]) exit(1); } - typedef signed short PixelType; + typedef int16_t PixelType; const unsigned int Dimension = 3; typedef itk::Image ImageType; @@ -281,19 +281,19 @@ int itkScalarImageKmeansImageFilter3DTest (int argc, char *argv[]) statisticsNonBrainFilter->Update(); /* Background Tissues are Lower Label values */ - unsigned char currentLabel = 0; + uint8_t currentLabel = 0; for (unsigned int i=1; i<256; i++) { - if ( statisticsNonBrainFilter->HasLabel( static_cast ( i ) ) ) + if ( statisticsNonBrainFilter->HasLabel( static_cast ( i ) ) ) { currentLabel++; - LabelImageType::RegionType labelRegion = statisticsNonBrainFilter->GetRegion( static_cast ( i ) ); + LabelImageType::RegionType labelRegion = statisticsNonBrainFilter->GetRegion( static_cast ( i ) ); itk::ImageRegionIterator it( kmeansNonBrainFilter->GetOutput(), labelRegion ); it.GoToBegin(); while( !it.IsAtEnd() ) { - if ( it.Get() == static_cast ( i ) ) + if ( it.Get() == static_cast ( i ) ) { // Set Output Image kmeansLabelImage->SetPixel(it.GetIndex(), currentLabel); @@ -312,16 +312,16 @@ int itkScalarImageKmeansImageFilter3DTest (int argc, char *argv[]) for (unsigned int i=1; i<256; i++) { - if ( statisticsBrainFilter->HasLabel( static_cast ( i ) ) ) + if ( statisticsBrainFilter->HasLabel( static_cast ( i ) ) ) { currentLabel++; - LabelImageType::RegionType labelRegion = statisticsBrainFilter->GetRegion( static_cast ( i ) ); + LabelImageType::RegionType labelRegion = statisticsBrainFilter->GetRegion( static_cast ( i ) ); itk::ImageRegionIterator it( kmeansFilter->GetOutput(), labelRegion ); it.GoToBegin(); while( !it.IsAtEnd() ) { - if ( it.Get() == static_cast ( i ) ) + if ( it.Get() == static_cast ( i ) ) { // Set Output Image kmeansLabelImage->SetPixel(it.GetIndex(), currentLabel); diff --git a/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilterTest.cxx b/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilterTest.cxx index 84031513e14..69330fd169d 100644 --- a/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilterTest.cxx +++ b/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilterTest.cxx @@ -32,7 +32,7 @@ int itkScalarImageKmeansImageFilterTest(int argc, char* argv [] ) return EXIT_FAILURE; } - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 2; typedef itk::Image ImageType; diff --git a/Modules/Segmentation/Classifiers/test/itkSupervisedImageClassifierTest.cxx b/Modules/Segmentation/Classifiers/test/itkSupervisedImageClassifierTest.cxx index 778814b0f67..1fab4ad178b 100644 --- a/Modules/Segmentation/Classifiers/test/itkSupervisedImageClassifierTest.cxx +++ b/Modules/Segmentation/Classifiers/test/itkSupervisedImageClassifierTest.cxx @@ -135,7 +135,7 @@ int itkSupervisedImageClassifierTest(int, char* [] ) //--------------------------------------------------------------- //Generate the training data //--------------------------------------------------------------- - typedef itk::Image ClassImageType; + typedef itk::Image ClassImageType; ClassImageType::Pointer classImage = ClassImageType::New(); ClassImageType::SizeType classImgSize = {{ IMGWIDTH , IMGHEIGHT, NFRAMES }}; diff --git a/Modules/Segmentation/ConnectedComponents/include/itkHardConnectedComponentImageFilter.h b/Modules/Segmentation/ConnectedComponents/include/itkHardConnectedComponentImageFilter.h index 1f74a39daec..fb2a76060d7 100644 --- a/Modules/Segmentation/ConnectedComponents/include/itkHardConnectedComponentImageFilter.h +++ b/Modules/Segmentation/ConnectedComponents/include/itkHardConnectedComponentImageFilter.h @@ -105,11 +105,11 @@ class ITK_EXPORT HardConnectedComponentImageFilter: itkConceptMacro( IntConvertibleToOutputCheck, ( Concept::Convertible< int, OutputPixelType > ) ); itkConceptMacro( UnsignedShortConvertibleToOutputCheck, - ( Concept::Convertible< unsigned short, OutputPixelType > ) ); + ( Concept::Convertible< uint16_t, OutputPixelType > ) ); itkConceptMacro( OutputEqualityComparableCheck, ( Concept::EqualityComparable< OutputPixelType > ) ); itkConceptMacro( UnsignedCharConvertibleToOutputCheck, - ( Concept::Convertible< unsigned char, OutputPixelType > ) ); + ( Concept::Convertible< uint8_t, OutputPixelType > ) ); itkConceptMacro( OutputIncrementDecrementOperatorsCheck, ( Concept::IncrementDecrementOperators< OutputPixelType > ) ); /** End concept checking */ diff --git a/Modules/Segmentation/ConnectedComponents/include/itkHardConnectedComponentImageFilter.hxx b/Modules/Segmentation/ConnectedComponents/include/itkHardConnectedComponentImageFilter.hxx index a4180158370..6d92e8db71f 100644 --- a/Modules/Segmentation/ConnectedComponents/include/itkHardConnectedComponentImageFilter.hxx +++ b/Modules/Segmentation/ConnectedComponents/include/itkHardConnectedComponentImageFilter.hxx @@ -32,9 +32,9 @@ HardConnectedComponentImageFilter< TInputImage, TOutputImage > unsigned int i; int p, q, m; - unsigned short *eq_tab = new unsigned short[NumericTraits < unsigned short > ::max()]; - unsigned char * flags = new unsigned char[NumericTraits < unsigned short > ::max()]; - unsigned short label, max_label = 0; + uint16_t *eq_tab = new uint16_t[NumericTraits < uint16_t > ::max()]; + uint8_t * flags = new uint8_t[NumericTraits < uint16_t > ::max()]; + uint16_t label, max_label = 0; IndexType index, current; SizeType size; @@ -63,7 +63,7 @@ HardConnectedComponentImageFilter< TInputImage, TOutputImage > { if ( it.Get() != 0 ) { - ot.Set( NumericTraits< unsigned short >::max() ); + ot.Set( NumericTraits< uint16_t >::max() ); } else { @@ -86,21 +86,21 @@ HardConnectedComponentImageFilter< TInputImage, TOutputImage > } else { - label = static_cast< unsigned short >( output->GetPixel(current) ); + label = static_cast< uint16_t >( output->GetPixel(current) ); } if ( label ) { - if ( ot.Get() == NumericTraits< unsigned short >::max() ) + if ( ot.Get() == NumericTraits< uint16_t >::max() ) { ot.Set(label); } else if ( ( ot.Get() != label ) - && ( eq_tab[static_cast< unsigned short >( ot.Get() )] + && ( eq_tab[static_cast< uint16_t >( ot.Get() )] != eq_tab[label] ) ) { - if ( eq_tab[static_cast< unsigned short >( ot.Get() )] > eq_tab[label] ) + if ( eq_tab[static_cast< uint16_t >( ot.Get() )] > eq_tab[label] ) { - q = eq_tab[static_cast< unsigned short >( ot.Get() )]; + q = eq_tab[static_cast< uint16_t >( ot.Get() )]; for ( p = q; p <= max_label; p++ ) { if ( eq_tab[p] == q ) @@ -116,19 +116,19 @@ HardConnectedComponentImageFilter< TInputImage, TOutputImage > { if ( eq_tab[p] == q ) { - eq_tab[p] = eq_tab[static_cast< unsigned short >( ot.Get() )]; + eq_tab[p] = eq_tab[static_cast< uint16_t >( ot.Get() )]; } } } } } } - if ( ot.Get() == NumericTraits< unsigned short >::max() ) + if ( ot.Get() == NumericTraits< uint16_t >::max() ) { ++max_label; eq_tab[max_label] = max_label; ot.Set(max_label); - if ( max_label == NumericTraits< unsigned short >::max() ) + if ( max_label == NumericTraits< uint16_t >::max() ) { return; } @@ -162,7 +162,7 @@ HardConnectedComponentImageFilter< TInputImage, TOutputImage > for ( iter = m_Seeds.begin(); iter != m_Seeds.end(); iter++ ) { current = *iter; - m = eq_tab[static_cast< unsigned short >( output->GetPixel(current) )]; + m = eq_tab[static_cast< uint16_t >( output->GetPixel(current) )]; for ( i = m; i <= max_label; i++ ) { if ( eq_tab[i] == m ) @@ -177,14 +177,14 @@ HardConnectedComponentImageFilter< TInputImage, TOutputImage > { for (; !ot.IsAtEnd(); ++ot ) { - ot.Set(eq_tab[static_cast< unsigned short >( ot.Get() )]); + ot.Set(eq_tab[static_cast< uint16_t >( ot.Get() )]); } } else { for (; !ot.IsAtEnd(); ++ot ) { - ot.Set(flags[static_cast< unsigned short >( ot.Get() )]); + ot.Set(flags[static_cast< uint16_t >( ot.Get() )]); } } delete[] eq_tab; diff --git a/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTest.cxx index 14f7f88cbea..90111642ebd 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTest.cxx @@ -34,13 +34,13 @@ int itkConnectedComponentImageFilterTest(int argc, char* argv[] ) return EXIT_FAILURE; } - typedef unsigned short InternalPixelType; + typedef uint16_t InternalPixelType; const unsigned int Dimension = 2; typedef itk::Image< InternalPixelType, Dimension > InternalImageType; - typedef itk::Image OutputImageType; + typedef itk::Image OutputImageType; - typedef itk::RGBPixel RGBPixelType; + typedef itk::RGBPixel RGBPixelType; typedef itk::Image RGBImageType; typedef itk::ImageFileReader< InternalImageType > ReaderType; @@ -103,20 +103,20 @@ int itkConnectedComponentImageFilterTest(int argc, char* argv[] ) colored->SetRegions( filter->GetOutput()->GetBufferedRegion() ); colored->Allocate(); - unsigned short numObjects = relabel->GetNumberOfObjects(); + uint16_t numObjects = relabel->GetNumberOfObjects(); std::vector colormap; RGBPixelType px; colormap.resize( numObjects+1 ); vnl_sample_reseed( 1031571 ); - for (unsigned short i=0; i < colormap.size(); ++i) + for (uint16_t i=0; i < colormap.size(); ++i) { px.SetRed( - static_cast(255*vnl_sample_uniform( 0.3333, 1.0 ) )); + static_cast(255*vnl_sample_uniform( 0.3333, 1.0 ) )); px.SetGreen( - static_cast(255*vnl_sample_uniform( 0.3333, 1.0 ) )); + static_cast(255*vnl_sample_uniform( 0.3333, 1.0 ) )); px.SetBlue( - static_cast(255*vnl_sample_uniform( 0.3333, 1.0 ) )); + static_cast(255*vnl_sample_uniform( 0.3333, 1.0 ) )); colormap[i] = px; } @@ -130,7 +130,7 @@ int itkConnectedComponentImageFilterTest(int argc, char* argv[] ) { if (it.Get() == 0) { - cit.Set(RGBPixelType(itk::NumericTraits< unsigned char >::Zero )); + cit.Set(RGBPixelType(itk::NumericTraits< uint8_t >::Zero )); } else { diff --git a/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTestRGB.cxx b/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTestRGB.cxx index 298e42b02f3..522a8b310eb 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTestRGB.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTestRGB.cxx @@ -34,13 +34,13 @@ int itkConnectedComponentImageFilterTestRGB(int argc, char* argv[] ) return EXIT_FAILURE; } - typedef unsigned short InternalPixelType; + typedef uint16_t InternalPixelType; const unsigned int Dimension = 2; typedef itk::Image< InternalPixelType, Dimension > InternalImageType; - typedef itk::Image OutputImageType; + typedef itk::Image OutputImageType; - typedef itk::RGBPixel RGBPixelType; + typedef itk::RGBPixel RGBPixelType; typedef itk::Image RGBImageType; typedef itk::ImageFileReader< InternalImageType > ReaderType; @@ -103,20 +103,20 @@ int itkConnectedComponentImageFilterTestRGB(int argc, char* argv[] ) colored->SetRegions( filter->GetOutput()->GetBufferedRegion() ); colored->Allocate(); - unsigned short numObjects = relabel->GetNumberOfObjects(); + uint16_t numObjects = relabel->GetNumberOfObjects(); std::vector colormap; RGBPixelType px; colormap.resize( numObjects+1 ); vnl_sample_reseed( 1031571 ); - for (unsigned short i=0; i < colormap.size(); ++i) + for (uint16_t i=0; i < colormap.size(); ++i) { px.SetRed( - static_cast(255*vnl_sample_uniform( 0.3333, 1.0 ) )); + static_cast(255*vnl_sample_uniform( 0.3333, 1.0 ) )); px.SetGreen( - static_cast(255*vnl_sample_uniform( 0.3333, 1.0 ) )); + static_cast(255*vnl_sample_uniform( 0.3333, 1.0 ) )); px.SetBlue( - static_cast(255*vnl_sample_uniform( 0.3333, 1.0 ) )); + static_cast(255*vnl_sample_uniform( 0.3333, 1.0 ) )); colormap[i] = px; } @@ -130,7 +130,7 @@ int itkConnectedComponentImageFilterTestRGB(int argc, char* argv[] ) { if (it.Get() == 0) { - cit.Set(RGBPixelType(itk::NumericTraits< unsigned char >::Zero )); + cit.Set(RGBPixelType(itk::NumericTraits< uint8_t >::Zero )); } else { diff --git a/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTooManyObjectsTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTooManyObjectsTest.cxx index e10a138814c..5f863b9344d 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTooManyObjectsTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTooManyObjectsTest.cxx @@ -22,7 +22,7 @@ int itkConnectedComponentImageFilterTooManyObjectsTest(int itkNotUsed(argc), char*[] itkNotUsed(argv)) { - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 2; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Modules/Segmentation/ConnectedComponents/test/itkHardConnectedComponentImageFilterTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkHardConnectedComponentImageFilterTest.cxx index d2e18f8f69e..f372862aada 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkHardConnectedComponentImageFilterTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkHardConnectedComponentImageFilterTest.cxx @@ -25,7 +25,7 @@ const int WIDTH = 20; int itkHardConnectedComponentImageFilterTest(int, char* [] ) { typedef itk::Image InputImageType; - typedef itk::Image OutputImageType; + typedef itk::Image OutputImageType; typedef InputImageType::IndexType IndexType; itk::HardConnectedComponentImageFilter::Pointer diff --git a/Modules/Segmentation/ConnectedComponents/test/itkMaskConnectedComponentImageFilterTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkMaskConnectedComponentImageFilterTest.cxx index f08b67fa8d0..2ea7d0f821f 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkMaskConnectedComponentImageFilterTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkMaskConnectedComponentImageFilterTest.cxx @@ -34,15 +34,15 @@ int itkMaskConnectedComponentImageFilterTest(int argc, char* argv[] ) return EXIT_FAILURE; } - typedef unsigned short InternalPixelType; + typedef uint16_t InternalPixelType; typedef bool MaskPixelType; const unsigned int Dimension = 2; typedef itk::Image< InternalPixelType, Dimension > InternalImageType; typedef itk::Image< MaskPixelType, Dimension > MaskImageType; - typedef itk::Image OutputImageType; + typedef itk::Image OutputImageType; - typedef itk::RGBPixel RGBPixelType; + typedef itk::RGBPixel RGBPixelType; typedef itk::Image RGBImageType; typedef itk::ImageFileReader< InternalImageType > ReaderType; @@ -154,21 +154,21 @@ int itkMaskConnectedComponentImageFilterTest(int argc, char* argv[] ) colored->SetRegions( filter->GetOutput()->GetBufferedRegion() ); colored->Allocate(); - unsigned short numObjects = relabel->GetNumberOfObjects(); + uint16_t numObjects = relabel->GetNumberOfObjects(); std::vector colormap; RGBPixelType px; colormap.resize( numObjects+1 ); itk::Statistics::MersenneTwisterRandomVariateGenerator::GetInstance()->SetSeed(1031571); itk::Statistics::MersenneTwisterRandomVariateGenerator::Pointer rvgen = itk::Statistics::MersenneTwisterRandomVariateGenerator::GetInstance(); - for (unsigned short i=0; i < colormap.size(); ++i) + for (uint16_t i=0; i < colormap.size(); ++i) { px.SetRed( - static_cast(255*rvgen->GetUniformVariate( 0.3333, 1.0 ) )); + static_cast(255*rvgen->GetUniformVariate( 0.3333, 1.0 ) )); px.SetGreen( - static_cast(255*rvgen->GetUniformVariate( 0.3333, 1.0 ) )); + static_cast(255*rvgen->GetUniformVariate( 0.3333, 1.0 ) )); px.SetBlue( - static_cast(255*rvgen->GetUniformVariate( 0.3333, 1.0 ) )); + static_cast(255*rvgen->GetUniformVariate( 0.3333, 1.0 ) )); colormap[i] = px; } @@ -182,7 +182,7 @@ int itkMaskConnectedComponentImageFilterTest(int argc, char* argv[] ) { if (it.Get() == 0) { - cit.Set(RGBPixelType(static_cast(0))); + cit.Set(RGBPixelType(static_cast(0))); } else { diff --git a/Modules/Segmentation/ConnectedComponents/test/itkRelabelComponentImageFilterTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkRelabelComponentImageFilterTest.cxx index 033ea544d9d..186246c898f 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkRelabelComponentImageFilterTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkRelabelComponentImageFilterTest.cxx @@ -36,9 +36,9 @@ int itkRelabelComponentImageFilterTest(int argc, char* argv[] ) return EXIT_FAILURE; } - typedef unsigned short InternalPixelType; + typedef uint16_t InternalPixelType; typedef unsigned long LabelPixelType; - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; const unsigned int Dimension = 2; typedef itk::Image< InternalPixelType, Dimension > InternalImageType; diff --git a/Modules/Segmentation/ConnectedComponents/test/itkScalarConnectedComponentImageFilterTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkScalarConnectedComponentImageFilterTest.cxx index 1520e2f51d1..da5ad37ad6a 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkScalarConnectedComponentImageFilterTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkScalarConnectedComponentImageFilterTest.cxx @@ -33,15 +33,15 @@ int itkScalarConnectedComponentImageFilterTest(int argc, char* argv[] ) return EXIT_FAILURE; } - typedef unsigned short InternalPixelType; + typedef uint16_t InternalPixelType; typedef bool MaskPixelType; const unsigned int Dimension = 2; typedef itk::Image< InternalPixelType, Dimension > InternalImageType; typedef itk::Image< MaskPixelType, Dimension > MaskImageType; - typedef itk::Image OutputImageType; + typedef itk::Image OutputImageType; - typedef itk::RGBPixel RGBPixelType; + typedef itk::RGBPixel RGBPixelType; typedef itk::Image RGBImageType; typedef itk::ImageFileReader< InternalImageType > ReaderType; @@ -143,21 +143,21 @@ int itkScalarConnectedComponentImageFilterTest(int argc, char* argv[] ) colored->SetRegions( filter->GetOutput()->GetBufferedRegion() ); colored->Allocate(); - unsigned short numObjects = relabel->GetNumberOfObjects(); + uint16_t numObjects = relabel->GetNumberOfObjects(); std::vector colormap; RGBPixelType px; colormap.resize( numObjects+1 ); itk::Statistics::MersenneTwisterRandomVariateGenerator::GetInstance()->SetSeed(1031571); itk::Statistics::MersenneTwisterRandomVariateGenerator::Pointer rvgen = itk::Statistics::MersenneTwisterRandomVariateGenerator::GetInstance(); - for (unsigned short i=0; i < colormap.size(); ++i) + for (uint16_t i=0; i < colormap.size(); ++i) { px.SetRed( - static_cast(255*rvgen->GetUniformVariate( 0.3333, 1.0 ) )); + static_cast(255*rvgen->GetUniformVariate( 0.3333, 1.0 ) )); px.SetGreen( - static_cast(255*rvgen->GetUniformVariate( 0.3333, 1.0 ) )); + static_cast(255*rvgen->GetUniformVariate( 0.3333, 1.0 ) )); px.SetBlue( - static_cast(255*rvgen->GetUniformVariate( 0.3333, 1.0 ) )); + static_cast(255*rvgen->GetUniformVariate( 0.3333, 1.0 ) )); colormap[i] = px; } @@ -170,7 +170,7 @@ int itkScalarConnectedComponentImageFilterTest(int argc, char* argv[] ) { if (it.Get() == 0) { - cit.Set(RGBPixelType(static_cast(0))); + cit.Set(RGBPixelType(static_cast(0))); } else { diff --git a/Modules/Segmentation/ConnectedComponents/test/itkThresholdMaximumConnectedComponentsImageFilterTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkThresholdMaximumConnectedComponentsImageFilterTest.cxx index f0376132858..304cbc56c74 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkThresholdMaximumConnectedComponentsImageFilterTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkThresholdMaximumConnectedComponentsImageFilterTest.cxx @@ -46,8 +46,8 @@ int itkThresholdMaximumConnectedComponentsImageFilterTest( int argc, } - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t InputPixelType; + typedef uint8_t OutputPixelType; const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; diff --git a/Modules/Segmentation/ConnectedComponents/test/itkVectorConnectedComponentImageFilterTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkVectorConnectedComponentImageFilterTest.cxx index 62af463a8d2..1786a3a6d19 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkVectorConnectedComponentImageFilterTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkVectorConnectedComponentImageFilterTest.cxx @@ -39,7 +39,7 @@ int itkVectorConnectedComponentImageFilterTest(int argc, char* argv[] ) const unsigned int Dimension = 2; typedef itk::Vector PixelType; typedef unsigned long OutputPixelType; - typedef unsigned char LabelPixelType; + typedef uint8_t LabelPixelType; typedef itk::Image ImageType; typedef itk::Image OutputImageType; diff --git a/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DFilter.h b/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DFilter.h index f77325ca225..3d7491d7e32 100644 --- a/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DFilter.h +++ b/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DFilter.h @@ -109,7 +109,7 @@ class ITK_EXPORT DeformableSimplexMesh3DFilter:public MeshToMeshFilter< TInputMe /** Image and Image iterator definition. */ typedef CovariantVector< PixelType, 3 > GradientType; typedef Image< GradientType, 3 > GradientImageType; - typedef Image< unsigned char, 3 > BinaryOutput; + typedef Image< uint8_t, 3 > BinaryOutput; typedef Image< float, 3 > MagnitudeOutput; typedef typename GradientImageType::Pointer GradientImagePointer; diff --git a/Modules/Segmentation/KLMRegionGrowing/test/itkRegionGrow2DTest.cxx b/Modules/Segmentation/KLMRegionGrowing/test/itkRegionGrow2DTest.cxx index 9149ee6f30e..5a9a1fba0b6 100644 --- a/Modules/Segmentation/KLMRegionGrowing/test/itkRegionGrow2DTest.cxx +++ b/Modules/Segmentation/KLMRegionGrowing/test/itkRegionGrow2DTest.cxx @@ -216,7 +216,7 @@ unsigned int test_regiongrowKLM1D() // Manually create an image - typedef itk::Image, NUMDIM1D> ImageType; + typedef itk::Image, NUMDIM1D> ImageType; typedef itk::Image, NUMDIM1D> OutputImageType; ImageType::Pointer image = ImageType::New(); @@ -246,8 +246,8 @@ unsigned int test_regiongrowKLM1D() unsigned int k = 0; while( !inIt.IsAtEnd() ) { - pixelData[0] = static_cast( k ); - pixelData[1] = static_cast( numPixels - k - 1 ); + pixelData[0] = static_cast( k ); + pixelData[1] = static_cast( numPixels - k - 1 ); if( k < numPixelsHalf ) { pixelData[2] = 47; @@ -517,8 +517,8 @@ unsigned int test_regiongrowKLM1D() inIt.GoToBegin(); while( !inIt.IsAtEnd() ) { - pixelData[0] = static_cast( k ); - pixelData[1] = static_cast( numPixels - k - 1 ); + pixelData[0] = static_cast( k ); + pixelData[1] = static_cast( numPixels - k - 1 ); if( k < numPixelsQtr ) { pixelData[2] = 127; diff --git a/Modules/Segmentation/LabelVoting/test/itkBinaryMedianImageFilterTest.cxx b/Modules/Segmentation/LabelVoting/test/itkBinaryMedianImageFilterTest.cxx index fc90c5373f9..345dddf71e5 100644 --- a/Modules/Segmentation/LabelVoting/test/itkBinaryMedianImageFilterTest.cxx +++ b/Modules/Segmentation/LabelVoting/test/itkBinaryMedianImageFilterTest.cxx @@ -27,7 +27,7 @@ int itkBinaryMedianImageFilterTest(int, char* [] ) itk::OutputWindow::SetInstance(itk::TextOutput::New()); - typedef itk::Image ImageType; + typedef itk::Image ImageType; itk::RandomImageSource::Pointer random; random = itk::RandomImageSource::New(); diff --git a/Modules/Segmentation/LabelVoting/test/itkVotingBinaryHoleFillingImageFilterTest.cxx b/Modules/Segmentation/LabelVoting/test/itkVotingBinaryHoleFillingImageFilterTest.cxx index 4d1607c2da6..47a4436922d 100644 --- a/Modules/Segmentation/LabelVoting/test/itkVotingBinaryHoleFillingImageFilterTest.cxx +++ b/Modules/Segmentation/LabelVoting/test/itkVotingBinaryHoleFillingImageFilterTest.cxx @@ -28,7 +28,7 @@ int itkVotingBinaryHoleFillingImageFilterTest(int, char* [] ) itk::OutputWindow::SetInstance(itk::TextOutput::New()); - typedef itk::Image ImageType; + typedef itk::Image ImageType; itk::RandomImageSource::Pointer random; random = itk::RandomImageSource::New(); diff --git a/Modules/Segmentation/LabelVoting/test/itkVotingBinaryIterativeHoleFillingImageFilterTest.cxx b/Modules/Segmentation/LabelVoting/test/itkVotingBinaryIterativeHoleFillingImageFilterTest.cxx index 016d181d73d..3250ae35f4f 100644 --- a/Modules/Segmentation/LabelVoting/test/itkVotingBinaryIterativeHoleFillingImageFilterTest.cxx +++ b/Modules/Segmentation/LabelVoting/test/itkVotingBinaryIterativeHoleFillingImageFilterTest.cxx @@ -28,7 +28,7 @@ int itkVotingBinaryIterativeHoleFillingImageFilterTest(int, char* [] ) itk::OutputWindow::SetInstance(itk::TextOutput::New()); - typedef itk::Image ImageType; + typedef itk::Image ImageType; itk::RandomImageSource::Pointer random; random = itk::RandomImageSource::New(); diff --git a/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.h index 1b12578e99b..4525e9660d8 100644 --- a/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.h @@ -294,7 +294,7 @@ class ITK_EXPORT ParallelSparseFieldLevelSetImageFilter: typedef std::vector< LayerPointerType > LayerListType; /** Type used for storing status information */ - typedef signed char StatusType; + typedef int8_t StatusType; /** The type of the image used to index status information. Necessary for * the internals of the algorithm. */ diff --git a/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx index 958da1ca414..f7f7a17b1aa 100644 --- a/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx @@ -1512,7 +1512,7 @@ ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage > StatusType up_to = 1, up_search = 5; StatusType down_to = 2, down_search = 6; - unsigned char j = 0, k = 1; + uint8_t j = 0, k = 1; // The 3D case: this loop is executed at least once while ( down_search < 2 * m_NumberOfLayers + 1 ) diff --git a/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.h index 6d9e52ea023..1f069c07e86 100644 --- a/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.h @@ -269,7 +269,7 @@ class ITK_EXPORT SparseFieldLevelSetImageFilter: typedef std::vector< LayerPointerType > LayerListType; /** Type used for storing status information */ - typedef signed char StatusType; + typedef int8_t StatusType; /** The type of the image used to index status information. Necessary for * the internals of the algorithm. */ diff --git a/Modules/Segmentation/LevelSets/test/itkCollidingFrontsImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkCollidingFrontsImageFilterTest.cxx index f49e00d50b2..685871b4900 100644 --- a/Modules/Segmentation/LevelSets/test/itkCollidingFrontsImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkCollidingFrontsImageFilterTest.cxx @@ -26,7 +26,7 @@ int itkCollidingFrontsImageFilterTest(int argc, char* argv[] ) { const unsigned int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef float InternalPixelType; typedef itk::Image ImageType; diff --git a/Modules/Segmentation/LevelSets/test/itkCurvesLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkCurvesLevelSetImageFilterTest.cxx index 0743b6d290c..405cc9600fe 100644 --- a/Modules/Segmentation/LevelSets/test/itkCurvesLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkCurvesLevelSetImageFilterTest.cxx @@ -35,7 +35,7 @@ int itkCurvesLevelSetImageFilterTest(int, char* [] ) { const unsigned int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef float InternalPixelType; typedef itk::Image ImageType; diff --git a/Modules/Segmentation/LevelSets/test/itkCurvesLevelSetImageFilterZeroSigmaTest.cxx b/Modules/Segmentation/LevelSets/test/itkCurvesLevelSetImageFilterZeroSigmaTest.cxx index 100a89c4d37..140dbffa911 100644 --- a/Modules/Segmentation/LevelSets/test/itkCurvesLevelSetImageFilterZeroSigmaTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkCurvesLevelSetImageFilterZeroSigmaTest.cxx @@ -33,7 +33,7 @@ int itkCurvesLevelSetImageFilterZeroSigmaTest(int, char* [] ) { const unsigned int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef float InternalPixelType; typedef itk::Image ImageType; diff --git a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourLevelSetImageFilterTest.cxx index 155ce8b2319..21eafea813a 100644 --- a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourLevelSetImageFilterTest.cxx @@ -33,7 +33,7 @@ int itkGeodesicActiveContourLevelSetImageFilterTest(int, char* [] ) { const unsigned int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef float InternalPixelType; typedef itk::Image ImageType; diff --git a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourLevelSetImageFilterZeroSigmaTest.cxx b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourLevelSetImageFilterZeroSigmaTest.cxx index e8f1d97ea4e..eaca293f368 100644 --- a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourLevelSetImageFilterZeroSigmaTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourLevelSetImageFilterZeroSigmaTest.cxx @@ -33,7 +33,7 @@ int itkGeodesicActiveContourLevelSetImageFilterZeroSigmaTest(int, char* [] ) { const unsigned int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef float InternalPixelType; typedef itk::Image ImageType; diff --git a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx index 4ceb98a03e8..d179e4e4f9e 100644 --- a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx @@ -60,7 +60,7 @@ int itkGeodesicActiveContourShapePriorLevelSetImageFilterTest( int, char *[]) { /* Typedefs of components. */ const unsigned int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef float InternalPixelType; typedef itk::Image ImageType; diff --git a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2.cxx b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2.cxx index a08ef5b473b..f452a1dcea2 100644 --- a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2.cxx +++ b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2.cxx @@ -59,7 +59,7 @@ int itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2( int, char *[]) { /* Typedefs of components. */ const unsigned int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef float InternalPixelType; typedef itk::Image ImageType; diff --git a/Modules/Segmentation/LevelSets/test/itkNarrowBandCurvesLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkNarrowBandCurvesLevelSetImageFilterTest.cxx index 845aeae0241..52e73a7f8ca 100644 --- a/Modules/Segmentation/LevelSets/test/itkNarrowBandCurvesLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkNarrowBandCurvesLevelSetImageFilterTest.cxx @@ -41,7 +41,7 @@ int itkNarrowBandCurvesLevelSetImageFilterTest(int argc, char* argv[] ) } const unsigned int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef float InternalPixelType; typedef itk::Image ImageType; diff --git a/Modules/Segmentation/LevelSets/test/itkShapeDetectionLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkShapeDetectionLevelSetImageFilterTest.cxx index dfc86106b42..dabd825e5aa 100644 --- a/Modules/Segmentation/LevelSets/test/itkShapeDetectionLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkShapeDetectionLevelSetImageFilterTest.cxx @@ -33,7 +33,7 @@ int itkShapeDetectionLevelSetImageFilterTest(int, char* [] ) { const unsigned int ImageDimension = 2; - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef float InternalPixelType; typedef itk::Image ImageType; diff --git a/Modules/Segmentation/LevelSets/test/itkShapePriorSegmentationLevelSetFunctionTest.cxx b/Modules/Segmentation/LevelSets/test/itkShapePriorSegmentationLevelSetFunctionTest.cxx index 5fe90df04ea..9d81e64e769 100644 --- a/Modules/Segmentation/LevelSets/test/itkShapePriorSegmentationLevelSetFunctionTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkShapePriorSegmentationLevelSetFunctionTest.cxx @@ -164,7 +164,7 @@ int itkShapePriorSegmentationLevelSetFunctionTest( int, char *[]) /** * Threshold output and verify results. */ - typedef itk::Image CharImageType; + typedef itk::Image CharImageType; typedef itk::BinaryThresholdImageFilter< ImageType, CharImageType > ThresholdFilterType; ThresholdFilterType::Pointer thresholder = ThresholdFilterType::New(); diff --git a/Modules/Segmentation/LevelSets/test/itkVectorThresholdSegmentationLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkVectorThresholdSegmentationLevelSetImageFilterTest.cxx index fc1e5d09bcf..b2f86cf74ac 100644 --- a/Modules/Segmentation/LevelSets/test/itkVectorThresholdSegmentationLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkVectorThresholdSegmentationLevelSetImageFilterTest.cxx @@ -35,11 +35,11 @@ int itkVectorThresholdSegmentationLevelSetImageFilterTest(int ac, char* av[] ) const unsigned int Dimension = 2; - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; typedef itk::RGBPixel RGBPixelType; - typedef unsigned char InputPixelType; + typedef uint8_t InputPixelType; typedef float OutputPixelType; - typedef unsigned char WritePixelType; + typedef uint8_t WritePixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< RGBPixelType, Dimension > RGBImageType; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToMalcolmSparseLevelSetAdaptorTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToMalcolmSparseLevelSetAdaptorTest.cxx index 70082aa5982..7834acc8617 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToMalcolmSparseLevelSetAdaptorTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToMalcolmSparseLevelSetAdaptorTest.cxx @@ -30,7 +30,7 @@ int itkBinaryImageToMalcolmSparseLevelSetAdaptorTest( int argc, char* argv[] ) const unsigned int Dimension = 2; - typedef unsigned char InputPixelType; + typedef uint8_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::ImageFileReader< InputImageType > InputReaderType; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToShiSparseLevelSetAdaptorTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToShiSparseLevelSetAdaptorTest.cxx index 3d5fc0ffa3e..6eff5f35d9f 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToShiSparseLevelSetAdaptorTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToShiSparseLevelSetAdaptorTest.cxx @@ -30,7 +30,7 @@ int itkBinaryImageToShiSparseLevelSetAdaptorTest( int argc, char* argv[] ) const unsigned int Dimension = 2; - typedef unsigned char InputPixelType; + typedef uint8_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::ImageFileReader< InputImageType > InputReaderType; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToWhitakerSparseLevelSetAdaptorTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToWhitakerSparseLevelSetAdaptorTest.cxx index ea29999502c..9d86fd363cc 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToWhitakerSparseLevelSetAdaptorTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToWhitakerSparseLevelSetAdaptorTest.cxx @@ -30,7 +30,7 @@ int itkBinaryImageToWhitakerSparseLevelSetAdaptorTest( int argc, char* argv[] ) const unsigned int Dimension = 2; - typedef unsigned char InputPixelType; + typedef uint8_t InputPixelType; typedef double OutputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkLevelSetDomainMapImageFilterTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkLevelSetDomainMapImageFilterTest.cxx index 9c7fa1f9a33..54280f147bc 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkLevelSetDomainMapImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkLevelSetDomainMapImageFilterTest.cxx @@ -26,7 +26,7 @@ int itkLevelSetDomainMapImageFilterTest( int, char* [] ) typedef std::list::const_iterator ListIteratorType; typedef itk::Image< ListPixelType, Dimension > InputImageType; - typedef itk::Image< unsigned short, Dimension > OutputImageType; + typedef itk::Image< uint16_t, Dimension > OutputImageType; typedef itk::LevelSetDomainMapImageFilter< InputImageType, OutputImageType > DomainMapImageFilterType; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkLevelSetEquationChanAndVeseExternalTermTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkLevelSetEquationChanAndVeseExternalTermTest.cxx index 31c0421acdb..b94c06307cb 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkLevelSetEquationChanAndVeseExternalTermTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkLevelSetEquationChanAndVeseExternalTermTest.cxx @@ -33,11 +33,11 @@ int itkLevelSetEquationChanAndVeseExternalTermTest( int argc, char* argv[] ) const unsigned int Dimension = 2; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::IdentifierType IdentifierType; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef float PixelType; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkLevelSetEquationChanAndVeseInternalTermTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkLevelSetEquationChanAndVeseInternalTermTest.cxx index 9a22db7b563..53ace9a3bf5 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkLevelSetEquationChanAndVeseInternalTermTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkLevelSetEquationChanAndVeseInternalTermTest.cxx @@ -33,11 +33,11 @@ int itkLevelSetEquationChanAndVeseInternalTermTest( int argc, char* argv[] ) const unsigned int Dimension = 2; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::IdentifierType IdentifierType; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef float PixelType; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkLevelSetEquationCurvatureTermTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkLevelSetEquationCurvatureTermTest.cxx index 3e360bd208c..266899569fd 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkLevelSetEquationCurvatureTermTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkLevelSetEquationCurvatureTermTest.cxx @@ -33,11 +33,11 @@ int itkLevelSetEquationCurvatureTermTest( int argc, char* argv[] ) const unsigned int Dimension = 2; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::IdentifierType IdentifierType; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef float PixelType; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkLevelSetEquationLaplacianTermTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkLevelSetEquationLaplacianTermTest.cxx index badfd869548..80286bdd1b6 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkLevelSetEquationLaplacianTermTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkLevelSetEquationLaplacianTermTest.cxx @@ -32,11 +32,11 @@ int itkLevelSetEquationLaplacianTermTest( int argc, char* argv[] ) const unsigned int Dimension = 2; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::IdentifierType IdentifierType; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef float PixelType; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkLevelSetEquationPropagationTermTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkLevelSetEquationPropagationTermTest.cxx index 8a7af2d1936..6af0062f860 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkLevelSetEquationPropagationTermTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkLevelSetEquationPropagationTermTest.cxx @@ -32,11 +32,11 @@ int itkLevelSetEquationPropagationTermTest( int argc, char* argv[] ) const unsigned int Dimension = 2; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::IdentifierType IdentifierType; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef float PixelType; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkLevelSetEquationTermContainerTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkLevelSetEquationTermContainerTest.cxx index cc63a6e5b49..0be9c90775d 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkLevelSetEquationTermContainerTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkLevelSetEquationTermContainerTest.cxx @@ -34,11 +34,11 @@ int itkLevelSetEquationTermContainerTest( int argc, char* argv[] ) const unsigned int Dimension = 2; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::IdentifierType IdentifierType; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef float PixelType; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetChanAndVeseInternalTermTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetChanAndVeseInternalTermTest.cxx index 90da5dfa120..149184ce2a9 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetChanAndVeseInternalTermTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetChanAndVeseInternalTermTest.cxx @@ -25,7 +25,7 @@ int itkMultiLevelSetChanAndVeseInternalTermTest( int , char* [] ) { const unsigned int Dimension = 2; - typedef unsigned char InputPixelType; + typedef uint8_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::ImageRegionIteratorWithIndex< InputImageType > InputIteratorType; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetEvolutionTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetEvolutionTest.cxx index d032db7d1cc..3170311722b 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetEvolutionTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetEvolutionTest.cxx @@ -28,7 +28,7 @@ int itkMultiLevelSetEvolutionTest( int , char* [] ) { const unsigned int Dimension = 2; - typedef unsigned char InputPixelType; + typedef uint8_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::ImageRegionIteratorWithIndex< InputImageType > InputIteratorType; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetDenseAdvectionImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetDenseAdvectionImage2DTest.cxx index 0e71eefe2bc..995ef0065dc 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetDenseAdvectionImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetDenseAdvectionImage2DTest.cxx @@ -37,7 +37,7 @@ int itkSingleLevelSetDenseAdvectionImage2DTest( int argc, char* argv[] ) const unsigned int Dimension = 2; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::ImageRegionIteratorWithIndex< InputImageType > InputIteratorType; typedef itk::ImageFileReader< InputImageType > ReaderType; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetDenseImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetDenseImage2DTest.cxx index 83fb27f7e41..e289f2d09f8 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetDenseImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetDenseImage2DTest.cxx @@ -37,7 +37,7 @@ int itkSingleLevelSetDenseImage2DTest( int argc, char* argv[] ) const unsigned int Dimension = 2; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::ImageRegionIteratorWithIndex< InputImageType > InputIteratorType; typedef itk::ImageFileReader< InputImageType > ReaderType; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetMalcolmImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetMalcolmImage2DTest.cxx index 8c6e845d263..5c9f58c0909 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetMalcolmImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetMalcolmImage2DTest.cxx @@ -37,7 +37,7 @@ int itkSingleLevelSetMalcolmImage2DTest( int argc, char* argv[] ) const unsigned int Dimension = 2; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::ImageRegionIteratorWithIndex< InputImageType > InputIteratorType; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetShiImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetShiImage2DTest.cxx index 36b6805d7ab..9a070cd6d3e 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetShiImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetShiImage2DTest.cxx @@ -37,7 +37,7 @@ int itkSingleLevelSetShiImage2DTest( int argc, char* argv[] ) const unsigned int Dimension = 2; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::ImageRegionIteratorWithIndex< InputImageType > InputIteratorType; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DTest.cxx index 25c58a2ad78..ccb5079de8b 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DTest.cxx @@ -37,7 +37,7 @@ int itkSingleLevelSetWhitakerImage2DTest( int argc, char* argv[] ) const unsigned int Dimension = 2; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::ImageRegionIteratorWithIndex< InputImageType > InputIteratorType; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithCurvatureTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithCurvatureTest.cxx index 0039d14dbe9..b9e89d3fbc1 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithCurvatureTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithCurvatureTest.cxx @@ -37,7 +37,7 @@ int itkSingleLevelSetWhitakerImage2DWithCurvatureTest( int argc, char* argv[] ) const unsigned int Dimension = 2; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::ImageRegionIteratorWithIndex< InputImageType > InputIteratorType; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithLaplacianTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithLaplacianTest.cxx index 53172412e99..fd324d74134 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithLaplacianTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithLaplacianTest.cxx @@ -39,7 +39,7 @@ int itkSingleLevelSetWhitakerImage2DWithLaplacianTest( int argc, char* argv[] ) const unsigned int Dimension = 2; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::ImageRegionIteratorWithIndex< InputImageType > InputIteratorType; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithPropagationTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithPropagationTest.cxx index cd469938023..80b733a151f 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithPropagationTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithPropagationTest.cxx @@ -38,7 +38,7 @@ int itkSingleLevelSetWhitakerImage2DWithPropagationTest( int argc, char* argv[] const unsigned int Dimension = 2; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::ImageRegionIteratorWithIndex< InputImageType > InputIteratorType; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetDenseImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetDenseImage2DTest.cxx index 21039b102ca..de96328a18c 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetDenseImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetDenseImage2DTest.cxx @@ -36,7 +36,7 @@ int itkTwoLevelSetDenseImage2DTest( int argc, char* argv[] ) const unsigned int Dimension = 2; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::ImageRegionIteratorWithIndex< InputImageType > InputIteratorType; typedef itk::ImageFileReader< InputImageType > ReaderType; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetMalcolmImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetMalcolmImage2DTest.cxx index 4c7f3e56050..056472236e0 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetMalcolmImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetMalcolmImage2DTest.cxx @@ -37,7 +37,7 @@ int itkTwoLevelSetMalcolmImage2DTest( int argc, char* argv[] ) const unsigned int Dimension = 2; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::ImageRegionIteratorWithIndex< InputImageType > InputIteratorType; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetShiImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetShiImage2DTest.cxx index 18fd0b2576f..79ea2fe5698 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetShiImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetShiImage2DTest.cxx @@ -37,7 +37,7 @@ int itkTwoLevelSetShiImage2DTest( int argc, char* argv[] ) const unsigned int Dimension = 2; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::ImageRegionIteratorWithIndex< InputImageType > InputIteratorType; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetWhitakerImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetWhitakerImage2DTest.cxx index ae89cf4f3d0..6394ae2edb6 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetWhitakerImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetWhitakerImage2DTest.cxx @@ -37,7 +37,7 @@ int itkTwoLevelSetWhitakerImage2DTest( int argc, char* argv[] ) const unsigned int Dimension = 2; - typedef unsigned short InputPixelType; + typedef uint16_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::ImageRegionIteratorWithIndex< InputImageType > InputIteratorType; diff --git a/Modules/Segmentation/LevelSetsv4Visualization/include/itkImageToRGBVTKImageFilter.hxx b/Modules/Segmentation/LevelSetsv4Visualization/include/itkImageToRGBVTKImageFilter.hxx index 7c7e611dc17..dcb54347fbd 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/include/itkImageToRGBVTKImageFilter.hxx +++ b/Modules/Segmentation/LevelSetsv4Visualization/include/itkImageToRGBVTKImageFilter.hxx @@ -101,7 +101,7 @@ ImageToRGBVTKImageFilter< TInputImage > #if VTK_MAJOR_VERSION <= 5 m_Output->SetNumberOfScalarComponents( 3 ); - // at first let's convert it to unsigned char + // at first let's convert it to uint8_t m_Output->SetScalarTypeToUnsignedChar(); m_Output->AllocateScalars(); #else diff --git a/Modules/Segmentation/LevelSetsv4Visualization/test/itkImageToRGBVTKImageFilterTest.cxx b/Modules/Segmentation/LevelSetsv4Visualization/test/itkImageToRGBVTKImageFilterTest.cxx index bccbe5d6700..d8685e8e0ae 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/test/itkImageToRGBVTKImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSetsv4Visualization/test/itkImageToRGBVTKImageFilterTest.cxx @@ -70,7 +70,7 @@ int itkImageToRGBVTKImageFilterTest( int argc, char* argv[] ) (void) argc; (void) argv; - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 2; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Modules/Segmentation/LevelSetsv4Visualization/test/itkVTKVisualize2DDenseImageLevelSetTest.cxx b/Modules/Segmentation/LevelSetsv4Visualization/test/itkVTKVisualize2DDenseImageLevelSetTest.cxx index ac28c594189..5f9b0b17594 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/test/itkVTKVisualize2DDenseImageLevelSetTest.cxx +++ b/Modules/Segmentation/LevelSetsv4Visualization/test/itkVTKVisualize2DDenseImageLevelSetTest.cxx @@ -63,7 +63,7 @@ void GenerateImage( typename TImage::Pointer ioImage ) int itkVTKVisualize2DDenseImageLevelSetTest( int , char* [] ) { - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 2; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Modules/Segmentation/LevelSetsv4Visualization/test/itkVTKVisualizeLevelSetsInteractivePauseTest.cxx b/Modules/Segmentation/LevelSetsv4Visualization/test/itkVTKVisualizeLevelSetsInteractivePauseTest.cxx index cab0398b71f..cc106dda582 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/test/itkVTKVisualizeLevelSetsInteractivePauseTest.cxx +++ b/Modules/Segmentation/LevelSetsv4Visualization/test/itkVTKVisualizeLevelSetsInteractivePauseTest.cxx @@ -38,7 +38,7 @@ #include "vtkInteractorStyleImage.h" const unsigned int Dimension = 2; -typedef unsigned char InputPixelType; +typedef uint8_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef float LevelSetPixelType; typedef itk::Image< LevelSetPixelType, Dimension > LevelSetImageType; diff --git a/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DCellsLevelSetLayersTest.cxx b/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DCellsLevelSetLayersTest.cxx index 6fa1033b8ed..ea0e2a265e4 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DCellsLevelSetLayersTest.cxx +++ b/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DCellsLevelSetLayersTest.cxx @@ -176,7 +176,7 @@ int vtkVisualize2DCellsLevelSetLayersTest( int argc, char* argv[] ) // Image Dimension const unsigned int Dimension = 2; - typedef unsigned char InputPixelType; + typedef uint8_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; // Read input image (to be processed). diff --git a/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DCellsLevelSetSurfaceTest.cxx b/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DCellsLevelSetSurfaceTest.cxx index 7dbe017af5e..9cf13fedd44 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DCellsLevelSetSurfaceTest.cxx +++ b/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DCellsLevelSetSurfaceTest.cxx @@ -174,7 +174,7 @@ int vtkVisualize2DCellsLevelSetSurfaceTest( int argc, char* argv[] ) // Image Dimension const unsigned int Dimension = 2; - typedef unsigned char InputPixelType; + typedef uint8_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; // Read input image (to be processed). diff --git a/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DCellsLevelSetTest.cxx b/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DCellsLevelSetTest.cxx index 88f482b8b09..4f8c6271a97 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DCellsLevelSetTest.cxx +++ b/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DCellsLevelSetTest.cxx @@ -174,7 +174,7 @@ int vtkVisualize2DCellsLevelSetTest( int argc, char* argv[] ) // Image Dimension const unsigned int Dimension = 2; - typedef unsigned char InputPixelType; + typedef uint8_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputImageType; // Read input image (to be processed). diff --git a/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DMalcolmLevelSetLayersTest.cxx b/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DMalcolmLevelSetLayersTest.cxx index b957e4a871f..885f51290ee 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DMalcolmLevelSetLayersTest.cxx +++ b/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DMalcolmLevelSetLayersTest.cxx @@ -64,7 +64,7 @@ void GenerateImage( typename TImage::Pointer ioImage ) int vtkVisualize2DMalcolmLevelSetLayersTest( int , char* [] ) { - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 2; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DMalcolmLevelSetTest.cxx b/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DMalcolmLevelSetTest.cxx index 9d7b642137b..2d1183c5dde 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DMalcolmLevelSetTest.cxx +++ b/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DMalcolmLevelSetTest.cxx @@ -64,7 +64,7 @@ void GenerateImage( typename TImage::Pointer ioImage ) int vtkVisualize2DMalcolmLevelSetTest( int , char* [] ) { - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 2; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DShiLevelSetLayersTest.cxx b/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DShiLevelSetLayersTest.cxx index 574cc336c58..04b190cbf2f 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DShiLevelSetLayersTest.cxx +++ b/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DShiLevelSetLayersTest.cxx @@ -63,7 +63,7 @@ void GenerateImage( typename TImage::Pointer ioImage ) int vtkVisualize2DShiLevelSetLayersTest( int , char* [] ) { - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 2; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DWhitakerLevelSetLayersTest.cxx b/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DWhitakerLevelSetLayersTest.cxx index ff0ee580ec4..7d1485eac7f 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DWhitakerLevelSetLayersTest.cxx +++ b/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DWhitakerLevelSetLayersTest.cxx @@ -64,7 +64,7 @@ void GenerateImage( typename TImage::Pointer ioImage ) int vtkVisualize2DWhitakerLevelSetLayersTest( int , char* [] ) { - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 2; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DWhitakerLevelSetTest.cxx b/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DWhitakerLevelSetTest.cxx index a4f4dc3ae99..ca5e997321e 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DWhitakerLevelSetTest.cxx +++ b/Modules/Segmentation/LevelSetsv4Visualization/test/vtkVisualize2DWhitakerLevelSetTest.cxx @@ -64,7 +64,7 @@ void GenerateImage( typename TImage::Pointer ioImage ) int vtkVisualize2DWhitakerLevelSetTest( int , char* [] ) { - typedef unsigned char PixelType; + typedef uint8_t PixelType; const unsigned int Dimension = 2; typedef itk::Image< PixelType, Dimension > ImageType; diff --git a/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkRGBGibbsPriorFilter.h b/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkRGBGibbsPriorFilter.h index 70402ccc7df..0b1066b8532 100644 --- a/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkRGBGibbsPriorFilter.h +++ b/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkRGBGibbsPriorFilter.h @@ -226,8 +226,8 @@ class ITK_EXPORT RGBGibbsPriorFilter:public MRFImageFilter< TInputImage, InputPixelType m_LowPoint; /** the point give lowest value of H-1 in neighbor. */ - unsigned short *m_Region; /** for region erase. */ - unsigned short *m_RegionCount; /** for region erase. */ + uint16_t *m_Region; /** for region erase. */ + uint16_t *m_RegionCount; /** for region erase. */ /** weights for different clique configuration. */ double m_CliqueWeight_1; /** weight for cliques that v/h smooth boundayr */ diff --git a/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkRGBGibbsPriorFilter.hxx b/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkRGBGibbsPriorFilter.hxx index 10cdd6ca0fd..d467f78215b 100644 --- a/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkRGBGibbsPriorFilter.hxx +++ b/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkRGBGibbsPriorFilter.hxx @@ -688,15 +688,15 @@ RGBGibbsPriorFilter< TInputImage, TClassifiedImage > { delete[] m_Region; } - m_Region = new unsigned short[size]; + m_Region = new uint16_t[size]; if ( m_RegionCount ) { delete[] m_RegionCount; } - m_RegionCount = new unsigned short[size]; + m_RegionCount = new uint16_t[size]; - unsigned short *valid_region_counter = new unsigned short[size]; + uint16_t *valid_region_counter = new uint16_t[size]; LabelledImageRegionIterator labelledImageIt( m_LabelledImage, m_LabelledImage->GetBufferedRegion() ); diff --git a/Modules/Segmentation/MarkovRandomFieldsClassifiers/test/itkGibbsTest.cxx b/Modules/Segmentation/MarkovRandomFieldsClassifiers/test/itkGibbsTest.cxx index e3aff38ac88..0417c95472c 100644 --- a/Modules/Segmentation/MarkovRandomFieldsClassifiers/test/itkGibbsTest.cxx +++ b/Modules/Segmentation/MarkovRandomFieldsClassifiers/test/itkGibbsTest.cxx @@ -38,7 +38,7 @@ int itkGibbsTest(int, char*[] ) const unsigned int NUM_CLASSES = 3; const unsigned int MAX_NUM_ITER = 1; - const unsigned short TestingImage [400]={ + const uint16_t TestingImage [400]={ 297,277,317,289,300,312,306,283,282,308,308,342,335,325,315,300,304,318,307,308, 319,276,311,282,309,273,308,277,296,313,308,333,322,317,302,330,339,340,325,315, @@ -80,7 +80,7 @@ int itkGibbsTest(int, char*[] ) 328,315,327,311,315,305,340,306,314,339,344,339,337,330,318,342,311,343,311,312 }; - typedef itk::Vector PixelType; + typedef itk::Vector PixelType; typedef itk::Image VecImageType; VecImageType::Pointer vecImage = VecImageType::New(); @@ -122,9 +122,9 @@ int itkGibbsTest(int, char*[] ) int i = 0; while ( !outIt.IsAtEnd() ) { - dblVec[0] = (unsigned short) TestingImage[i]; -// dblVec[1] = (unsigned short) TestImage[i+65536]; -// dblVec[2] = (unsigned short) TestImage[i+65536*2]; + dblVec[0] = (uint16_t) TestingImage[i]; +// dblVec[1] = (uint16_t) TestImage[i+65536]; +// dblVec[2] = (uint16_t) TestImage[i+65536*2]; outIt.Set(dblVec); ++outIt; i++; @@ -133,7 +133,7 @@ int itkGibbsTest(int, char*[] ) //--------------------------------------------------------------- //Generate the training data //--------------------------------------------------------------- - typedef itk::Image ClassImageType; + typedef itk::Image ClassImageType; ClassImageType::Pointer classImage = ClassImageType::New(); ClassImageType::SizeType classImgSize = {{ IMGWIDTH , IMGHEIGHT, NFRAMES} }; diff --git a/Modules/Segmentation/MarkovRandomFieldsClassifiers/test/itkMRFImageFilterTest.cxx b/Modules/Segmentation/MarkovRandomFieldsClassifiers/test/itkMRFImageFilterTest.cxx index ba7bf535692..772d5bf703b 100644 --- a/Modules/Segmentation/MarkovRandomFieldsClassifiers/test/itkMRFImageFilterTest.cxx +++ b/Modules/Segmentation/MarkovRandomFieldsClassifiers/test/itkMRFImageFilterTest.cxx @@ -165,7 +165,7 @@ int itkMRFImageFilterTest(int, char* [] ) //--------------------------------------------------------------- //Generate the training data //--------------------------------------------------------------- - typedef itk::Image ClassImageType; + typedef itk::Image ClassImageType; ClassImageType::Pointer classImage = ClassImageType::New(); ClassImageType::SizeType classImgSize = {{ IMGWIDTH , IMGHEIGHT, NFRAMES }}; diff --git a/Modules/Segmentation/RegionGrowing/test/itkConfidenceConnectedImageFilterTest.cxx b/Modules/Segmentation/RegionGrowing/test/itkConfidenceConnectedImageFilterTest.cxx index 46212c80e2f..2305b436e02 100644 --- a/Modules/Segmentation/RegionGrowing/test/itkConfidenceConnectedImageFilterTest.cxx +++ b/Modules/Segmentation/RegionGrowing/test/itkConfidenceConnectedImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkConfidenceConnectedImageFilterTest(int ac, char* av[] ) return -1; } - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image myImage; itk::ImageFileReader::Pointer input diff --git a/Modules/Segmentation/RegionGrowing/test/itkConnectedThresholdImageFilterTest.cxx b/Modules/Segmentation/RegionGrowing/test/itkConnectedThresholdImageFilterTest.cxx index fb38e022eaa..b614f0bf342 100644 --- a/Modules/Segmentation/RegionGrowing/test/itkConnectedThresholdImageFilterTest.cxx +++ b/Modules/Segmentation/RegionGrowing/test/itkConnectedThresholdImageFilterTest.cxx @@ -34,7 +34,7 @@ int itkConnectedThresholdImageFilterTest(int ac, char* av[] ) return -1; } - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image myImage; itk::ImageFileReader::Pointer input diff --git a/Modules/Segmentation/RegionGrowing/test/itkIsolatedConnectedImageFilterTest.cxx b/Modules/Segmentation/RegionGrowing/test/itkIsolatedConnectedImageFilterTest.cxx index f1e22a41b0b..fa43985c718 100644 --- a/Modules/Segmentation/RegionGrowing/test/itkIsolatedConnectedImageFilterTest.cxx +++ b/Modules/Segmentation/RegionGrowing/test/itkIsolatedConnectedImageFilterTest.cxx @@ -30,7 +30,7 @@ int itkIsolatedConnectedImageFilterTest(int ac, char* av[] ) return -1; } - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image myImage; itk::ImageFileReader::Pointer input = itk::ImageFileReader::New(); diff --git a/Modules/Segmentation/RegionGrowing/test/itkNeighborhoodConnectedImageFilterTest.cxx b/Modules/Segmentation/RegionGrowing/test/itkNeighborhoodConnectedImageFilterTest.cxx index be9c44ad13f..0f5e0b1a2c6 100644 --- a/Modules/Segmentation/RegionGrowing/test/itkNeighborhoodConnectedImageFilterTest.cxx +++ b/Modules/Segmentation/RegionGrowing/test/itkNeighborhoodConnectedImageFilterTest.cxx @@ -30,7 +30,7 @@ int itkNeighborhoodConnectedImageFilterTest(int ac, char* av[] ) return -1; } - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image myImage; itk::ImageFileReader::Pointer input = itk::ImageFileReader::New(); diff --git a/Modules/Segmentation/RegionGrowing/test/itkVectorConfidenceConnectedImageFilterTest.cxx b/Modules/Segmentation/RegionGrowing/test/itkVectorConfidenceConnectedImageFilterTest.cxx index 3768d8af7db..67a18a2530f 100644 --- a/Modules/Segmentation/RegionGrowing/test/itkVectorConfidenceConnectedImageFilterTest.cxx +++ b/Modules/Segmentation/RegionGrowing/test/itkVectorConfidenceConnectedImageFilterTest.cxx @@ -36,10 +36,10 @@ int itkVectorConfidenceConnectedImageFilterTest(int ac, char* av[] ) const unsigned int Dimension = 2; - typedef unsigned char PixelComponentType; + typedef uint8_t PixelComponentType; typedef itk::RGBPixel PixelType; - typedef unsigned char OutputPixelType; + typedef uint8_t OutputPixelType; typedef itk::Image ImageType; typedef itk::Image OutputImageType; diff --git a/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.h b/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.h index 3999b73e172..e05f4da418b 100644 --- a/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.h +++ b/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.h @@ -209,7 +209,7 @@ class ITK_EXPORT VoronoiDiagram2DGenerator: bool almostsame(CoordRepType p1, CoordRepType p2); - unsigned char Pointonbnd(int VertID); + uint8_t Pointonbnd(int VertID); void GenerateVDFortune(void); diff --git a/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.hxx b/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.hxx index 27ae0caf59e..c85050fb255 100644 --- a/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.hxx +++ b/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.hxx @@ -209,7 +209,7 @@ VoronoiDiagram2DGenerator< TCoordRepType >::almostsame(CoordRepType p1, CoordRep } template< typename TCoordRepType > -unsigned char +uint8_t VoronoiDiagram2DGenerator< TCoordRepType >::Pointonbnd(int VertID) { PointType currVert = m_OutputVD->GetVertex(VertID); @@ -287,8 +287,8 @@ VoronoiDiagram2DGenerator< TCoordRepType >::ConstructDiagram(void) EdgeInfo curr1; EdgeInfo curr2; - unsigned char frontbnd; - unsigned char backbnd; + uint8_t frontbnd; + uint8_t backbnd; std::vector< IdentifierType > cellPoints; for ( unsigned int i = 0; i < m_NumberOfSeeds; i++ ) { @@ -332,8 +332,8 @@ VoronoiDiagram2DGenerator< TCoordRepType >::ConstructDiagram(void) } else if ( ( frontbnd != 0 ) || ( backbnd != 0 ) ) { - unsigned char cfrontbnd = Pointonbnd(curr[0]); - unsigned char cbackbnd = Pointonbnd(curr[1]); + uint8_t cfrontbnd = Pointonbnd(curr[0]); + uint8_t cbackbnd = Pointonbnd(curr[1]); if ( ( cfrontbnd == backbnd ) && ( backbnd ) ) { diff --git a/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilter.h b/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilter.h index 6083584f886..f5415b7c5ac 100644 --- a/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilter.h +++ b/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilter.h @@ -49,7 +49,7 @@ namespace itk * \ingroup HybridSegmentation * \ingroup ITKVoronoi */ -template< class TInputImage, class TOutputImage, class TBinaryPriorImage = Image< unsigned char, 2 > > +template< class TInputImage, class TOutputImage, class TBinaryPriorImage = Image< uint8_t, 2 > > class ITK_EXPORT VoronoiSegmentationImageFilter: public VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage, TBinaryPriorImage > { diff --git a/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilterBase.h b/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilterBase.h index 36b3da736ca..d6964799b35 100644 --- a/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilterBase.h +++ b/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilterBase.h @@ -55,7 +55,7 @@ namespace itk * \ingroup HybridSegmentation * \ingroup ITKVoronoi */ -template< class TInputImage, class TOutputImage, class TBinaryPriorImage = Image< unsigned char, 2 > > +template< class TInputImage, class TOutputImage, class TBinaryPriorImage = Image< uint8_t, 2 > > class ITK_EXPORT VoronoiSegmentationImageFilterBase: public ImageToImageFilter< TInputImage, TOutputImage > { @@ -107,7 +107,7 @@ class ITK_EXPORT VoronoiSegmentationImageFilterBase: typedef std::vector< IndexType > IndexList; /** To output the drawing of Voronoi Diagram (VD) . */ - typedef Image< unsigned char, 2 > VDImage; + typedef Image< uint8_t, 2 > VDImage; typedef typename VDImage::Pointer VDImagePointer; /** Set/Get the initial number of seeds for VD. */ @@ -198,8 +198,8 @@ class ITK_EXPORT VoronoiSegmentationImageFilterBase: { return m_WorkingVD->GetSeed(SeedID); } /** Draw the Voronoi Diagram structure. */ - void DrawDiagram(VDImagePointer result, unsigned char incolor, - unsigned char outcolor, unsigned char boundcolor); + void DrawDiagram(VDImagePointer result, uint8_t incolor, + uint8_t outcolor, uint8_t boundcolor); void BeforeNextStep(void); @@ -227,7 +227,7 @@ class ITK_EXPORT VoronoiSegmentationImageFilterBase: int m_NumberOfBoundary; std::vector< int > m_NumberOfPixels; - std::vector< unsigned char > m_Label; + std::vector< uint8_t > m_Label; double m_MeanDeviation; bool m_UseBackgroundInAPrior; @@ -260,7 +260,7 @@ class ITK_EXPORT VoronoiSegmentationImageFilterBase: void drawLine(PointType p1, PointType p2); // Draw the intermedia Voronoi Diagram structure. - void drawVDline(VDImagePointer result, PointType p1, PointType p2, unsigned char color); + void drawVDline(VDImagePointer result, PointType p1, PointType p2, uint8_t color); private: VoronoiSegmentationImageFilterBase(const Self &); //purposely not implemented diff --git a/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilterBase.hxx b/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilterBase.hxx index 4d0b1b80154..f1225a11135 100644 --- a/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilterBase.hxx +++ b/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilterBase.hxx @@ -997,8 +997,8 @@ VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage, TBinaryPriorImage template< class TInputImage, class TOutputImage, class TBinaryPriorImage > void VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage, TBinaryPriorImage > -::DrawDiagram(VDImagePointer result, unsigned char incolor, - unsigned char outcolor, unsigned char boundcolor) +::DrawDiagram(VDImagePointer result, uint8_t incolor, + uint8_t outcolor, uint8_t boundcolor) { RegionType region = this->GetInput()->GetRequestedRegion(); @@ -1035,7 +1035,7 @@ template< class TInputImage, class TOutputImage, class TBinaryPriorImage > void VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage, TBinaryPriorImage > ::drawVDline(VDImagePointer result, PointType p1, PointType p2, - unsigned char color) + uint8_t color) { int x1 = (int)( p1[0] + 0.5 ); int x2 = (int)( p2[0] + 0.5 ); diff --git a/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationRGBImageFilter.hxx b/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationRGBImageFilter.hxx index 313c9f0ed09..26e030dcb36 100644 --- a/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationRGBImageFilter.hxx +++ b/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationRGBImageFilter.hxx @@ -349,7 +349,7 @@ VoronoiSegmentationRGBImageFilter< TInputImage, TOutputImage >::TakeAPrior(const } /* Sorting. */ - unsigned char tmp[6] = { 0, 1, 2, 3, 4, 5 }; + uint8_t tmp[6] = { 0, 1, 2, 3, 4, 5 }; for ( unsigned j = 0; j < 3; j++ ) { k = 0; @@ -363,7 +363,7 @@ VoronoiSegmentationRGBImageFilter< TInputImage, TOutputImage >::TakeAPrior(const m_TestMean[j] = tmp[k]; tmp[k] = tmp[5 - j]; } - unsigned char tmp1[6] = { 0, 1, 2, 3, 4, 5 }; + uint8_t tmp1[6] = { 0, 1, 2, 3, 4, 5 }; for ( unsigned int j = 0; j < 3; j++ ) { k = 0; diff --git a/Modules/Segmentation/Voronoi/test/itkVoronoiPartitioningImageFilterTest.cxx b/Modules/Segmentation/Voronoi/test/itkVoronoiPartitioningImageFilterTest.cxx index 4e8813c8b79..f3769487ec5 100644 --- a/Modules/Segmentation/Voronoi/test/itkVoronoiPartitioningImageFilterTest.cxx +++ b/Modules/Segmentation/Voronoi/test/itkVoronoiPartitioningImageFilterTest.cxx @@ -27,8 +27,8 @@ int itkVoronoiPartitioningImageFilterTest(int argc, char* argv[]) { typedef itk::Image FloatImage; - typedef itk::Image UnsignedCharImage; - typedef itk::Image UnsignedShortImage; + typedef itk::Image UnsignedCharImage; + typedef itk::Image UnsignedShortImage; typedef itk::Image BoolImage; if (argc != 4) @@ -72,7 +72,7 @@ int itkVoronoiPartitioningImageFilterTest(int argc, char* argv[]) FilterWatcher voronoiWatcher(voronoi); // Write out an image of the voronoi diagram - typedef itk::RGBPixel RGBPixelType; + typedef itk::RGBPixel RGBPixelType; typedef itk::Image RGBImageType; typedef itk::Functor::ScalarToRGBPixelFunctor ColorMapFunctorType; diff --git a/Modules/Segmentation/Voronoi/test/itkVoronoiSegmentationImageFilterTest.cxx b/Modules/Segmentation/Voronoi/test/itkVoronoiSegmentationImageFilterTest.cxx index d19b7eb11a5..5d322cb4970 100644 --- a/Modules/Segmentation/Voronoi/test/itkVoronoiSegmentationImageFilterTest.cxx +++ b/Modules/Segmentation/Voronoi/test/itkVoronoiSegmentationImageFilterTest.cxx @@ -22,8 +22,8 @@ int itkVoronoiSegmentationImageFilterTest(int, char* [] ){ const int WIDTH = 256; const int HEIGHT = 256; - typedef itk::Image UShortImage; - typedef itk::Image PriorImage; + typedef itk::Image UShortImage; + typedef itk::Image PriorImage; typedef itk::VoronoiSegmentationImageFilter VorSeg; VorSeg::Pointer testVorseg(VorSeg::New()); @@ -49,7 +49,7 @@ int itkVoronoiSegmentationImageFilterTest(int, char* [] ){ // background: random field with mean: 500, std: 50 std::cout << "Setting background random pattern image" << std::endl; while( !it.IsAtEnd()) { - it.Set((unsigned short)(vnl_sample_uniform(450,550)) ); + it.Set((uint16_t)(vnl_sample_uniform(450,550)) ); ++it; } @@ -61,7 +61,7 @@ int itkVoronoiSegmentationImageFilterTest(int, char* [] ){ index[0] = i; for (j = 30; j< 94; j++){ index[1] = j; - inputIMG->SetPixel(index, (unsigned short)(vnl_sample_uniform(500,540)) ); + inputIMG->SetPixel(index, (uint16_t)(vnl_sample_uniform(500,540)) ); } } @@ -69,12 +69,12 @@ int itkVoronoiSegmentationImageFilterTest(int, char* [] ){ index[0] = i; for (j = 150; j< 214; j++){ index[1] = j; - inputIMG->SetPixel(index, (unsigned short)(vnl_sample_uniform(500,540)) ); + inputIMG->SetPixel(index, (uint16_t)(vnl_sample_uniform(500,540)) ); } } int k; - unsigned short TestImg[65536]; + uint16_t TestImg[65536]; testVorseg->SetInput(inputIMG); testVorseg->SetMean(520); diff --git a/Modules/Segmentation/Voronoi/test/itkVoronoiSegmentationRGBImageFilterTest.cxx b/Modules/Segmentation/Voronoi/test/itkVoronoiSegmentationRGBImageFilterTest.cxx index 6427293e968..48083455884 100644 --- a/Modules/Segmentation/Voronoi/test/itkVoronoiSegmentationRGBImageFilterTest.cxx +++ b/Modules/Segmentation/Voronoi/test/itkVoronoiSegmentationRGBImageFilterTest.cxx @@ -22,9 +22,9 @@ #include // typedefs for all functions -typedef itk::RGBPixel PixelType; +typedef itk::RGBPixel PixelType; typedef itk::Image ImageType; -typedef itk::Image SegmentationType; +typedef itk::Image SegmentationType; typedef itk::ImageFileReader ReaderType; typedef itk::VoronoiSegmentationRGBImageFilter FilterType; typedef FilterType::BinaryObjectImage BinaryObjectImage; @@ -37,10 +37,10 @@ namespace VoronoiSegRGBTest // const unsigned int width = 256; const unsigned int height = 256; -const unsigned char bgMean = 64; -const unsigned char bgStd = 10; -const unsigned char fgMean = 128; -const unsigned char fgStd = 5; +const uint8_t bgMean = 64; +const uint8_t bgStd = 10; +const uint8_t fgMean = 128; +const uint8_t fgStd = 5; const unsigned int objAStartX = 30; const unsigned int objAEndX = 94; const unsigned int objAStartY = 30; @@ -72,9 +72,9 @@ ImageType::Pointer SetUpInputImage() while (!iter.IsAtEnd()) { PixelType px; - px[0] = (unsigned char)(vnl_sample_uniform(bgMean-bgStd,bgMean+bgStd)); - px[1] = (unsigned char)(vnl_sample_uniform(bgMean-bgStd,bgMean+bgStd)); - px[2] = (unsigned char)(vnl_sample_uniform(bgMean-bgStd,bgMean+bgStd)); + px[0] = (uint8_t)(vnl_sample_uniform(bgMean-bgStd,bgMean+bgStd)); + px[1] = (uint8_t)(vnl_sample_uniform(bgMean-bgStd,bgMean+bgStd)); + px[2] = (uint8_t)(vnl_sample_uniform(bgMean-bgStd,bgMean+bgStd)); iter.Set(px); ++iter; } @@ -89,9 +89,9 @@ ImageType::Pointer SetUpInputImage() idx[1] = y; PixelType px; - px[0] = (unsigned char)(vnl_sample_uniform(fgMean-fgStd,fgMean+fgStd)); - px[1] = (unsigned char)(vnl_sample_uniform(fgMean-fgStd,fgMean+fgStd)); - px[2] = (unsigned char)(vnl_sample_uniform(fgMean-fgStd,fgMean+fgStd)); + px[0] = (uint8_t)(vnl_sample_uniform(fgMean-fgStd,fgMean+fgStd)); + px[1] = (uint8_t)(vnl_sample_uniform(fgMean-fgStd,fgMean+fgStd)); + px[2] = (uint8_t)(vnl_sample_uniform(fgMean-fgStd,fgMean+fgStd)); inputImage->SetPixel(idx, px); } } @@ -104,9 +104,9 @@ ImageType::Pointer SetUpInputImage() idx[1] = y; PixelType px; - px[0] = (unsigned char)(vnl_sample_uniform(fgMean-fgStd,fgMean+fgStd)); - px[1] = (unsigned char)(vnl_sample_uniform(fgMean-fgStd,fgMean+fgStd)); - px[2] = (unsigned char)(vnl_sample_uniform(fgMean-fgStd,fgMean+fgStd)); + px[0] = (uint8_t)(vnl_sample_uniform(fgMean-fgStd,fgMean+fgStd)); + px[1] = (uint8_t)(vnl_sample_uniform(fgMean-fgStd,fgMean+fgStd)); + px[2] = (uint8_t)(vnl_sample_uniform(fgMean-fgStd,fgMean+fgStd)); inputImage->SetPixel(idx, px); } } diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedBoundaryResolver.h b/Modules/Segmentation/Watersheds/include/itkWatershedBoundaryResolver.h index f615a87be82..b2eb7d9289e 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedBoundaryResolver.h +++ b/Modules/Segmentation/Watersheds/include/itkWatershedBoundaryResolver.h @@ -96,8 +96,8 @@ class ITK_EXPORT BoundaryResolver:public ProcessObject /** Set/Get the face of the boundary object that we are going to * resolve. */ - itkSetMacro(Face, unsigned short); - itkGetConstMacro(Face, unsigned short); + itkSetMacro(Face, uint16_t); + itkGetConstMacro(Face, uint16_t); /** This method sets/gets the equivalency table used to store equivalencies * among segments that are generated from the boundary resolution @@ -133,7 +133,7 @@ class ITK_EXPORT BoundaryResolver:public ProcessObject void operator=(const Self &) {} void PrintSelf(std::ostream & os, Indent indent) const; - unsigned short m_Face; + uint16_t m_Face; void GenerateOutputRequestedRegion(DataObject *output); }; } // end namespace watershed diff --git a/Modules/Segmentation/Watersheds/test/itkIsolatedWatershedImageFilterTest.cxx b/Modules/Segmentation/Watersheds/test/itkIsolatedWatershedImageFilterTest.cxx index db3d395b00b..4e054e9ed4a 100644 --- a/Modules/Segmentation/Watersheds/test/itkIsolatedWatershedImageFilterTest.cxx +++ b/Modules/Segmentation/Watersheds/test/itkIsolatedWatershedImageFilterTest.cxx @@ -29,7 +29,7 @@ int itkIsolatedWatershedImageFilterTest(int ac, char* av[] ) return EXIT_FAILURE; } - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image myImage; itk::ImageFileReader::Pointer input = itk::ImageFileReader::New(); diff --git a/Modules/Segmentation/Watersheds/test/itkTobogganImageFilterTest.cxx b/Modules/Segmentation/Watersheds/test/itkTobogganImageFilterTest.cxx index ee645df0064..179d5a2f044 100644 --- a/Modules/Segmentation/Watersheds/test/itkTobogganImageFilterTest.cxx +++ b/Modules/Segmentation/Watersheds/test/itkTobogganImageFilterTest.cxx @@ -38,10 +38,10 @@ int itkTobogganImageFilterTest(int ac, char* av[] ) } - typedef unsigned char PixelType; - typedef itk::Image InputImageType; + typedef uint8_t PixelType; + typedef itk::Image InputImageType; typedef itk::Image FloatImageType; - typedef itk::Image OutputImageType; + typedef itk::Image OutputImageType; typedef itk::Image< itk::IdentifierType, 2> LongImageType; diff --git a/Modules/Video/BridgeOpenCV/include/itkOpenCVImageBridge.hxx b/Modules/Video/BridgeOpenCV/include/itkOpenCVImageBridge.hxx index dfb49b1c4b2..2ea2b94a60d 100644 --- a/Modules/Video/BridgeOpenCV/include/itkOpenCVImageBridge.hxx +++ b/Modules/Video/BridgeOpenCV/include/itkOpenCVImageBridge.hxx @@ -50,7 +50,7 @@ OpenCVImageBridge::IplImageToITKImage(const IplImage* in) { case (IPL_DEPTH_8U): { - ITKConvertIplImageBuffer< ImageType, unsigned char >( in, out.GetPointer(), IPL_DEPTH_8U ); + ITKConvertIplImageBuffer< ImageType, uint8_t >( in, out.GetPointer(), IPL_DEPTH_8U ); break; } case (IPL_DEPTH_8S): @@ -60,7 +60,7 @@ OpenCVImageBridge::IplImageToITKImage(const IplImage* in) } case (IPL_DEPTH_16U): { - ITKConvertIplImageBuffer< ImageType, unsigned short >( in, out.GetPointer(), IPL_DEPTH_16U ); + ITKConvertIplImageBuffer< ImageType, uint16_t >( in, out.GetPointer(), IPL_DEPTH_16U ); break; } case (IPL_DEPTH_16S): @@ -162,7 +162,7 @@ OpenCVImageBridge::ITKImageToIplImage(const TInputImageType* in, bool force3Chan // set the depth correctly based on input pixel type // unsigned int typeSize = 1; - if (typeid(ValueType) == typeid(unsigned char)) + if (typeid(ValueType) == typeid(uint8_t)) { out = cvCreateImage(cvSize(w,h), IPL_DEPTH_8U, outChannels); typeSize = IPL_DEPTH_8U/8; @@ -176,7 +176,7 @@ OpenCVImageBridge::ITKImageToIplImage(const TInputImageType* in, bool force3Chan out = cvCreateImage(cvSize(w,h), IPL_DEPTH_8S, outChannels); typeSize = IPL_DEPTH_8U/8; } - else if (typeid(ValueType) == typeid(unsigned short)) + else if (typeid(ValueType) == typeid(uint16_t)) { out = cvCreateImage(cvSize(w,h), IPL_DEPTH_16U, outChannels); typeSize = IPL_DEPTH_16U/8; diff --git a/Modules/Video/BridgeOpenCV/test/itkOpenCVImageBridgeGrayScaleTest.cxx b/Modules/Video/BridgeOpenCV/test/itkOpenCVImageBridgeGrayScaleTest.cxx index dbf7fcc5094..5e8d44e331e 100644 --- a/Modules/Video/BridgeOpenCV/test/itkOpenCVImageBridgeGrayScaleTest.cxx +++ b/Modules/Video/BridgeOpenCV/test/itkOpenCVImageBridgeGrayScaleTest.cxx @@ -34,7 +34,7 @@ IplImage* ConvertIplImageDataType(IplImage* in) int depth = 0; // Figure out the right output type - if (typeid(TPixelType) == typeid(unsigned char)) + if (typeid(TPixelType) == typeid(uint8_t)) { depth = IPL_DEPTH_8U; } @@ -42,7 +42,7 @@ IplImage* ConvertIplImageDataType(IplImage* in) { depth = IPL_DEPTH_8S; } - else if (typeid(TPixelType) == typeid(unsigned short)) + else if (typeid(TPixelType) == typeid(uint16_t)) { depth = IPL_DEPTH_16U; } @@ -169,8 +169,8 @@ int itkOpenCVImageBridgeTestTemplatedScalar(char* argv) } // Test number of channels after force3Channels (if type is supported for color images) - if (typeid(PixelType) == typeid(unsigned short) || - typeid(PixelType) == typeid(unsigned char) || + if (typeid(PixelType) == typeid(uint16_t) || + typeid(PixelType) == typeid(uint8_t) || typeid(PixelType) == typeid(float)) { cvReleaseImage(&outIpl); @@ -245,11 +245,11 @@ int itkOpenCVImageBridgeGrayScaleTest ( int argc, char *argv[] ) // // Test for scalar types // - // Note: We don't test signed char because ITK seems to have trouble reading + // Note: We don't test int8_t because ITK seems to have trouble reading // images with char pixels. // std::cout << "scalar" << std::endl; - if( itkRunScalarTest< unsigned char >( argv[1] ) == EXIT_FAILURE ) + if( itkRunScalarTest< uint8_t >( argv[1] ) == EXIT_FAILURE ) { return EXIT_FAILURE; } @@ -257,7 +257,7 @@ int itkOpenCVImageBridgeGrayScaleTest ( int argc, char *argv[] ) { return EXIT_FAILURE; } - if( itkRunScalarTest< unsigned short >( argv[1] ) == EXIT_FAILURE ) + if( itkRunScalarTest< uint16_t >( argv[1] ) == EXIT_FAILURE ) { return EXIT_FAILURE; } @@ -271,7 +271,7 @@ int itkOpenCVImageBridgeGrayScaleTest ( int argc, char *argv[] ) } std::cout << "scalar 513x512" << std::endl; - if( itkRunScalarTest< unsigned char >( argv[2] ) == EXIT_FAILURE ) + if( itkRunScalarTest< uint8_t >( argv[2] ) == EXIT_FAILURE ) { return EXIT_FAILURE; } @@ -279,7 +279,7 @@ int itkOpenCVImageBridgeGrayScaleTest ( int argc, char *argv[] ) { return EXIT_FAILURE; } - if( itkRunScalarTest< unsigned short >( argv[2] ) == EXIT_FAILURE ) + if( itkRunScalarTest< uint16_t >( argv[2] ) == EXIT_FAILURE ) { return EXIT_FAILURE; } diff --git a/Modules/Video/BridgeOpenCV/test/itkOpenCVImageBridgeRGBTest.cxx b/Modules/Video/BridgeOpenCV/test/itkOpenCVImageBridgeRGBTest.cxx index 35afaeca856..3a9d14248a8 100644 --- a/Modules/Video/BridgeOpenCV/test/itkOpenCVImageBridgeRGBTest.cxx +++ b/Modules/Video/BridgeOpenCV/test/itkOpenCVImageBridgeRGBTest.cxx @@ -92,7 +92,7 @@ IplImage* ConvertIplImageDataType(IplImage* in) int depth = 0; // Figure out the right output type - if (typeid(TPixelType) == typeid(unsigned char)) + if (typeid(TPixelType) == typeid(uint8_t)) { depth = IPL_DEPTH_8U; } @@ -100,7 +100,7 @@ IplImage* ConvertIplImageDataType(IplImage* in) { depth = IPL_DEPTH_8S; } - else if (typeid(TPixelType) == typeid(unsigned short)) + else if (typeid(TPixelType) == typeid(uint16_t)) { depth = IPL_DEPTH_16U; } @@ -282,16 +282,16 @@ int itkOpenCVImageBridgeRGBTest ( int argc, char *argv[] ) // // Test for RGB types // - // Note: OpenCV only supports unsigned char, unsigned short, and float for + // Note: OpenCV only supports uint8_t, uint16_t, and float for // color conversion // std::cout << "rgb" << std::endl; - if( itkRunRGBTest< unsigned char >( argv[1], argv[2] ) == EXIT_FAILURE ) + if( itkRunRGBTest< uint8_t >( argv[1], argv[2] ) == EXIT_FAILURE ) { return EXIT_FAILURE; } - if( itkRunRGBTest< unsigned short >( argv[1], argv[2] ) == EXIT_FAILURE ) + if( itkRunRGBTest< uint16_t >( argv[1], argv[2] ) == EXIT_FAILURE ) { return EXIT_FAILURE; } @@ -302,11 +302,11 @@ int itkOpenCVImageBridgeRGBTest ( int argc, char *argv[] ) std::cout << "rgb 513x512" << std::endl; - if( itkRunRGBTest< unsigned char >( argv[3], argv[3] ) == EXIT_FAILURE ) + if( itkRunRGBTest< uint8_t >( argv[3], argv[3] ) == EXIT_FAILURE ) { return EXIT_FAILURE; } - if( itkRunRGBTest< unsigned short >( argv[3], argv[3] ) == EXIT_FAILURE ) + if( itkRunRGBTest< uint16_t >( argv[3], argv[3] ) == EXIT_FAILURE ) { return EXIT_FAILURE; } diff --git a/Modules/Video/BridgeOpenCV/test/itkOpenCVVideoCaptureTest.cxx b/Modules/Video/BridgeOpenCV/test/itkOpenCVVideoCaptureTest.cxx index 75f96f0cf95..bdae9755ead 100644 --- a/Modules/Video/BridgeOpenCV/test/itkOpenCVVideoCaptureTest.cxx +++ b/Modules/Video/BridgeOpenCV/test/itkOpenCVVideoCaptureTest.cxx @@ -24,11 +24,11 @@ // ITK typedefs -typedef unsigned char ScalarPixelType; +typedef uint8_t ScalarPixelType; typedef itk::Image ScalarFrameType; typedef itk::VideoStream< ScalarFrameType > ScalarVideoStreamType; typedef itk::VideoFileReader< ScalarVideoStreamType > scalarReaderType; -typedef itk::RGBPixel RGBPixelType; +typedef itk::RGBPixel RGBPixelType; typedef itk::Image RGBFrameType; typedef itk::VideoStream< RGBFrameType > RGBVideoStreamType; typedef itk::VideoFileReader< RGBVideoStreamType > rgbReaderType; diff --git a/Modules/Video/BridgeVXL/include/vidl_itk_istream.hxx b/Modules/Video/BridgeVXL/include/vidl_itk_istream.hxx index 11bcfe4c39b..88c538e4134 100644 --- a/Modules/Video/BridgeVXL/include/vidl_itk_istream.hxx +++ b/Modules/Video/BridgeVXL/include/vidl_itk_istream.hxx @@ -197,9 +197,9 @@ vidl_itk_istream< TVideoStream >::format() const } } - // char / unsigned char + // char / uint8_t else if (typeid(PixelValueType) == typeid(char) || - typeid(PixelValueType) == typeid(unsigned char)) + typeid(PixelValueType) == typeid(uint8_t)) { if (channels == 1) { @@ -219,9 +219,9 @@ vidl_itk_istream< TVideoStream >::format() const } } - // short / unsigned short + // short / uint16_t else if (typeid(PixelValueType) == typeid(short) || - typeid(PixelValueType) == typeid(unsigned short)) + typeid(PixelValueType) == typeid(uint16_t)) { if (channels == 1) { diff --git a/Modules/Video/BridgeVXL/test/vidl_itk_istreamTest.cxx b/Modules/Video/BridgeVXL/test/vidl_itk_istreamTest.cxx index 2b935d437b1..de6f462c941 100644 --- a/Modules/Video/BridgeVXL/test/vidl_itk_istreamTest.cxx +++ b/Modules/Video/BridgeVXL/test/vidl_itk_istreamTest.cxx @@ -134,16 +134,16 @@ int vidl_itk_istreamTest ( int argc, char *argv[] ) // Scalar types TemplatedTestMacro(bool, VIDL_PIXEL_FORMAT_MONO_1); TemplatedTestMacro(char, VIDL_PIXEL_FORMAT_MONO_8); - TemplatedTestMacro(unsigned char, VIDL_PIXEL_FORMAT_MONO_8); + TemplatedTestMacro(uint8_t, VIDL_PIXEL_FORMAT_MONO_8); TemplatedTestMacro(short, VIDL_PIXEL_FORMAT_MONO_16); - TemplatedTestMacro(unsigned short, VIDL_PIXEL_FORMAT_MONO_16); + TemplatedTestMacro(uint16_t, VIDL_PIXEL_FORMAT_MONO_16); TemplatedTestMacro(float, VIDL_PIXEL_FORMAT_MONO_F32); // RGB(A) types TemplatedTestMacro(itk::RGBPixel, VIDL_PIXEL_FORMAT_RGB_24); - TemplatedTestMacro(itk::RGBPixel, VIDL_PIXEL_FORMAT_RGB_24); + TemplatedTestMacro(itk::RGBPixel, VIDL_PIXEL_FORMAT_RGB_24); TemplatedTestMacro(itk::RGBAPixel, VIDL_PIXEL_FORMAT_RGBA_32); - TemplatedTestMacro(itk::RGBAPixel, VIDL_PIXEL_FORMAT_RGBA_32); + TemplatedTestMacro(itk::RGBAPixel, VIDL_PIXEL_FORMAT_RGBA_32); TemplatedTestMacro(itk::RGBPixel, VIDL_PIXEL_FORMAT_RGB_F32); // diff --git a/Modules/Video/Core/test/itkVideoSourceTest.cxx b/Modules/Video/Core/test/itkVideoSourceTest.cxx index c1b56f15f48..834352941e5 100644 --- a/Modules/Video/Core/test/itkVideoSourceTest.cxx +++ b/Modules/Video/Core/test/itkVideoSourceTest.cxx @@ -21,7 +21,7 @@ // Set up typedefs for test const unsigned int Dimension = 2; -typedef unsigned char PixelType; +typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > FrameType; typedef itk::VideoStream< FrameType > VideoType; typedef itk::SizeValueType SizeValueType; diff --git a/Modules/Video/Core/test/itkVideoStreamTest.cxx b/Modules/Video/Core/test/itkVideoStreamTest.cxx index 3dce63121b2..cd1c82fd66c 100644 --- a/Modules/Video/Core/test/itkVideoStreamTest.cxx +++ b/Modules/Video/Core/test/itkVideoStreamTest.cxx @@ -20,7 +20,7 @@ // Set up typedefs static const unsigned int Dimension = 2; -typedef unsigned char PixelType; +typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > FrameType; typedef itk::VideoStream< FrameType > VideoType; typedef itk::SizeValueType SizeValueType; diff --git a/Modules/Video/Core/test/itkVideoToVideoFilterTest.cxx b/Modules/Video/Core/test/itkVideoToVideoFilterTest.cxx index ff3d99d1e3b..387ce820aee 100644 --- a/Modules/Video/Core/test/itkVideoToVideoFilterTest.cxx +++ b/Modules/Video/Core/test/itkVideoToVideoFilterTest.cxx @@ -21,7 +21,7 @@ // typedefs for test const unsigned int Dimension = 2; -typedef unsigned char InputPixelType; +typedef uint8_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputFrameType; typedef itk::VideoStream< InputFrameType > InputVideoType; typedef float OutputPixelType; diff --git a/Modules/Video/Filtering/test/itkDecimateFramesVideoFilterTest.cxx b/Modules/Video/Filtering/test/itkDecimateFramesVideoFilterTest.cxx index 635f5f9971c..c1355bc07a2 100644 --- a/Modules/Video/Filtering/test/itkDecimateFramesVideoFilterTest.cxx +++ b/Modules/Video/Filtering/test/itkDecimateFramesVideoFilterTest.cxx @@ -27,7 +27,7 @@ // typedefs const unsigned int Dimension = 2; -typedef unsigned char PixelType; +typedef uint8_t PixelType; typedef itk::Image< PixelType, Dimension > FrameType; typedef itk::VideoStream< FrameType > VideoType; typedef itk::DecimateFramesVideoFilter< VideoType > FilterType; diff --git a/Modules/Video/Filtering/test/itkFrameAverageVideoFilterTest.cxx b/Modules/Video/Filtering/test/itkFrameAverageVideoFilterTest.cxx index 2b0ee28abe5..5ab8c03eed0 100644 --- a/Modules/Video/Filtering/test/itkFrameAverageVideoFilterTest.cxx +++ b/Modules/Video/Filtering/test/itkFrameAverageVideoFilterTest.cxx @@ -25,7 +25,7 @@ // Set up typedefs for test const unsigned int Dimension = 2; -typedef unsigned char InputPixelType; +typedef uint8_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputFrameType; typedef itk::VideoStream< InputFrameType > InputVideoType; typedef double OutputPixelType; diff --git a/Modules/Video/Filtering/test/itkFrameDifferenceVideoFilterTest.cxx b/Modules/Video/Filtering/test/itkFrameDifferenceVideoFilterTest.cxx index fc9a91f5931..04e9e6aabb5 100644 --- a/Modules/Video/Filtering/test/itkFrameDifferenceVideoFilterTest.cxx +++ b/Modules/Video/Filtering/test/itkFrameDifferenceVideoFilterTest.cxx @@ -25,10 +25,10 @@ // Set up typedefs for test const unsigned int Dimension = 2; -typedef unsigned char InputPixelType; +typedef uint8_t InputPixelType; typedef itk::Image< InputPixelType, Dimension > InputFrameType; typedef itk::VideoStream< InputFrameType > InputVideoType; -typedef unsigned char OutputPixelType; +typedef uint8_t OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputFrameType; typedef itk::VideoStream< OutputFrameType > OutputVideoType; typedef itk::SizeValueType SizeValueType; diff --git a/Modules/Video/Filtering/test/itkImageFilterToVideoFilterWrapperTest.cxx b/Modules/Video/Filtering/test/itkImageFilterToVideoFilterWrapperTest.cxx index 93972648a2d..cbadf763566 100644 --- a/Modules/Video/Filtering/test/itkImageFilterToVideoFilterWrapperTest.cxx +++ b/Modules/Video/Filtering/test/itkImageFilterToVideoFilterWrapperTest.cxx @@ -49,7 +49,7 @@ int itkImageFilterToVideoFilterWrapperTest( int argc, char* argv[] ) } // Typedefs - typedef unsigned char PixelType; + typedef uint8_t PixelType; typedef itk::Image FrameType; typedef itk::VideoStream< FrameType > VideoType; typedef itk::RecursiveGaussianImageFilter< FrameType, FrameType > GaussianImageFilterType; diff --git a/Modules/Video/IO/include/itkVideoFileReader.hxx b/Modules/Video/IO/include/itkVideoFileReader.hxx index d0a9f9f5ff2..fa14e79e9c4 100644 --- a/Modules/Video/IO/include/itkVideoFileReader.hxx +++ b/Modules/Video/IO/include/itkVideoFileReader.hxx @@ -380,9 +380,9 @@ DoConvertBuffer(void* inputData, FrameOffsetType frameNumber) } if(0) {} - ITK_CONVERT_BUFFER_IF_BLOCK(ImageIOBase::UCHAR,unsigned char) + ITK_CONVERT_BUFFER_IF_BLOCK(ImageIOBase::UCHAR,uint8_t) ITK_CONVERT_BUFFER_IF_BLOCK(ImageIOBase::CHAR,char) - ITK_CONVERT_BUFFER_IF_BLOCK(ImageIOBase::USHORT,unsigned short) + ITK_CONVERT_BUFFER_IF_BLOCK(ImageIOBase::USHORT,uint16_t) ITK_CONVERT_BUFFER_IF_BLOCK(ImageIOBase::SHORT,short) ITK_CONVERT_BUFFER_IF_BLOCK(ImageIOBase::UINT,unsigned int) ITK_CONVERT_BUFFER_IF_BLOCK(ImageIOBase::INT,int) @@ -402,9 +402,9 @@ DoConvertBuffer(void* inputData, FrameOffsetType frameNumber) << std::endl << " " << m_VideoIO->GetComponentTypeAsString( m_VideoIO->GetComponentType() ) << std::endl << "to one of: " - << std::endl << " " << TYPENAME_VideoFileReader( unsigned char ) + << std::endl << " " << TYPENAME_VideoFileReader( uint8_t ) << std::endl << " " << TYPENAME_VideoFileReader( char ) - << std::endl << " " << TYPENAME_VideoFileReader( unsigned short ) + << std::endl << " " << TYPENAME_VideoFileReader( uint16_t ) << std::endl << " " << TYPENAME_VideoFileReader( short ) << std::endl << " " << TYPENAME_VideoFileReader( unsigned int ) << std::endl << " " << TYPENAME_VideoFileReader( int ) diff --git a/Modules/Video/IO/test/itkVideoFileReaderWriterTest.cxx b/Modules/Video/IO/test/itkVideoFileReaderWriterTest.cxx index ea616adc2a3..0e4cc20e718 100644 --- a/Modules/Video/IO/test/itkVideoFileReaderWriterTest.cxx +++ b/Modules/Video/IO/test/itkVideoFileReaderWriterTest.cxx @@ -31,7 +31,7 @@ int itkVideoFileReaderWriterTest( int argc, char *argv[] ) } // Instantiate a new reader - typedef itk::RGBPixel PixelType; + typedef itk::RGBPixel PixelType; const unsigned int NumberOfDimensions = 2; typedef itk::Image< PixelType, NumberOfDimensions > FrameType; typedef itk::VideoStream< FrameType > VideoType; diff --git a/Wrapping/CMakeLists.txt b/Wrapping/CMakeLists.txt index 4ae89300add..8c8f1c91d7d 100644 --- a/Wrapping/CMakeLists.txt +++ b/Wrapping/CMakeLists.txt @@ -53,12 +53,12 @@ set(WrapITK_VERSION_MINOR 4) set(WrapITK_VERSION_PATCH 0) -option(ITK_WRAP_unsigned_char "Wrap unsigned char type" ON) -option(ITK_WRAP_unsigned_short "Wrap unsigned short type" OFF) +option(ITK_WRAP_unsigned_char "Wrap uint8_t type" ON) +option(ITK_WRAP_unsigned_short "Wrap uint16_t type" OFF) option(ITK_WRAP_unsigned_long "Wrap unsigned long type" OFF) -option(ITK_WRAP_signed_char "Wrap signed char type" OFF) -option(ITK_WRAP_signed_short "Wrap signed short type" ON) +option(ITK_WRAP_signed_char "Wrap int8_t type" OFF) +option(ITK_WRAP_signed_short "Wrap int16_t type" ON) option(ITK_WRAP_signed_long "Wrap signed long type" OFF) option(ITK_WRAP_float "Wrap float type" ON) @@ -70,11 +70,11 @@ option(ITK_WRAP_vector_double "Wrap vector double type" OFF) option(ITK_WRAP_covariant_vector_float "Wrap covariant vector float type" ON) option(ITK_WRAP_covariant_vector_double "Wrap covariant vector double type" OFF) -option(ITK_WRAP_rgb_unsigned_char "Wrap RGB< unsigned char > type" ON) -option(ITK_WRAP_rgb_unsigned_short "Wrap RGB< unsigned short > type" OFF) +option(ITK_WRAP_rgb_unsigned_char "Wrap RGB< uint8_t > type" ON) +option(ITK_WRAP_rgb_unsigned_short "Wrap RGB< uint16_t > type" OFF) -option(ITK_WRAP_rgba_unsigned_char "Wrap RGBA< unsigned char > type" ON) -option(ITK_WRAP_rgba_unsigned_short "Wrap RGBA< unsigned short > type" OFF) +option(ITK_WRAP_rgba_unsigned_char "Wrap RGBA< uint8_t > type" ON) +option(ITK_WRAP_rgba_unsigned_short "Wrap RGBA< uint16_t > type" OFF) option(ITK_WRAP_complex_float "Wrap complex type" ON) option(ITK_WRAP_complex_double "Wrap complex type" OFF) diff --git a/Wrapping/ExternalProjects/ItkVtkGlue/Wrapping/Python/Tests/CMakeLists.txt b/Wrapping/ExternalProjects/ItkVtkGlue/Wrapping/Python/Tests/CMakeLists.txt index 095ab685709..e5ec886d0ca 100644 --- a/Wrapping/ExternalProjects/ItkVtkGlue/Wrapping/Python/Tests/CMakeLists.txt +++ b/Wrapping/ExternalProjects/ItkVtkGlue/Wrapping/Python/Tests/CMakeLists.txt @@ -15,7 +15,7 @@ itk_add_test(NAME SimpleItkVtkPipeline --compare SimpleItkVtkPipeline.png ${PROJECT_SOURCE_DIR}/images/cthead1.png ) -# some tests will fail if dim=2 and unsigned short are not wrapped +# some tests will fail if dim=2 and uint16_t are not wrapped INTERSECTION(WRAP_2 2 "${ITK_WRAP_DIMS}") if(ITK_WRAP_unsigned_short AND WRAP_2) endif() diff --git a/Wrapping/ExternalProjects/PyBuffer/itkPyBuffer.hxx b/Wrapping/ExternalProjects/PyBuffer/itkPyBuffer.hxx index ce954786830..290ff3dab92 100644 --- a/Wrapping/ExternalProjects/PyBuffer/itkPyBuffer.hxx +++ b/Wrapping/ExternalProjects/PyBuffer/itkPyBuffer.hxx @@ -170,15 +170,15 @@ PyBuffer { item_type = PyArray_SHORT; } - else if(typeid(ScalarType) == typeid(unsigned short)) + else if(typeid(ScalarType) == typeid(uint16_t)) { item_type = PyArray_USHORT; } - else if(typeid(ScalarType) == typeid(signed char)) + else if(typeid(ScalarType) == typeid(int8_t)) { item_type = PyArray_BYTE; } - else if(typeid(ScalarType) == typeid(unsigned char)) + else if(typeid(ScalarType) == typeid(uint8_t)) { item_type = PyArray_UBYTE; } diff --git a/Wrapping/Generators/Java/Tests/CMakeLists.txt b/Wrapping/Generators/Java/Tests/CMakeLists.txt index 3bf001f95f8..523a48427b1 100644 --- a/Wrapping/Generators/Java/Tests/CMakeLists.txt +++ b/Wrapping/Generators/Java/Tests/CMakeLists.txt @@ -118,7 +118,7 @@ endmacro() #---------------- UNIQUE(types "${WRAP_ITK_SCALAR};UC") -# signed char can't be used to store an image with values up to 255 +# int8_t can't be used to store an image with values up to 255 list(REMOVE_ITEM types SC) foreach(d ${ITK_WRAP_DIMS}) foreach(t ${types}) diff --git a/Wrapping/Generators/Python/Tests/CMakeLists.txt b/Wrapping/Generators/Python/Tests/CMakeLists.txt index 4a4b53544b4..b00000fe01d 100644 --- a/Wrapping/Generators/Python/Tests/CMakeLists.txt +++ b/Wrapping/Generators/Python/Tests/CMakeLists.txt @@ -45,7 +45,7 @@ add_python_test(PythonGetNameOfClass ${CMAKE_CURRENT_SOURCE_DIR}/getNameOfClass. add_python_test(PythonTiming ${CMAKE_CURRENT_SOURCE_DIR}/timing.py) -# some tests will fail if dim=2 and unsigned short are not wrapped +# some tests will fail if dim=2 and uint16_t are not wrapped INTERSECTION(WRAP_2 2 "${ITK_WRAP_DIMS}") if(ITK_WRAP_unsigned_char AND WRAP_2) add_python_test(PythonTypemaps ${CMAKE_CURRENT_SOURCE_DIR}/typemaps.py) @@ -433,7 +433,7 @@ endif() UNIQUE(types "${WRAP_ITK_SCALAR};UC") -# signed char can't be used to store an image with values up to 255 +# int8_t can't be used to store an image with values up to 255 list(REMOVE_ITEM types SC) foreach(d ${ITK_WRAP_DIMS}) foreach(t ${types}) diff --git a/Wrapping/Generators/Tcl/Tests/CMakeLists.txt b/Wrapping/Generators/Tcl/Tests/CMakeLists.txt index 627ff4de155..4c4b5027627 100644 --- a/Wrapping/Generators/Tcl/Tests/CMakeLists.txt +++ b/Wrapping/Generators/Tcl/Tests/CMakeLists.txt @@ -136,7 +136,7 @@ endif() UNIQUE(types "${WRAP_ITK_SCALAR};UC") -# signed char can't be used to store an image with values up to 255 +# int8_t can't be used to store an image with values up to 255 list(REMOVE_ITEM types SC) foreach(TCL_TEST_IMAGE_DIMENSION ${ITK_WRAP_DIMS}) foreach(TCL_TEST_PIXEL_TYPE ${types}) diff --git a/Wrapping/Generators/Tcl/itkTkImageViewer2D.cxx b/Wrapping/Generators/Tcl/itkTkImageViewer2D.cxx index a5160a9428c..a0118f0e04f 100644 --- a/Wrapping/Generators/Tcl/itkTkImageViewer2D.cxx +++ b/Wrapping/Generators/Tcl/itkTkImageViewer2D.cxx @@ -127,8 +127,8 @@ void TkImageViewer2D::Draw() delete [] cmd; // Copy the image data to the Tk photo. - unsigned char* buffer = - reinterpret_cast(image->GetBufferPointer()); + uint8_t* buffer = + reinterpret_cast(image->GetBufferPointer()); Tk_PhotoImageBlock block; block.pixelPtr = buffer; diff --git a/Wrapping/Generators/Tcl/itkTkImageViewer2D.h b/Wrapping/Generators/Tcl/itkTkImageViewer2D.h index 3ab2a7a11ff..9a20ebcb690 100644 --- a/Wrapping/Generators/Tcl/itkTkImageViewer2D.h +++ b/Wrapping/Generators/Tcl/itkTkImageViewer2D.h @@ -44,7 +44,7 @@ class TkImageViewer2D : public ProcessObject itkNewMacro(Self); /** The type of the input image. */ - typedef Image InputImageType; + typedef Image InputImageType; /** Set/Get the Tcl interpreter. */ void SetInterpreter(Tcl_Interp* interp); @@ -82,7 +82,7 @@ class TkImageViewer2D : public ProcessObject // The filter to scale the image to 256 shades of gray. typedef RescaleIntensityImageFilter > + itk::Image > RescaleFilter; RescaleFilter::Pointer m_RescaleFilter; From 1fefefe573bae87ee2d2f684c25b017d2a17b920 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Tue, 30 Oct 2012 19:41:36 +0000 Subject: [PATCH 4/7] ENH: Started adding itkFixedArray types. Change-Id: Ida355399dd4d5f5b9e3ed54100696a3b6c7d72d6 --- Modules/Core/Common/include/itkFixedArray.h | 66 ++++++++++++++++++ Modules/Core/Common/src/CMakeLists.txt | 2 +- .../src/itkCommonExplicitInstantiation.cxx | 67 +++++++++++++++++++ 3 files changed, 134 insertions(+), 1 deletion(-) diff --git a/Modules/Core/Common/include/itkFixedArray.h b/Modules/Core/Common/include/itkFixedArray.h index 23785c4e070..7812ed61318 100644 --- a/Modules/Core/Common/include/itkFixedArray.h +++ b/Modules/Core/Common/include/itkFixedArray.h @@ -253,6 +253,72 @@ template< typename TValueType, unsigned int VLength > std::ostream & operator<<(std::ostream & os, const FixedArray< TValueType, VLength > & arr); } // namespace itk +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray< int8_t,1u>; +extern template class itk::FixedArray< int8_t,2u>; +extern template class itk::FixedArray< int8_t,3u>; +extern template class itk::FixedArray< int8_t,4u>; +extern template class itk::FixedArray< int8_t,5u>; +extern template class itk::FixedArray< int8_t,6u>; + +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray< int16_t,1u>; +extern template class itk::FixedArray< int16_t,2u>; +extern template class itk::FixedArray< int16_t,3u>; +extern template class itk::FixedArray< int16_t,4u>; +extern template class itk::FixedArray< int16_t,5u>; +extern template class itk::FixedArray< int16_t,6u>; + +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray< int32_t,1u>; +extern template class itk::FixedArray< int32_t,2u>; +extern template class itk::FixedArray< int32_t,3u>; +extern template class itk::FixedArray< int32_t,4u>; +extern template class itk::FixedArray< int32_t,5u>; +extern template class itk::FixedArray< int32_t,6u>; + +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray< int64_t,1u>; +extern template class itk::FixedArray< int64_t,2u>; +extern template class itk::FixedArray< int64_t,3u>; +extern template class itk::FixedArray< int64_t,4u>; +extern template class itk::FixedArray< int64_t,5u>; +extern template class itk::FixedArray< int64_t,6u>; + +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray; + +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray; +extern template class itk::FixedArray; + #ifndef ITK_MANUAL_INSTANTIATION #include "itkFixedArray.hxx" #endif diff --git a/Modules/Core/Common/src/CMakeLists.txt b/Modules/Core/Common/src/CMakeLists.txt index 20c546b075a..3ecad3ee8e0 100644 --- a/Modules/Core/Common/src/CMakeLists.txt +++ b/Modules/Core/Common/src/CMakeLists.txt @@ -95,7 +95,7 @@ elseif( CMAKE_COMPILER_IS_GNUCXX ) endif() CHECK_CXX_COMPILER_FLAG( -fno-implicit-templates gcc_has_no_implicit_templates ) if ( gcc_has_no_implicit_templates ) - set_source_files_properties ( itkIndent.cxx PROPERTIES COMPILE_FLAGS "-fno-implicit-templates" ) + set_source_files_properties ( itkCommonExplicitInstantiation.cxx PROPERTIES COMPILE_FLAGS "-fno-implicit-templates" ) #set_source_files_properties ( ${ITKCommon_SRCS} PROPERTIES COMPILE_FLAGS "-fno-implicit-templates" ) endif() diff --git a/Modules/Core/Common/src/itkCommonExplicitInstantiation.cxx b/Modules/Core/Common/src/itkCommonExplicitInstantiation.cxx index abdd6a8251f..afa8c8d8638 100644 --- a/Modules/Core/Common/src/itkCommonExplicitInstantiation.cxx +++ b/Modules/Core/Common/src/itkCommonExplicitInstantiation.cxx @@ -3,6 +3,73 @@ // index types into a class that can // be compiled independant of the main // body of code +#include "itkFixedArray.h" +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray< int8_t,1u>; +template class itk::FixedArray< int8_t,2u>; +template class itk::FixedArray< int8_t,3u>; +template class itk::FixedArray< int8_t,4u>; +template class itk::FixedArray< int8_t,5u>; +template class itk::FixedArray< int8_t,6u>; + +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray< int16_t,1u>; +template class itk::FixedArray< int16_t,2u>; +template class itk::FixedArray< int16_t,3u>; +template class itk::FixedArray< int16_t,4u>; +template class itk::FixedArray< int16_t,5u>; +template class itk::FixedArray< int16_t,6u>; + +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray< int32_t,1u>; +template class itk::FixedArray< int32_t,2u>; +template class itk::FixedArray< int32_t,3u>; +template class itk::FixedArray< int32_t,4u>; +template class itk::FixedArray< int32_t,5u>; +template class itk::FixedArray< int32_t,6u>; + +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray< int64_t,1u>; +template class itk::FixedArray< int64_t,2u>; +template class itk::FixedArray< int64_t,3u>; +template class itk::FixedArray< int64_t,4u>; +template class itk::FixedArray< int64_t,5u>; +template class itk::FixedArray< int64_t,6u>; + +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray; + +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray; +template class itk::FixedArray; + #include "itkIndex.h" template class itk::Index<2u>; From 9c1ced0ab8f482d3d6010baeb1fc7f4e94e17670 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Thu, 8 Nov 2012 16:05:27 -0500 Subject: [PATCH 5/7] ENH: Add explicit instantiation Size Offset Move some code around to allow some of the itkOffset and itkSize to be explicitly instantiated. Change-Id: I93bb902a7ede03724117695c0f565c2fa29f50ab --- Modules/Core/Common/include/itkOffset.h | 139 +++--------- Modules/Core/Common/include/itkOffset.hxx | 199 ++++++++++++++++++ Modules/Core/Common/include/itkSize.h | 147 +++++-------- Modules/Core/Common/include/itkSize.hxx | 138 ++++++++++++ .../src/itkCommonExplicitInstantiation.cxx | 22 ++ 5 files changed, 450 insertions(+), 195 deletions(-) create mode 100644 Modules/Core/Common/include/itkOffset.hxx create mode 100644 Modules/Core/Common/include/itkSize.hxx diff --git a/Modules/Core/Common/include/itkOffset.h b/Modules/Core/Common/include/itkOffset.h index fe1093500cb..7a9de16b037 100644 --- a/Modules/Core/Common/include/itkOffset.h +++ b/Modules/Core/Common/include/itkOffset.h @@ -72,117 +72,52 @@ class Offset typedef Functor::OffsetLexicographicCompare< VOffsetDimension > LexicographicCompare; /** Add an offset to an offset. */ - const Self - operator+(const Self & offset) const - { - Self result; - - for ( unsigned int i = 0; i < VOffsetDimension; i++ ) - { result[i] = m_Offset[i] + offset[i]; } - return result; - } + const Self operator+(const Self & offset) const; /** Add a size to an offset. */ - const Self - operator+(const Size< VOffsetDimension > & size) const - { - Self result; - - for ( unsigned int i = 0; i < VOffsetDimension; i++ ) - { result[i] = m_Offset[i] + size[i]; } - return result; - } + const Self operator+(const Size< VOffsetDimension > & size) const; /** Increment index by a size. */ - const Self & - operator+=(const Size< VOffsetDimension > & size) - { - for ( unsigned int i = 0; i < VOffsetDimension; i++ ) - { m_Offset[i] += size[i]; } - return *this; - } + const Self & operator+=(const Size< VOffsetDimension > & size); /** Decrement index by a size. */ - const Self & - operator-=(const Size< VOffsetDimension > & size) - { - for ( unsigned int i = 0; i < VOffsetDimension; i++ ) - { m_Offset[i] -= size[i]; } - return *this; - } + const Self & operator-=(const Size< VOffsetDimension > & size); /** Subtract two offsets. */ - const Self - operator-(const Self & vec) - { - Self result; - - for ( unsigned int i = 0; i < VOffsetDimension; i++ ) - { result[i] = m_Offset[i] - vec.m_Offset[i]; } - return result; - } + const Self operator-(const Self & vec); /** Increment offset by an offset. */ - const Self & - operator+=(const Self & vec) - { - for ( unsigned int i = 0; i < VOffsetDimension; i++ ) - { m_Offset[i] += vec.m_Offset[i]; } - return *this; - } + const Self & operator+=(const Self & vec); /** Decrement offset by an offset. */ - const Self & - operator-=(const Self & vec) - { - for ( unsigned int i = 0; i < VOffsetDimension; i++ ) - { m_Offset[i] -= vec.m_Offset[i]; } - return *this; - } + const Self & operator-=(const Self & vec); /** Compare two offsets. */ - bool - operator==(const Self & vec) const - { - bool same = 1; - - for ( unsigned int i = 0; i < VOffsetDimension && same; i++ ) - { same = ( m_Offset[i] == vec.m_Offset[i] ); } - return same; - } + bool operator==(const Self & vec) const; /** Compare two offsets. */ - bool - operator!=(const Self & vec) const - { - bool same = 1; - - for ( unsigned int i = 0; i < VOffsetDimension && same; i++ ) - { same = ( m_Offset[i] == vec.m_Offset[i] ); } - return !same; - } + bool operator!=(const Self & vec) const; /** Access an element of the offset. Elements are numbered * 0, ..., VOffsetDimension-1. No bounds checking is performed. */ - OffsetValueType & operator[](unsigned int dim) + inline OffsetValueType & operator[](unsigned int dim) { return m_Offset[dim]; } /** Access an element of the index. Elements are numbered * 0, ..., VOffsetDimension-1. This version can only be an rvalue. * No bounds checking is performed. */ - OffsetValueType operator[](unsigned int dim) const + inline OffsetValueType operator[](unsigned int dim) const { return m_Offset[dim]; } /** Get the index. This provides a read only reference to the index. * \sa SetOffset() */ - const OffsetValueType * GetOffset() const { return m_Offset; } + inline const OffsetValueType * GetOffset() const { return m_Offset; } /** Set the index. * Try to prototype this function so that val has to point to a block of * memory that is the appropriate size. * \sa GetOffset() */ - void SetOffset(const OffsetValueType val[VOffsetDimension]) - { memcpy(m_Offset, val, sizeof( OffsetValueType ) * VOffsetDimension); } + void SetOffset(const OffsetValueType val[VOffsetDimension]); /** Return a basis vector of the form [0, ..., 0, 1, 0, ... 0] where the "1" * is positioned in the location specified by the parameter "dim". Valid @@ -191,8 +126,7 @@ class Offset /** Set one value for the offset in all dimensions. Useful for initializing * an offset to zero. */ - void Fill(OffsetValueType value) - { for ( unsigned int i = 0; i < VOffsetDimension; ++i ) { m_Offset[i] = value; } } + void Fill(OffsetValueType value); /** Offset is an "aggregate" class. Its data is public (m_Offset) * allowing for fast and convenient instantiations/assignments. @@ -226,35 +160,10 @@ class OffsetLexicographicCompare { public: bool operator()(Offset< VOffsetDimension > const & l, - Offset< VOffsetDimension > const & r) const - { - for ( unsigned int i = 0; i < VOffsetDimension; ++i ) - { - if ( l.m_Offset[i] < r.m_Offset[i] ) - { - return true; - } - else if ( l.m_Offset[i] > r.m_Offset[i] ) - { - return false; - } - } - return false; - } + Offset< VOffsetDimension > const & r) const; }; } -template< unsigned int VOffsetDimension > -Offset< VOffsetDimension > -Offset< VOffsetDimension > -::GetBasisOffset(unsigned int dim) -{ - Self ind; - - memset(ind.m_Offset, 0, sizeof( OffsetValueType ) * VOffsetDimension); - ind.m_Offset[dim] = 1; - return ind; -} template< unsigned int VOffsetDimension > std::ostream & operator<<(std::ostream & os, const Offset< VOffsetDimension > & ind) @@ -272,6 +181,24 @@ std::ostream & operator<<(std::ostream & os, const Offset< VOffsetDimension > & os << "]"; return os; } + } // end namespace itk +extern template class itk::Offset<1u>; +extern template class itk::Offset<2u>; +extern template class itk::Offset<3u>; +extern template class itk::Offset<4u>; +extern template class itk::Offset<5u>; +extern template class itk::Offset<6u>; +extern template class itk::Functor::OffsetLexicographicCompare<1u>; +extern template class itk::Functor::OffsetLexicographicCompare<2u>; +extern template class itk::Functor::OffsetLexicographicCompare<3u>; +extern template class itk::Functor::OffsetLexicographicCompare<4u>; +extern template class itk::Functor::OffsetLexicographicCompare<5u>; +extern template class itk::Functor::OffsetLexicographicCompare<6u>; + +#ifndef ITK_MANUAL_INSTANTIATION +#include "itkOffset.hxx" +#endif + #endif diff --git a/Modules/Core/Common/include/itkOffset.hxx b/Modules/Core/Common/include/itkOffset.hxx new file mode 100644 index 00000000000..74cf9694bd9 --- /dev/null +++ b/Modules/Core/Common/include/itkOffset.hxx @@ -0,0 +1,199 @@ +/*========================================================================= + * + * Copyright Insight Software Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0.txt + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + *=========================================================================*/ +#ifndef __itkOffset_hxx +#define __itkOffset_hxx + +#include "itkOffset.h" + +namespace itk +{ + +template +const typename Offset::Self +Offset +::operator+(const Self & offset) const +{ + Self result; + + for( unsigned int i = 0; i < VOffsetDimension; ++i ) + { + result[i] = m_Offset[i] + offset[i]; + } + return result; +} + +template +const typename Offset::Self +Offset +::operator+(const Size & size) const +{ + Self result; + + for( unsigned int i = 0; i < VOffsetDimension; ++i ) + { + result[i] = m_Offset[i] + size[i]; + } + return result; +} + +template +const typename Offset::Self & +Offset +::operator+=(const Size & size) +{ + for( unsigned int i = 0; i < VOffsetDimension; ++i ) + { + m_Offset[i] += size[i]; + } + return *this; +} + +template +const typename Offset::Self & +Offset +::operator-=(const Size & size) +{ + for( unsigned int i = 0; i < VOffsetDimension; ++i ) + { + m_Offset[i] -= size[i]; + } + return *this; +} + +template +const typename Offset::Self +Offset +::operator-(const Self & vec) +{ + Self result; + + for( unsigned int i = 0; i < VOffsetDimension; ++i ) + { + result[i] = m_Offset[i] - vec.m_Offset[i]; + } + return result; +} + +template +const typename Offset::Self & +Offset +::operator+=(const Self & vec) +{ + for( unsigned int i = 0; i < VOffsetDimension; ++i ) + { + m_Offset[i] += vec.m_Offset[i]; + } + return *this; +} + +template +const typename Offset::Self & +Offset +::operator-=(const Self & vec) +{ + for( unsigned int i = 0; i < VOffsetDimension; ++i ) + { + m_Offset[i] -= vec.m_Offset[i]; + } + return *this; +} + +template +bool +Offset +::operator==(const Self & vec) const +{ + bool same = 1; + + for( unsigned int i = 0; i < VOffsetDimension && same; ++i ) + { + same = ( m_Offset[i] == vec.m_Offset[i] ); + } + return same; +} + +template +bool +Offset +::operator!=(const Self & vec) const +{ + // return !this->operator==(vec); + bool same = 1; + + for( unsigned int i = 0; i < VOffsetDimension && same; ++i ) + { + same = ( m_Offset[i] == vec.m_Offset[i] ); + } + return !same; +} + +template +void +Offset +::SetOffset(const OffsetValueType val[VOffsetDimension]) +{ + memcpy(m_Offset, val, sizeof( OffsetValueType ) * VOffsetDimension); +} + +template +void +Offset +::Fill(OffsetValueType value) +{ + for( unsigned int i = 0; i < VOffsetDimension; ++i ) + { + m_Offset[i] = value; + } +} + +template +Offset +Offset +::GetBasisOffset(unsigned int dim) +{ + Self ind; + memset(ind.m_Offset, 0, sizeof( OffsetValueType ) * VOffsetDimension); + ind.m_Offset[dim] = 1; + return ind; +} + +namespace Functor +{ +template +bool +OffsetLexicographicCompare +::operator()(Offset const & l, Offset const & r) const +{ + for( unsigned int i = 0; i < VOffsetDimension; ++i ) + { + if( l.m_Offset[i] < r.m_Offset[i] ) + { + return true; + } + else if( l.m_Offset[i] > r.m_Offset[i] ) + { + return false; + } + } + return false; +} + +} // End namepace Functor + +} // End namespace itk +#endif // __itkOffset_hxx diff --git a/Modules/Core/Common/include/itkSize.h b/Modules/Core/Common/include/itkSize.h index dd733f01ac6..f742559001f 100644 --- a/Modules/Core/Common/include/itkSize.h +++ b/Modules/Core/Common/include/itkSize.h @@ -49,7 +49,7 @@ namespace itk * \wikiexample{Images/Size,An object which holds the size of an image} * \endwiki */ -template< unsigned int VDimension = 2 > +template class Size { public: @@ -57,117 +57,71 @@ class Size typedef Size Self; /** Compatible Size and value typedef */ - typedef Size< VDimension > SizeType; + typedef Size SizeType; typedef itk::SizeValueType SizeValueType; /** Dimension constant */ itkStaticConstMacro(Dimension, unsigned int, VDimension); /** Get the dimension of the size object. */ - static unsigned int GetSizeDimension(void) { return VDimension; } - - /** Add two sizes. */ - const Self - operator+(const Self & vec) const + static unsigned int GetSizeDimension(void) { - Self result; - - for ( unsigned int i = 0; i < VDimension; i++ ) - { result[i] = m_Size[i] + vec.m_Size[i]; } - return result; + return VDimension; } + /** Add two sizes. */ + const Self operator+(const Self & vec) const; + /** Increment size by a size. */ - const Self & - operator+=(const Self & vec) - { - for ( unsigned int i = 0; i < VDimension; i++ ) - { m_Size[i] += vec.m_Size[i]; } - return *this; - } + const Self & operator+=(const Self & vec); /** Subtract two sizes. */ - const Self - operator-(const Self & vec) const - { - Self result; - - for ( unsigned int i = 0; i < VDimension; i++ ) - { result[i] = m_Size[i] - vec.m_Size[i]; } - return result; - } + const Self operator-(const Self & vec) const; /** Decrement size by a size. */ - const Self & - operator-=(const Self & vec) - { - for ( unsigned int i = 0; i < VDimension; i++ ) - { m_Size[i] -= vec.m_Size[i]; } - return *this; - } + const Self & operator-=(const Self & vec); /** Multiply two sizes (elementwise product). */ - const Self - operator*(const Self & vec) const - { - Self result; - - for ( unsigned int i = 0; i < VDimension; i++ ) - { result[i] = m_Size[i] * vec.m_Size[i]; } - return result; - } + const Self operator*(const Self & vec) const; /** Multiply two sizes (elementwise product). */ - const Self & - operator*=(const Self & vec) - { - for ( unsigned int i = 0; i < VDimension; i++ ) - { m_Size[i] *= vec.m_Size[i]; } - return *this; - } + const Self & operator*=(const Self & vec); /** Compare two sizes. */ - bool - operator==(const Self & vec) const - { - bool same = 1; - - for ( unsigned int i = 0; i < VDimension && same; i++ ) - { same = ( m_Size[i] == vec.m_Size[i] ); } - return same; - } + bool operator==(const Self & vec) const; /** Compare two sizes. */ - bool - operator!=(const Self & vec) const - { - bool same = 1; - - for ( unsigned int i = 0; i < VDimension && same; i++ ) - { same = ( m_Size[i] == vec.m_Size[i] ); } - return !same; - } + bool operator!=(const Self & vec) const; /** Access an element of the size. Elements are numbered * 0, ..., VDimension-1. No bounds checking is performed. */ - SizeValueType & operator[](unsigned int dim) - { return m_Size[dim]; } + inline SizeValueType & operator[](unsigned int dim) + { + return m_Size[dim]; + } /** Access an element of the size. Elements are numbered * 0, ..., VDimension-1. This version can only be an rvalue. * No bounds checking is performed. */ - SizeValueType operator[](unsigned int dim) const - { return m_Size[dim]; } + inline SizeValueType operator[](unsigned int dim) const + { + return m_Size[dim]; + } /** Get the size. This provides a read only reference to the size. * \sa SetSize */ - const SizeValueType * GetSize() const { return m_Size; } + inline const SizeValueType * GetSize() const + { + return m_Size; + } /** Set the size. * Try to prototype this function so that val has to point to a block of * memory that is the appropriate size. \sa GetSize */ - void SetSize(const SizeValueType val[VDimension]) - { memcpy(m_Size, val, sizeof( SizeValueType ) * VDimension); } + inline void SetSize(const SizeValueType val[VDimension]) + { + memcpy(m_Size, val, sizeof( SizeValueType ) * VDimension); + } /** Set an element of the Size. * sets the value of one of the elements in the Size @@ -175,8 +129,10 @@ class Size * from Tcl and Python where C++ notation is not very convenient. * \warning No bound checking is performed. * \sa SetSize() \sa GetElement() */ - void SetElement(unsigned long element, SizeValueType val) - { m_Size[element] = val; } + inline void SetElement(unsigned long element, SizeValueType val) + { + m_Size[element] = val; + } /** Get an element of the Size. * gets the value of one of the elements in the size @@ -184,13 +140,14 @@ class Size * from Tcl and Python where C++ notation is not very convenient. * \warning No bound checking is performed * \sa GetSize() \sa SetElement() */ - SizeValueType GetElement(unsigned long element) const - { return m_Size[element]; } + inline SizeValueType GetElement(unsigned long element) const + { + return m_Size[element]; + } /** Set one value for the index in all dimensions. Useful for initializing * an offset to zero. */ - void Fill(SizeValueType value) - { for ( unsigned int i = 0; i < VDimension; ++i ) { m_Size[i] = value; } } + void Fill(SizeValueType value); /** Size is an "aggregate" class. Its data is public (m_Size) * allowing for fast and convenient instantiations/assignments. @@ -207,28 +164,40 @@ class Size // force gccxml to find the constructors found before the internal upgrade to // gcc 4.2 #if defined( CABLE_CONFIGURATION ) - Size(); //purposely not implemented - Size(const Self &); //purposely not implemented - void operator=(const Self &); //purposely not implemented + Size(); // purposely not implemented + Size(const Self &); // purposely not implemented + void operator=(const Self &); // purposely not implemented #endif }; -template< unsigned int VDimension > -std::ostream & operator<<(std::ostream & os, const Size< VDimension > & size) +template +std::ostream & operator<<(std::ostream & os, const Size & size) { os << "["; - for ( unsigned int i = 0; i + 1 < VDimension; ++i ) + for( unsigned int i = 0; i + 1 < VDimension; ++i ) { os << size[i] << ", "; } - if ( VDimension >= 1 ) + if( VDimension >= 1 ) { os << size[VDimension - 1]; } os << "]"; return os; } + } // end namespace itk +extern template class itk::Size<1u>; +extern template class itk::Size<2u>; +extern template class itk::Size<3u>; +extern template class itk::Size<4u>; +extern template class itk::Size<5u>; +extern template class itk::Size<6u>; + +#ifndef ITK_MANUAL_INSTANTIATION +#include "itkSize.hxx" +#endif + #endif diff --git a/Modules/Core/Common/include/itkSize.hxx b/Modules/Core/Common/include/itkSize.hxx new file mode 100644 index 00000000000..dd8689e3486 --- /dev/null +++ b/Modules/Core/Common/include/itkSize.hxx @@ -0,0 +1,138 @@ +/*========================================================================= + * + * Copyright Insight Software Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0.txt + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + *=========================================================================*/ +#ifndef __itkSize_hxx +#define __itkSize_hxx + +#include "itkSize.h" + +namespace itk +{ +template +const typename Size::Self +Size +::operator+(const typename Size::Self & vec) const + { + Self result; + for( unsigned int i = 0; i < VDimension; ++i ) + { + result[i] = m_Size[i] + vec.m_Size[i]; + } + return result; + } + +template +const typename Size::Self +& Size +::operator+=(const typename Size::Self & vec) + { + for( unsigned int i = 0; i < VDimension; ++i ) + { + m_Size[i] += vec.m_Size[i]; + } + return *this; + } + +template +const typename Size::Self +Size +::operator-(const typename Size::Self & vec) const + { + Self result; + for( unsigned int i = 0; i < VDimension; ++i ) + { + result[i] = m_Size[i] - vec.m_Size[i]; + } + return result; + } + +template +const typename Size::Self +& Size +::operator-=(const typename Size::Self & vec) + { + for( unsigned int i = 0; i < VDimension; ++i ) + { + m_Size[i] -= vec.m_Size[i]; + } + return *this; + } + +template +const typename Size::Self +Size +::operator*(const typename Size::Self & vec) const + { + Self result; + for( unsigned int i = 0; i < VDimension; ++i ) + { + result[i] = m_Size[i] * vec.m_Size[i]; + } + return result; + } + +template +const typename Size::Self +& Size +::operator*=(const typename Size::Self & vec) + { + for( unsigned int i = 0; i < VDimension; ++i ) + { + m_Size[i] *= vec.m_Size[i]; + } + return *this; + } + +template +bool +Size +::operator==(const typename Size::Self & vec) const + { + bool same = 1; + for( unsigned int i = 0; i < VDimension && same; ++i ) + { + same = ( m_Size[i] == vec.m_Size[i] ); + } + return same; + } + +template +bool +Size +::operator!=(const typename Size::Self & vec) const + { + bool same = 1; + for( unsigned int i = 0; i < VDimension && same; ++i ) + { + same = ( m_Size[i] == vec.m_Size[i] ); + } + return !same; + } + +template +void +Size +::Fill(SizeValueType value) +{ + for( unsigned int i = 0; i < VDimension; ++i ) + { + m_Size[i] = value; + } +} + +} // End namespace itk +#endif // __itkSize_hxx diff --git a/Modules/Core/Common/src/itkCommonExplicitInstantiation.cxx b/Modules/Core/Common/src/itkCommonExplicitInstantiation.cxx index afa8c8d8638..f94f81dac83 100644 --- a/Modules/Core/Common/src/itkCommonExplicitInstantiation.cxx +++ b/Modules/Core/Common/src/itkCommonExplicitInstantiation.cxx @@ -3,6 +3,28 @@ // index types into a class that can // be compiled independant of the main // body of code +#include "itkSize.h" +template class itk::Size<1u>; +template class itk::Size<2u>; +template class itk::Size<3u>; +template class itk::Size<4u>; +template class itk::Size<5u>; +template class itk::Size<6u>; + +#include "itkOffset.h" +template class itk::Offset<1u>; +template class itk::Offset<2u>; +template class itk::Offset<3u>; +template class itk::Offset<4u>; +template class itk::Offset<5u>; +template class itk::Offset<6u>; +template class itk::Functor::OffsetLexicographicCompare<1u>; +template class itk::Functor::OffsetLexicographicCompare<2u>; +template class itk::Functor::OffsetLexicographicCompare<3u>; +template class itk::Functor::OffsetLexicographicCompare<4u>; +template class itk::Functor::OffsetLexicographicCompare<5u>; +template class itk::Functor::OffsetLexicographicCompare<6u>; + #include "itkFixedArray.h" template class itk::FixedArray; template class itk::FixedArray; From 2d183e8eca291084ee7670733c237f0eed3ef435 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Thu, 8 Nov 2012 16:05:49 -0500 Subject: [PATCH 6/7] ENH: small changes to fix linkage. Change-Id: If1b7a63e817c718e934d4f58547a6dd326d3c193 --- Modules/IO/GE/include/Ge5xHdr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/IO/GE/include/Ge5xHdr.h b/Modules/IO/GE/include/Ge5xHdr.h index 47b5e510dc7..aa115e2728a 100644 --- a/Modules/IO/GE/include/Ge5xHdr.h +++ b/Modules/IO/GE/include/Ge5xHdr.h @@ -71,7 +71,7 @@ typedef struct GE_5x_ImgHdr { int GENESIS_IH_img_top_offset; int GENESIS_IH_img_bot_offset; short GENESIS_IH_img_version; - uint16_t GENESIS_IH_img_checksum; + unsigned short GENESIS_IH_img_checksum; int GENESIS_IH_img_p_id; int GENESIS_IH_img_l_id; int GENESIS_IH_img_p_unpack; From e42839a6bc68ca85146f0f504a27f2a6b8c7aa91 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Thu, 8 Nov 2012 21:43:01 -0500 Subject: [PATCH 7/7] BUG: Inadvertantly removed code. Change-Id: Id09bcc878eac5947623045e840ce4066368b0d68 --- ...creteGaussianDerivativeImageFilterTest.cxx | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) diff --git a/Modules/Nonunit/Review/test/itkDiscreteGaussianDerivativeImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkDiscreteGaussianDerivativeImageFilterTest.cxx index cd384933a8d..4e038d16b5e 100644 --- a/Modules/Nonunit/Review/test/itkDiscreteGaussianDerivativeImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkDiscreteGaussianDerivativeImageFilterTest.cxx @@ -15,3 +15,109 @@ * limitations under the License. * *=========================================================================*/ +// Author : Iván Macía (imacia@vicomtech.org) +// Date : 02/01/2009 +// VICOMTech, Spain +// http://www.vicomtech.org +// Description : calculates the gaussian derivatives at non-zero +// points of a gaussian input image. For derivative calculation the class +// itkDiscreteGaussianDerivativeImageFilter is used. This example operates on 2D images. + + +#include "itkImageFileReader.h" +#include "itkImageFileWriter.h" +#include "itkRescaleIntensityImageFilter.h" +#include "itkDiscreteGaussianDerivativeImageFilter.h" +#include "itkSimpleFilterWatcher.h" + + +int itkDiscreteGaussianDerivativeImageFilterTest( int argc, char* argv[] ) +{ + // Verify the number of parameters in the command line + if( argc < 6 ) + { + std::cerr << "Usage: " << std::endl; + std::cerr << argv[0] << " inputFileName outputFileName orderX orderY sigma (maximum_error) (maximum_kernel_width)" << std::endl; + return EXIT_FAILURE; + } + + const unsigned int Dimension = 2; + //const unsigned int Dimension = 3; + typedef float PixelType; + typedef unsigned short OutputPixelType; + + typedef itk::Image ImageType; + typedef itk::Image OutputImageType; + + typedef itk::ImageFileReader< ImageType > ReaderType; + + ReaderType::Pointer reader = ReaderType::New(); + reader->SetFileName( argv[1] ); + + try + { + reader->Update(); + } + catch ( itk::ExceptionObject &err) + { + std::cout << "ExceptionObject caught !" << std::endl; + std::cout << err << std::endl; + return EXIT_FAILURE; + } + + typedef itk::DiscreteGaussianDerivativeImageFilter< ImageType, ImageType > DerivativeFilterType; + DerivativeFilterType::Pointer derivativeFilter = DerivativeFilterType::New(); + derivativeFilter->SetInput( reader->GetOutput() ); + + // Now proceed to apply the gaussian derivative filter in both directions + + double maxError = 0.001; + unsigned int maxKernelWidth = 100; + + if( argc >= 7 ) + { + maxError = atof( argv[6] ); + } + else if( argc >= 8 ) + { + maxError = atof( argv[6] ); + maxKernelWidth = atoi( argv[7] ); + } + + DerivativeFilterType::OrderArrayType order; + order[0] = atoi( argv[3] ); + order[1] = atoi( argv[4] ); + + double variance = atof( argv[5] ); + variance *= variance; + + derivativeFilter->SetMaximumError( maxError ); + derivativeFilter->SetMaximumKernelWidth( maxKernelWidth ); + derivativeFilter->SetVariance( variance ); + derivativeFilter->SetOrder( order ); + itk::SimpleFilterWatcher watcher(derivativeFilter, "derivativeFilter"); + + typedef itk::RescaleIntensityImageFilter< ImageType, OutputImageType > + RescaleFilterType; + RescaleFilterType::Pointer rescaler = RescaleFilterType::New(); + rescaler->SetOutputMinimum( itk::NumericTraits::min() ); + rescaler->SetOutputMaximum( itk::NumericTraits::max() ); + rescaler->SetInput( derivativeFilter->GetOutput() ); + + typedef itk::ImageFileWriter< OutputImageType > WriterType; + WriterType::Pointer writer = WriterType::New(); + writer->SetFileName( argv[2] ); + writer->SetInput( rescaler->GetOutput() ); + + try + { + writer->Update(); + } + catch ( itk::ExceptionObject &err) + { + std::cout << "ExceptionObject caught !" << std::endl; + std::cout << err << std::endl; + return EXIT_FAILURE; + } + return EXIT_SUCCESS; +}