diff --git a/Documentation/Migration/RemoveLegacyCode.xml b/Documentation/Migration/RemoveLegacyCode.xml new file mode 100644 index 00000000000..c235701fcbc --- /dev/null +++ b/Documentation/Migration/RemoveLegacyCode.xml @@ -0,0 +1,97 @@ + + + + + + + + Remove Legacy Code + + + + + b'Hans Johnson' + + + + + 2017-12-12 + + + + + + + + + + + + + + + + + + + + + + + + + + b'' + + + + + + + diff --git a/Modules/Core/Common/include/itkCovariantVector.h b/Modules/Core/Common/include/itkCovariantVector.h index 0d10017fcb9..af72276cf10 100644 --- a/Modules/Core/Common/include/itkCovariantVector.h +++ b/Modules/Core/Common/include/itkCovariantVector.h @@ -101,18 +101,6 @@ class ITK_TEMPLATE_EXPORT CovariantVector:public FixedArray< T, NVectorDimension /** Get a vnl_vector with a copy of the internal memory block. */ vnl_vector< T > GetVnlVector() const; - /** Set a vnl_vector_ref referencing the same memory block. - * \deprecated Use SetVnlVector() instead. */ - itkLegacyMacro(void Set_vnl_vector(const vnl_vector< T > &)); - - /** Get a vnl_vector_ref referencing the same memory block. - * \deprecated Use GetVnlVector() instead. */ - itkLegacyMacro(vnl_vector_ref< T > Get_vnl_vector(void)); - - /** Get a vnl_vector with a copy of the internal memory block. - * \deprecated Use GetVnlVector() instead. */ - itkLegacyMacro(vnl_vector< T > Get_vnl_vector(void) const); - /** Default constructor. */ CovariantVector():BaseArray() {} diff --git a/Modules/Core/Common/include/itkCovariantVector.hxx b/Modules/Core/Common/include/itkCovariantVector.hxx index 9dcbac54552..eb20a8f1f8b 100644 --- a/Modules/Core/Common/include/itkCovariantVector.hxx +++ b/Modules/Core/Common/include/itkCovariantVector.hxx @@ -214,39 +214,6 @@ CovariantVector< T, NVectorDimension > const_cast< T * >( this->GetDataPointer() ) ); } -#if !defined(ITK_LEGACY_REMOVE) -template< typename T, unsigned int NVectorDimension > -void -CovariantVector< T, NVectorDimension > -::Set_vnl_vector(const vnl_vector< T > & v) -{ - for ( unsigned int i = 0; i < v.size(); i++ ) - { - ( *this )[i] = v(i); - } -} - -template< typename T, unsigned int NVectorDimension > -vnl_vector_ref< T > -CovariantVector< T, NVectorDimension > -::Get_vnl_vector(void) -{ - return vnl_vector_ref< T >( NVectorDimension, this->GetDataPointer() ); -} - -template< typename T, unsigned int NVectorDimension > -vnl_vector< T > -CovariantVector< T, NVectorDimension > -::Get_vnl_vector(void) const -{ - // Return a vector_ref<>. This will be automatically converted to a - // vnl_vector<>. We have to use a const_cast<> which would normally - // be prohibited in a const method, but it is safe to do here - // because the cast to vnl_vector<> will ultimately copy the data. - return vnl_vector_ref< T >( NVectorDimension, - const_cast< T * >( this->GetDataPointer() ) ); -} -#endif } // end namespace itk #endif diff --git a/Modules/Core/Common/include/itkImageConstIterator.h b/Modules/Core/Common/include/itkImageConstIterator.h index d45ac1e7148..eb8c5d8cd4c 100644 --- a/Modules/Core/Common/include/itkImageConstIterator.h +++ b/Modules/Core/Common/include/itkImageConstIterator.h @@ -330,12 +330,6 @@ class ITK_TEMPLATE_EXPORT ImageConstIterator const PixelType & Value(void) const { return *( m_Buffer + m_Offset ); } - /** Return an iterator for the beginning of the region. "Begin" - * is defined as the first pixel in the region. - * \deprecated Use GoToBegin() instead. - */ - itkLegacyMacro(Self Begin(void) const); - /** Move an iterator to the beginning of the region. "Begin" is * defined as the first pixel in the region. */ void GoToBegin() @@ -343,12 +337,6 @@ class ITK_TEMPLATE_EXPORT ImageConstIterator m_Offset = m_BeginOffset; } - /** Return an iterator for the end of the region. "End" is defined - * as one pixel past the last pixel of the region. - * \deprecated Use GoToEnd() instead. - */ - itkLegacyMacro(Self End(void) const); - /** Move an iterator to the end of the region. "End" is defined as * one pixel past the last pixel of the region. */ void GoToEnd() @@ -386,8 +374,4 @@ class ITK_TEMPLATE_EXPORT ImageConstIterator }; } // end namespace itk -#ifndef ITK_MANUAL_INSTANTIATION -#include "itkImageConstIterator.hxx" -#endif - #endif diff --git a/Modules/Core/Common/include/itkImageConstIterator.hxx b/Modules/Core/Common/include/itkImageConstIterator.hxx deleted file mode 100644 index a9417f9fd59..00000000000 --- a/Modules/Core/Common/include/itkImageConstIterator.hxx +++ /dev/null @@ -1,66 +0,0 @@ -/*========================================================================= - * - * 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 itkImageConstIterator_hxx -#define itkImageConstIterator_hxx - -#include "itkImageConstIterator.h" - -namespace itk -{ -#if !defined(ITK_LEGACY_REMOVE) -//---------------------------------------------------------------------------- -// Begin() is the first pixel in the region. -template< typename TImage > -ImageConstIterator< TImage > -ImageConstIterator< TImage > -::Begin() const -{ - // Copy the current iterator - Self it(*this); - - // Set the offset to the m_BeginOffset. - it.m_Offset = m_BeginOffset; - - return it; -} - -//---------------------------------------------------------------------------- -// End() is one pixel past the last pixel in the current region. -// The index of this pixel is -// [m_StartIndex[0] + m_Size[0], -// m_StartIndex[1] + m_Size[1]-1, ..., -// m_StartIndex[VImageDimension-2] + m_Size[VImageDimension-2]-1, -// m_StartIndex[VImageDimension-1] + m_Size[VImageDimension-1]-1] -// -template< typename TImage > -ImageConstIterator< TImage > -ImageConstIterator< TImage > -::End() const -{ - // Copy the current iterator - Self it(*this); - - // Set the offset to the m_EndOffset. - it.m_Offset = m_EndOffset; - - return it; -} -#endif -} // end namespace itk - -#endif diff --git a/Modules/Core/Common/include/itkImageConstIteratorWithIndex.h b/Modules/Core/Common/include/itkImageConstIteratorWithIndex.h index f8ba3756b01..be81c1365a2 100644 --- a/Modules/Core/Common/include/itkImageConstIteratorWithIndex.h +++ b/Modules/Core/Common/include/itkImageConstIteratorWithIndex.h @@ -256,17 +256,9 @@ class ITK_TEMPLATE_EXPORT ImageConstIteratorWithIndex return *m_Position; } - /** Move an iterator to the beginning of the region. - * \deprecated Use GoToBegin() instead */ - itkLegacyMacro(Self Begin(void) const); - /** Move an iterator to the beginning of the region. */ void GoToBegin(); - /** Move an iterator to the End of the region. - * \deprecated Use GoToReverseBegin() instead */ - itkLegacyMacro(Self End(void) const); - /** Move an iterator to the End of the region. */ void GoToReverseBegin(); diff --git a/Modules/Core/Common/include/itkImageConstIteratorWithIndex.hxx b/Modules/Core/Common/include/itkImageConstIteratorWithIndex.hxx index 6e53aa93a00..23d32d12511 100644 --- a/Modules/Core/Common/include/itkImageConstIteratorWithIndex.hxx +++ b/Modules/Core/Common/include/itkImageConstIteratorWithIndex.hxx @@ -201,36 +201,6 @@ ImageConstIteratorWithIndex< TImage > m_Position = buffer + offset; } -#if !defined(ITK_LEGACY_REMOVE) -//---------------------------------------------------------------------------- -// Begin() is the first pixel in the region. -//---------------------------------------------------------------------------- -template< typename TImage > -ImageConstIteratorWithIndex< TImage > -ImageConstIteratorWithIndex< TImage > -::Begin() const -{ - Self it(*this); - - it.GoToBegin(); - return it; -} - -//---------------------------------------------------------------------------- -// End() is the last pixel in the region. DEPRECATED -//---------------------------------------------------------------------------- -template< typename TImage > -ImageConstIteratorWithIndex< TImage > -ImageConstIteratorWithIndex< TImage > -::End() const -{ - Self it(*this); - - it.GoToReverseBegin(); - return it; -} -#endif - } // end namespace itk #endif diff --git a/Modules/Core/Common/include/itkImageConstIteratorWithOnlyIndex.h b/Modules/Core/Common/include/itkImageConstIteratorWithOnlyIndex.h index 9dd8b729bdb..60b174f816d 100644 --- a/Modules/Core/Common/include/itkImageConstIteratorWithOnlyIndex.h +++ b/Modules/Core/Common/include/itkImageConstIteratorWithOnlyIndex.h @@ -226,17 +226,9 @@ class ITK_TEMPLATE_EXPORT ImageConstIteratorWithOnlyIndex m_PositionIndex = ind; } - /** Move an iterator to the beginning of the region. - * \deprecated Use GoToBegin() instead */ - itkLegacyMacro(Self Begin(void) const); - /** Move an iterator to the beginning of the region. */ void GoToBegin(); - /** Move an iterator to the End of the region. - * \deprecated Use GoToReverseBegin() instead */ - itkLegacyMacro(Self End(void) const); - /** Move an iterator to the End of the region. */ void GoToReverseBegin(); diff --git a/Modules/Core/Common/include/itkImageConstIteratorWithOnlyIndex.hxx b/Modules/Core/Common/include/itkImageConstIteratorWithOnlyIndex.hxx index 5b301f53824..9ef23a0e748 100644 --- a/Modules/Core/Common/include/itkImageConstIteratorWithOnlyIndex.hxx +++ b/Modules/Core/Common/include/itkImageConstIteratorWithOnlyIndex.hxx @@ -156,36 +156,6 @@ ImageConstIteratorWithOnlyIndex< TImage > } } -#if !defined(ITK_LEGACY_REMOVE) -//---------------------------------------------------------------------------- -// Begin() is the first pixel in the region. -//---------------------------------------------------------------------------- -template< typename TImage > -ImageConstIteratorWithOnlyIndex< TImage > -ImageConstIteratorWithOnlyIndex< TImage > -::Begin() const -{ - Self it(*this); - - it.GoToBegin(); - return it; -} - -//---------------------------------------------------------------------------- -// End() is the last pixel in the region. DEPRECATED -//---------------------------------------------------------------------------- -template< typename TImage > -ImageConstIteratorWithOnlyIndex< TImage > -ImageConstIteratorWithOnlyIndex< TImage > -::End() const -{ - Self it(*this); - - it.GoToReverseBegin(); - return it; -} -#endif - } // end namespace itk #endif diff --git a/Modules/Core/Common/include/itkImageIterator.h b/Modules/Core/Common/include/itkImageIterator.h index 6b2bbbf2b38..335ba610601 100644 --- a/Modules/Core/Common/include/itkImageIterator.h +++ b/Modules/Core/Common/include/itkImageIterator.h @@ -128,16 +128,6 @@ class ITK_TEMPLATE_EXPORT ImageIterator:public ImageConstIterator< TImage > return *( const_cast< InternalPixelType * >( this->m_Buffer ) + this->m_Offset ); } - /** Return an iterator for the beginning of the region. "Begin" - * is defined as the first pixel in the region. - * \deprecated Use GoToBegin() instead */ - itkLegacyMacro(Self Begin(void) const); - - /** Return an iterator for the end of the region. "End" is defined - * as one pixel past the last pixel of the region. - * \deprecated Use GoToEnd() instead */ - itkLegacyMacro(Self End(void) const); - /** Get the image that this iterator walks. */ ImageType * GetImage() const { diff --git a/Modules/Core/Common/include/itkImageIterator.hxx b/Modules/Core/Common/include/itkImageIterator.hxx index 195a5421aab..e1740d559dd 100644 --- a/Modules/Core/Common/include/itkImageIterator.hxx +++ b/Modules/Core/Common/include/itkImageIterator.hxx @@ -81,33 +81,6 @@ ImageIterator< TImage > return *this; } -#if !defined(ITK_LEGACY_REMOVE) -//---------------------------------------------------------------------------- -// Begin() is the first pixel in the region. -template< typename TImage > -ImageIterator< TImage > -ImageIterator< TImage > -::Begin() const -{ - return this->Superclass::Begin(); -} - -//---------------------------------------------------------------------------- -// End() is one pixel past the last pixel in the current region. -// The index of this pixel is -// [m_StartIndex[0] + m_Size[0], -// m_StartIndex[1] + m_Size[1]-1, ..., -// m_StartIndex[VImageDimension-2] + m_Size[VImageDimension-2]-1, -// m_StartIndex[VImageDimension-1] + m_Size[VImageDimension-1]-1] -// -template< typename TImage > -ImageIterator< TImage > -ImageIterator< TImage > -::End() const -{ - return this->Superclass::End(); -} -#endif } // end namespace itk #endif diff --git a/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.h b/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.h index ada36e6f801..83eec3c1897 100644 --- a/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.h +++ b/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.h @@ -93,18 +93,6 @@ class RandomPermutation return *this; } -#if !defined(ITK_LEGACY_REMOVE) - void Dump() - { - for ( SizeValueType i = 0; i < m_Size; i++ ) - { - std::cout << m_Permutation[i].m_Value << " " << m_Permutation[i].m_Priority - << " " << m_Permutation[i].m_Index << ";"; - std::cout << std::endl; - } - } -#endif - void SetPriority(SizeValueType i, SizeValueType priority) { if ( i > m_Size ) diff --git a/Modules/Core/Common/include/itkImageRegionConstIterator.h b/Modules/Core/Common/include/itkImageRegionConstIterator.h index 6c1e5117b4e..705271d799d 100644 --- a/Modules/Core/Common/include/itkImageRegionConstIterator.h +++ b/Modules/Core/Common/include/itkImageRegionConstIterator.h @@ -210,16 +210,6 @@ class ITK_TEMPLATE_EXPORT ImageRegionConstIterator:public ImageConstIterator< TI m_SpanBeginOffset = m_SpanEndOffset - static_cast< OffsetValueType >( this->m_Region.GetSize()[0] ); } - /** Return an iterator for the beginning of the region. "Begin" - * is defined as the first pixel in the region. - * \deprecated Use GoToBegin() instead */ - itkLegacyMacro(Self Begin(void) const); - - /** Return an iterator for the end of the region. "End" is defined - * as one pixel past the last pixel of the region. - * \deprecated Use GoToEnd() instead */ - itkLegacyMacro(Self End(void) const); - /** Set the index. No bounds checking is performed. This is overridden * from the parent because we have an extra ivar. * \sa GetIndex */ diff --git a/Modules/Core/Common/include/itkImageRegionConstIterator.hxx b/Modules/Core/Common/include/itkImageRegionConstIterator.hxx index d5c214ec305..3055356c35f 100644 --- a/Modules/Core/Common/include/itkImageRegionConstIterator.hxx +++ b/Modules/Core/Common/include/itkImageRegionConstIterator.hxx @@ -124,45 +124,6 @@ ImageRegionConstIterator< TImage > m_SpanBeginOffset = m_SpanEndOffset - static_cast< OffsetValueType >( size[0] ); } -#if !defined(ITK_LEGACY_REMOVE) -//---------------------------------------------------------------------------- -// Begin() is the first pixel in the region. -template< typename TImage > -ImageRegionConstIterator< TImage > -ImageRegionConstIterator< TImage > -::Begin() const -{ - // Copy the current iterator - Self it(*this); - - // Set the iterator to the beginning of the region - it.GoToBegin(); - - return it; -} - -//---------------------------------------------------------------------------- -// End() is one pixel past the last pixel in the current region. -// The index of this pixel is -// [m_StartIndex[0] + m_Size[0], -// m_StartIndex[1] + m_Size[1]-1, ..., -// m_StartIndex[VImageDimension-2] + m_Size[VImageDimension-2]-1, -// m_StartIndex[VImageDimension-1] + m_Size[VImageDimension-1]-1] -// -template< typename TImage > -ImageRegionConstIterator< TImage > -ImageRegionConstIterator< TImage > -::End() const -{ - // Copy the current iterator - Self it(*this); - - // Set the iterator to the end of the region - it.GoToEnd(); - - return it; -} -#endif } // end namespace itk #endif diff --git a/Modules/Core/Common/include/itkImageRegionIterator.h b/Modules/Core/Common/include/itkImageRegionIterator.h index 0e0745259c0..f9c20cd0f3a 100644 --- a/Modules/Core/Common/include/itkImageRegionIterator.h +++ b/Modules/Core/Common/include/itkImageRegionIterator.h @@ -122,16 +122,6 @@ class ITK_TEMPLATE_EXPORT ImageRegionIterator:public ImageRegionConstIterator< T PixelType & Value(void) { return *( const_cast< InternalPixelType * >( this->m_Buffer + this->m_Offset ) ); } - /** Return an iterator for the beginning of the region. "Begin" - * is defined as the first pixel in the region. - * \deprecated Use GoToBegin() instead */ - itkLegacyMacro(Self Begin(void) const); - - /** Return an iterator for the end of the region. "End" is defined - * as one pixel past the last pixel of the region. - * \deprecated Use GoToEnd() instead */ - itkLegacyMacro(Self End(void) const); - protected: /** the construction from a const iterator is declared protected in order to enforce const correctness. */ diff --git a/Modules/Core/Common/include/itkImageRegionIterator.hxx b/Modules/Core/Common/include/itkImageRegionIterator.hxx index e2b97c88874..04cffbf4b54 100644 --- a/Modules/Core/Common/include/itkImageRegionIterator.hxx +++ b/Modules/Core/Common/include/itkImageRegionIterator.hxx @@ -55,23 +55,6 @@ ImageRegionIterator< TImage > return *this; } -#if !defined(ITK_LEGACY_REMOVE) -template< typename TImage > -ImageRegionIterator< TImage > -ImageRegionIterator< TImage > -::Begin() const -{ - return this->Superclass::Begin(); -} - -template< typename TImage > -ImageRegionIterator< TImage > -ImageRegionIterator< TImage > -::End() const -{ - return this->Superclass::End(); -} -#endif } // end namespace itk #endif diff --git a/Modules/Core/Common/include/itkImageRegionReverseConstIterator.h b/Modules/Core/Common/include/itkImageRegionReverseConstIterator.h index 78a6c44ac48..e75630d64da 100644 --- a/Modules/Core/Common/include/itkImageRegionReverseConstIterator.h +++ b/Modules/Core/Common/include/itkImageRegionReverseConstIterator.h @@ -221,17 +221,6 @@ class ITK_TEMPLATE_EXPORT ImageRegionReverseConstIterator:public ImageReverseCon m_SpanBeginOffset = m_SpanEndOffset + static_cast< OffsetValueType >( this->m_Region.GetSize()[0] ); } - /** Return an iterator for the beginning of the region. "Begin" for a reverse - * iterator is the last pixel in the region. - * \deprecated Use GoToBegin() instead */ - itkLegacyMacro(Self Begin(void) const); - - /** Return an iterator for the end of the region. "End" for a - * reverse iterator is one pixel before the first pixel in the - * region. - * \deprecated Use GoToEnd() instead */ - itkLegacyMacro(Self End(void) const); - /** Set the index. No bounds checking is performed. This is overridden * from the parent because we have an extra ivar. * \sa GetIndex */ @@ -366,8 +355,4 @@ class ITK_TEMPLATE_EXPORT ImageRegionReverseConstIterator:public ImageReverseCon }; } // end namespace itk -#ifndef ITK_MANUAL_INSTANTIATION -#include "itkImageRegionReverseConstIterator.hxx" -#endif - #endif diff --git a/Modules/Core/Common/include/itkImageRegionReverseConstIterator.hxx b/Modules/Core/Common/include/itkImageRegionReverseConstIterator.hxx deleted file mode 100644 index d3a81d20b62..00000000000 --- a/Modules/Core/Common/include/itkImageRegionReverseConstIterator.hxx +++ /dev/null @@ -1,56 +0,0 @@ -/*========================================================================= - * - * 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 itkImageRegionReverseConstIterator_hxx -#define itkImageRegionReverseConstIterator_hxx - -#include "itkImageRegionReverseConstIterator.h" - -namespace itk -{ -#if !defined(ITK_LEGACY_REMOVE) -template< typename TImage > -ImageRegionReverseConstIterator< TImage > -ImageRegionReverseConstIterator< TImage > -::Begin() const -{ - // Copy the current iterator - Self it(*this); - - // Set the iterator to the beginning of the region - it.GoToBegin(); - - return it; -} - -template< typename TImage > -ImageRegionReverseConstIterator< TImage > -ImageRegionReverseConstIterator< TImage > -::End() const -{ - // Copy the current iterator - Self it(*this); - - // Set the iterator to the end of the region - it.GoToEnd(); - - return it; -} -#endif -} // end namespace itk - -#endif diff --git a/Modules/Core/Common/include/itkImageRegionReverseIterator.h b/Modules/Core/Common/include/itkImageRegionReverseIterator.h index 0c132457675..ec0627986af 100644 --- a/Modules/Core/Common/include/itkImageRegionReverseIterator.h +++ b/Modules/Core/Common/include/itkImageRegionReverseIterator.h @@ -110,16 +110,6 @@ class ITK_TEMPLATE_EXPORT ImageRegionReverseIterator:public ImageRegionReverseCo PixelType & Value(void) { return *const_cast< InternalPixelType * >( ( this->m_Buffer + this->m_Offset ) ); } - /** Return an iterator for the beginning of the region. "Begin" - * is defined as the first pixel in the region. - * \deprecated Use GoToBegin() instead */ - itkLegacyMacro(Self Begin(void) const); - - /** Return an iterator for the end of the region. "End" is defined - * as one pixel past the last pixel of the region. - * \deprecated Use GoToEnd() instead */ - itkLegacyMacro(Self End(void) const); - protected: /** the construction from a const iterator is declared protected in order to enforce const correctness. */ diff --git a/Modules/Core/Common/include/itkImageRegionReverseIterator.hxx b/Modules/Core/Common/include/itkImageRegionReverseIterator.hxx index eb000c5a183..ffa16b03388 100644 --- a/Modules/Core/Common/include/itkImageRegionReverseIterator.hxx +++ b/Modules/Core/Common/include/itkImageRegionReverseIterator.hxx @@ -54,23 +54,6 @@ ImageRegionReverseIterator< TImage > return *this; } -#if !defined(ITK_LEGACY_REMOVE) -template< typename TImage > -ImageRegionReverseIterator< TImage > -ImageRegionReverseIterator< TImage > -::Begin() const -{ - return this->Superclass::Begin(); -} - -template< typename TImage > -ImageRegionReverseIterator< TImage > -ImageRegionReverseIterator< TImage > -::End() const -{ - return this->Superclass::End(); -} -#endif } // end namespace itk #endif diff --git a/Modules/Core/Common/include/itkImageReverseConstIterator.h b/Modules/Core/Common/include/itkImageReverseConstIterator.h index b19aec027c0..01130d3422e 100644 --- a/Modules/Core/Common/include/itkImageReverseConstIterator.h +++ b/Modules/Core/Common/include/itkImageReverseConstIterator.h @@ -340,11 +340,6 @@ class ITK_TEMPLATE_EXPORT ImageReverseConstIterator const PixelType & Value(void) { return *( m_Buffer + m_Offset ); } - /** Return an iterator for the beginning of the region. "Begin" for a reverse - * iterator is the last pixel in the region. - * \deprecated Use GoToBegin() instead */ - itkLegacyMacro(Self Begin() const); - /** Move an iterator to the beginning of the region. "Begin" for a reverse * iterator is the last pixel in the region. */ void GoToBegin() @@ -352,11 +347,6 @@ class ITK_TEMPLATE_EXPORT ImageReverseConstIterator m_Offset = m_BeginOffset; } - /** Return an iterator for the end of the region. "End" for a reverse iterator - * is one pixel before the first pixel in the region. - * \deprecated Use GoToEnd() instead */ - itkLegacyMacro(Self End() const); - /** Move an iterator to the end of the region. "End" for a reverse iterator * is defined as one pixel before the first pixel in the region. */ void GoToEnd() @@ -394,8 +384,4 @@ class ITK_TEMPLATE_EXPORT ImageReverseConstIterator }; } // end namespace itk -#ifndef ITK_MANUAL_INSTANTIATION -#include "itkImageReverseConstIterator.hxx" -#endif - #endif diff --git a/Modules/Core/Common/include/itkImageReverseConstIterator.hxx b/Modules/Core/Common/include/itkImageReverseConstIterator.hxx deleted file mode 100644 index f7e43382f44..00000000000 --- a/Modules/Core/Common/include/itkImageReverseConstIterator.hxx +++ /dev/null @@ -1,66 +0,0 @@ -/*========================================================================= - * - * 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 itkImageReverseConstIterator_hxx -#define itkImageReverseConstIterator_hxx - -#include "itkImageReverseConstIterator.h" - -namespace itk -{ -#if !defined(ITK_LEGACY_REMOVE) -//---------------------------------------------------------------------------- -// Begin() is the last pixel in the region. -template< typename TImage > -ImageReverseConstIterator< TImage > -ImageReverseConstIterator< TImage > -::Begin() const -{ - // Copy the current iterator - Self it(*this); - - // Set the offset to the m_BeginOffset. - it.m_Offset = m_BeginOffset; - - return it; -} - -//---------------------------------------------------------------------------- -// End() is one pixel before the first pixel in the current region. -// The index of this pixel is -// [m_StartIndex[0] - 1, -// m_StartIndex[1], ..., -// m_StartIndex[VImageDimension-2], -// m_StartIndex[VImageDimension-1]] -// -template< typename TImage > -ImageReverseConstIterator< TImage > -ImageReverseConstIterator< TImage > -::End() const -{ - // Copy the current iterator - Self it(*this); - - // Set the offset to the m_EndOffset. - it.m_Offset = m_EndOffset; - - return it; -} -#endif -} // end namespace itk - -#endif diff --git a/Modules/Core/Common/include/itkMacro.h b/Modules/Core/Common/include/itkMacro.h index 1c628e6cf5a..bc3f56f51a4 100644 --- a/Modules/Core/Common/include/itkMacro.h +++ b/Modules/Core/Common/include/itkMacro.h @@ -593,13 +593,6 @@ itkTypeMacro(newexcp, parentexcp); " instead.") #endif -#if defined ( ITK_LEGACY_REMOVE ) -#define ITK_TEMPLATE_TXX "error ITK_TEMPLATE_TXX is no longer a supported identifier, you should replace with ITK_MANUAL_INSTANTIATION as a replacement" -#else -#define ITK_TEMPLATE_TXX 1 -#endif - - // Most modern x86 CPUs have 64 byte aligned blocks which are used for // the cache lines. By aligning multi-threaded structures with the // cache lines, false shared can be reduced, and performance diff --git a/Modules/Core/Common/include/itkNumericTraitsArrayPixel.h b/Modules/Core/Common/include/itkNumericTraitsArrayPixel.h index abdcc334581..7abc33d19ed 100644 --- a/Modules/Core/Common/include/itkNumericTraitsArrayPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsArrayPixel.h @@ -140,28 +140,6 @@ class NumericTraits< Array< T > > } } -#if !defined(ITK_LEGACY_REMOVE) - //The extra #ifdef is need because the itkLegacyMacro - //can not format a static const member function properly - //in the case of removing the code. - - /** \deprecated use ZeroValue() instead */ - itkLegacyMacro(static const Self Zero(const Self & a)) - { - Self b( a.Size() ); - b.Fill(NumericTraits< T >::ZeroValue()); - return b; - } - - /** \deprecated use OneValue() instead */ - itkLegacyMacro(static const Self One(const Self & a)) - { - Self b( a.Size() ); - b.Fill(NumericTraits< T >::OneValue()); - return b; - } -#endif - }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkNumericTraitsVariableLengthVectorPixel.h b/Modules/Core/Common/include/itkNumericTraitsVariableLengthVectorPixel.h index 445c17b0af6..71a5c5da68c 100644 --- a/Modules/Core/Common/include/itkNumericTraitsVariableLengthVectorPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsVariableLengthVectorPixel.h @@ -216,29 +216,6 @@ class NumericTraits< VariableLengthVector< T > > } } -#if !defined(ITK_LEGACY_REMOVE) - //The extra #ifdef is need because the itkLegacyMacro - //can not format a static const member function properly - //in the case of removing the code. - - /** \deprecated use ZeroValue() instead */ - itkLegacyMacro(static const Self Zero(const Self & a)) - { - Self b( a.Size() ); - - b.Fill(NumericTraits< T >::ZeroValue()); - return b; - } - /** \deprecated use OneValue() instead */ - itkLegacyMacro(static const Self One(const Self & a)) - { - Self b( a.Size() ); - - b.Fill(NumericTraits< T >::OneValue()); - return b; - } -#endif - }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkPoint.h b/Modules/Core/Common/include/itkPoint.h index 1f7207cc90c..3994d0a3bed 100644 --- a/Modules/Core/Common/include/itkPoint.h +++ b/Modules/Core/Common/include/itkPoint.h @@ -142,14 +142,6 @@ class ITK_TEMPLATE_EXPORT Point:public FixedArray< TCoordRep, NPointDimension > /** Get a vnl_vector with a copy of the internal memory block. */ vnl_vector< TCoordRep > GetVnlVector() const; - /** Get a vnl_vector_ref referencing the same memory block - * \deprecated Use GetVnlVector() instead. */ - itkLegacyMacro(vnl_vector_ref< TCoordRep > Get_vnl_vector(void)); - - /** Get a vnl_vector with a copy of the internal memory block. - * \deprecated Use GetVnlVector() instead. */ - itkLegacyMacro(vnl_vector< TCoordRep > Get_vnl_vector(void) const); - /** Set to median point between the two points * given as arguments * diff --git a/Modules/Core/Common/include/itkPoint.hxx b/Modules/Core/Common/include/itkPoint.hxx index ee7b5827ef2..1e778174c0b 100644 --- a/Modules/Core/Common/include/itkPoint.hxx +++ b/Modules/Core/Common/include/itkPoint.hxx @@ -330,35 +330,6 @@ operator>>(std::istream & is, Point< T, TPointDimension > & vct) return is; } -#if !defined(ITK_LEGACY_REMOVE) -/** - * Return a vnl_vector_ref - */ -template< typename T, unsigned int TPointDimension > -vnl_vector_ref< T > -Point< T, TPointDimension > -::Get_vnl_vector(void) -{ - return vnl_vector_ref< T >( TPointDimension, this->GetDataPointer() ); -} - -/** - * Return a vnl_vector const - */ -template< typename T, unsigned int TPointDimension > -vnl_vector< T > -Point< T, TPointDimension > -::Get_vnl_vector(void) const -{ - // Return a vector_ref<>. This will be automatically converted to a - // vnl_vector<>. We have to use a const_cast<> which would normally - // be prohibited in a const method, but it is safe to do here - // because the cast to vnl_vector<> will ultimately copy the data. - return vnl_vector_ref< T >( TPointDimension, - const_cast< T * >( this->GetDataPointer() ) ); -} -#endif - } // end namespace itk #endif diff --git a/Modules/Core/Common/include/itkProcessObject.h b/Modules/Core/Common/include/itkProcessObject.h index 89fb23b300b..f031056624f 100644 --- a/Modules/Core/Common/include/itkProcessObject.h +++ b/Modules/Core/Common/include/itkProcessObject.h @@ -680,20 +680,6 @@ class ITKCommon_EXPORT ProcessObject:public Object bool IsIndexedInputName( const DataObjectIdentifierType & ) const; bool IsIndexedOutputName( const DataObjectIdentifierType & ) const; - /** \deprecated use RemoveOutput(unsigned int) instead */ - itkLegacyMacro(virtual void RemoveOutput(DataObject *output)); - - /** \deprecated use SetNumberOfIndexedOutputs() instead */ - itkLegacyMacro(void SetNumberOfOutputs(DataObjectPointerArraySizeType num)); - - /** Remove an indexed input. - *\deprecated use RemoveInput(unsigned int) instead - */ - itkLegacyMacro(virtual void RemoveInput(DataObject *input)); - - /** \deprecated use SetNumberOfIndexedInputs() instead */ - itkLegacyMacro(void SetNumberOfInputs(DataObjectPointerArraySizeType num)); - // // Pipeline Methods // diff --git a/Modules/Core/Common/include/itkTimeProbe.h b/Modules/Core/Common/include/itkTimeProbe.h index 5c4a3226de3..759663ded4f 100644 --- a/Modules/Core/Common/include/itkTimeProbe.h +++ b/Modules/Core/Common/include/itkTimeProbe.h @@ -67,14 +67,6 @@ class ITKCommon_EXPORT TimeProbe:public */ virtual TimeStampType GetInstantValue(void) const ITK_OVERRIDE; - /** Returns the average times passed between the starts and stops of the - * probe. See the RealTimeClock for details on the precision and units of - * this time value. Obsolete method kept for backward compatibility, - * use Probe::GetMean() instead. - * \deprecated - */ - itkLegacyMacro(TimeStampType GetMeanTime(void) const); - /** Get a handle to m_RealTimeClock. */ itkGetConstObjectMacro( RealTimeClock, RealTimeClock ); diff --git a/Modules/Core/Common/include/itkVector.h b/Modules/Core/Common/include/itkVector.h index 28d778fd107..a4c49777f14 100644 --- a/Modules/Core/Common/include/itkVector.h +++ b/Modules/Core/Common/include/itkVector.h @@ -95,18 +95,6 @@ class ITK_TEMPLATE_EXPORT Vector:public FixedArray< T, NVectorDimension > /** Get a vnl_vector with a copy of the internal memory block. */ vnl_vector< T > GetVnlVector() const; - /** Set a vnl_vector_ref referencing the same memory block. - * \deprecated Use SetVnlVector() instead. */ - itkLegacyMacro(void Set_vnl_vector(const vnl_vector< T > &)); - - /** Get a vnl_vector_ref referencing the same memory block. - * \deprecated Use GetVnlVector() instead. */ - itkLegacyMacro(vnl_vector_ref< T > Get_vnl_vector(void)); - - /** Get a vnl_vector with a copy of the internal memory block. - * \deprecated Use GetVnlVector() instead. */ - itkLegacyMacro(vnl_vector< T > Get_vnl_vector(void) const); - /** Default constructor and copy constructors. */ Vector():BaseArray() {} diff --git a/Modules/Core/Common/include/itkVector.hxx b/Modules/Core/Common/include/itkVector.hxx index e225b9c6aa2..c76029a6fce 100644 --- a/Modules/Core/Common/include/itkVector.hxx +++ b/Modules/Core/Common/include/itkVector.hxx @@ -229,40 +229,5 @@ Vector< T, TVectorDimension > return value; } -#if !defined(ITK_LEGACY_REMOVE) -template< typename T, unsigned int TVectorDimension > -void -Vector< T, TVectorDimension > -::Set_vnl_vector(const vnl_vector< T > & v) -{ - for ( unsigned int i = 0; i < v.size(); i++ ) - { - ( *this )[i] = v(i); - } -} - -template< typename T, unsigned int TVectorDimension > -vnl_vector_ref< T > -Vector< T, TVectorDimension > -::Get_vnl_vector(void) -{ - return vnl_vector_ref< T >( TVectorDimension, this->GetDataPointer() ); -} - -template< typename T, unsigned int TVectorDimension > -vnl_vector< T > -Vector< T, TVectorDimension > -::Get_vnl_vector(void) const -{ - // Return a vector_ref<>. This will be automatically converted to a - // vnl_vector<>. We have to use a const_cast<> which would normally - // be prohibited in a const method, but it is safe to do here - // because the cast to vnl_vector<> will ultimately copy the data. - return vnl_vector_ref< T >( TVectorDimension, - const_cast< T * >( this->GetDataPointer() ) ); -} - -#endif - } // end namespace itk #endif diff --git a/Modules/Core/Common/src/itkProcessObject.cxx b/Modules/Core/Common/src/itkProcessObject.cxx index ab54448cda4..a688d92012e 100644 --- a/Modules/Core/Common/src/itkProcessObject.cxx +++ b/Modules/Core/Common/src/itkProcessObject.cxx @@ -1948,64 +1948,4 @@ ::SetNumberOfRequiredInputs( DataObjectPointerArraySizeType nb ) } } - -#if !defined(ITK_LEGACY_REMOVE) -void -ProcessObject -::SetNumberOfInputs(DataObjectPointerArraySizeType num) -{ - this->SetNumberOfIndexedInputs(num); -} - - -void -ProcessObject -::SetNumberOfOutputs(DataObjectPointerArraySizeType num) -{ - this->SetNumberOfIndexedOutputs(num); -} - - -void -ProcessObject -::RemoveInput(DataObject * input) -{ - if( !input ) - { - return; - } - DataObjectPointerArraySizeType nb = this->GetNumberOfIndexedInputs(); - for( DataObjectPointerArraySizeType i = 0; i < nb; i++ ) - { - if( this->GetInput(i) == input ) - { - this->RemoveInput( i ); - return; - } - } - itkDebugMacro("tried to remove an input that was not in the list"); -} - - -void -ProcessObject -::RemoveOutput(DataObject * output) -{ - if( !output ) - { - return; - } - DataObjectPointerArraySizeType nb = this->GetNumberOfIndexedOutputs(); - for( DataObjectPointerArraySizeType i = 0; i < nb; i++ ) - { - if( this->GetOutput(i) == output ) - { - this->RemoveOutput( i ); - return; - } - } - itkDebugMacro("tried to remove an output that was not in the list"); -} -#endif - } // end namespace itk diff --git a/Modules/Core/Common/src/itkTimeProbe.cxx b/Modules/Core/Common/src/itkTimeProbe.cxx index 96c28febac5..47062434439 100644 --- a/Modules/Core/Common/src/itkTimeProbe.cxx +++ b/Modules/Core/Common/src/itkTimeProbe.cxx @@ -36,12 +36,4 @@ ::GetInstantValue(void) const return m_RealTimeClock->GetTimeInSeconds(); } -#if !defined(ITK_LEGACY_REMOVE) -TimeProbe::TimeStampType -TimeProbe -::GetMeanTime(void) const -{ - return this->GetMean(); -} -#endif } // end namespace itk diff --git a/Modules/Core/Common/test/itkDataObjectAndProcessObjectTest.cxx b/Modules/Core/Common/test/itkDataObjectAndProcessObjectTest.cxx index c5568f9641d..35c9d4e09a4 100644 --- a/Modules/Core/Common/test/itkDataObjectAndProcessObjectTest.cxx +++ b/Modules/Core/Common/test/itkDataObjectAndProcessObjectTest.cxx @@ -97,10 +97,6 @@ class TestProcessObject: public ProcessObject using Superclass::IsRequiredInputName; using Superclass::SetRequiredInputNames; using Superclass::VerifyPreconditions; -#if !defined(ITK_LEGACY_REMOVE) - using Superclass::SetNumberOfInputs; - using Superclass::SetNumberOfOutputs; -#endif }; } diff --git a/Modules/Core/Transform/include/itkAffineTransform.h b/Modules/Core/Transform/include/itkAffineTransform.h index 552e2838ae6..8b1d9737585 100644 --- a/Modules/Core/Transform/include/itkAffineTransform.h +++ b/Modules/Core/Transform/include/itkAffineTransform.h @@ -238,30 +238,6 @@ class ITK_TEMPLATE_EXPORT AffineTransform: /** Return an inverse of this transform. */ virtual InverseTransformBasePointer GetInverseTransform() const ITK_OVERRIDE; - /** Back transform by an affine transformation - * - * This method finds the point or vector that maps to a given - * point or vector under the affine transformation defined by - * self. If no such point exists, an exception is thrown. - * - * \deprecated Please use GetInverseTransform and then call the - * forward transform function */ - itkLegacyMacro(InputPointType BackTransform(const OutputPointType & point) const); - itkLegacyMacro(InputVectorType BackTransform(const OutputVectorType & vector) const); - itkLegacyMacro(InputVnlVectorType BackTransform( const OutputVnlVectorType & vector) const); - itkLegacyMacro(InputCovariantVectorType BackTransform( const OutputCovariantVectorType & vector) const); - - /** Back transform a point by an affine transform - * - * This method finds the point that maps to a given point under - * the affine transformation defined by self. If no such point - * exists, an exception is thrown. The returned value is (a - * pointer to) a brand new point created with new. - * - * \deprecated Please use GetInverseTransform and then call the - * forward transform function */ - itkLegacyMacro(InputPointType BackTransformPoint(const OutputPointType & point) const); - /** Compute distance between two affine transformations * * This method computes a "distance" between two affine @@ -305,96 +281,6 @@ class ITK_TEMPLATE_EXPORT AffineTransform: const Self & operator=(const Self &); }; //class AffineTransform -#if !defined(ITK_LEGACY_REMOVE) -/** Back transform a vector */ -template -inline -typename AffineTransform::InputVectorType -AffineTransform::BackTransform(const OutputVectorType & vect) const -{ - itkWarningMacro( - << "BackTransform(): This method is slated to be removed " - << "from ITK. Instead, please use GetInverse() to generate an inverse " - << "transform and then perform the transform using that inverted transform."); - return this->GetInverseMatrix() * vect; -} - -/** Back transform a vnl_vector */ -template -inline -typename AffineTransform::InputVnlVectorType -AffineTransform::BackTransform(const OutputVnlVectorType & vect) const -{ - itkWarningMacro( - << "BackTransform(): This method is slated to be removed " - << "from ITK. Instead, please use GetInverse() to generate an inverse " - << "transform and then perform the transform using that inverted transform."); - return this->GetInverseMatrix() * vect; -} - -/** Back Transform a CovariantVector */ -template -inline -typename AffineTransform::InputCovariantVectorType -AffineTransform::BackTransform(const OutputCovariantVectorType & vec) const -{ - itkWarningMacro( - << "BackTransform(): This method is slated to be removed " - << "from ITK. Instead, please use GetInverse() to generate an inverse " - << "transform and then perform the transform using that inverted transform."); - - InputCovariantVectorType result; // Converted vector - - for ( unsigned int i = 0; i < NDimensions; i++ ) - { - result[i] = NumericTraits< ScalarType >::ZeroValue(); - for ( unsigned int j = 0; j < NDimensions; j++ ) - { - result[i] += this->GetMatrix()[j][i] * vec[j]; // Direct matrix transposed - } - } - return result; -} - -/** Back transform a given point which is represented as type PointType */ -template -inline -typename AffineTransform::InputPointType -AffineTransform::BackTransformPoint(const OutputPointType & point) const -{ - return this->BackTransform(point); -} - -/** Back transform a point */ -template -inline -typename AffineTransform::InputPointType -AffineTransform::BackTransform(const OutputPointType & point) const -{ - itkWarningMacro( - << "BackTransform(): This method is slated to be removed " - << "from ITK. Instead, please use GetInverse() to generate an inverse " - << "transform and then perform the transform using that inverted transform."); - InputPointType result; // Converted point - ScalarType temp[NDimensions]; - unsigned int i, j; - - for ( j = 0; j < NDimensions; j++ ) - { - temp[j] = point[j] - this->GetOffset()[j]; - } - - for ( i = 0; i < NDimensions; i++ ) - { - result[i] = 0.0; - for ( j = 0; j < NDimensions; j++ ) - { - result[i] += this->GetInverseMatrix()[i][j] * temp[j]; - } - } - return result; -} -#endif } // namespace itk #ifndef ITK_MANUAL_INSTANTIATION diff --git a/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.h b/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.h index c1a84fb54f2..a98724d3e22 100644 --- a/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.h +++ b/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.h @@ -458,13 +458,7 @@ class ITK_TEMPLATE_EXPORT MatrixOffsetTransformBase : return true; } -#if !defined(ITK_LEGACY_REMOVE) - -public: -#else - protected: -#endif /** \deprecated Use GetInverse for public API instead. * Method will eventually be made a protected member function */ const InverseMatrixType & GetInverseMatrix() const; diff --git a/Modules/Core/Transform/include/itkRigid3DTransform.h b/Modules/Core/Transform/include/itkRigid3DTransform.h index 7a4ecf2946c..39cdab1028c 100644 --- a/Modules/Core/Transform/include/itkRigid3DTransform.h +++ b/Modules/Core/Transform/include/itkRigid3DTransform.h @@ -143,22 +143,6 @@ class ITK_TEMPLATE_EXPORT Rigid3DTransform: const TParametersValueType tolerance = MatrixOrthogonalityTolerance::GetTolerance()); - /** - * Back transform by an affine transformation - * - * This method finds the point or vector that maps to a given - * point or vector under the affine transformation defined by - * self. If no such point exists, an exception is thrown. - * - * \deprecated Please use GetInverseTransform and then call the forward - * transform using the result. - * - */ - itkLegacyMacro(InputPointType BackTransform(const OutputPointType & point) const); - itkLegacyMacro(InputVectorType BackTransform(const OutputVectorType & vector) const); - itkLegacyMacro(InputVnlVectorType BackTransform(const OutputVnlVectorType & vector) const); - itkLegacyMacro(InputCovariantVectorType BackTransform(const OutputCovariantVectorType & vector) const); - protected: Rigid3DTransform(const MatrixType & matrix, const OutputVectorType & offset); diff --git a/Modules/Core/Transform/include/itkRigid3DTransform.hxx b/Modules/Core/Transform/include/itkRigid3DTransform.hxx index cfa524a2130..48f0bcf8810 100644 --- a/Modules/Core/Transform/include/itkRigid3DTransform.hxx +++ b/Modules/Core/Transform/include/itkRigid3DTransform.hxx @@ -158,56 +158,6 @@ Rigid3DTransform::Translate(const OffsetType & offset, boo this->ComputeTranslation(); } -#if !defined(ITK_LEGACY_REMOVE) -// Back transform a point -template -typename Rigid3DTransform::InputPointType -Rigid3DTransform::BackTransform(const OutputPointType & point) const -{ - itkWarningMacro( - << "BackTransform(): This method is slated to be removed from ITK." - << - "Instead, please use GetInverse() to generate an inverse transform and then perform the transform using that inverted transform."); - return this->GetInverseMatrix() * ( point - this->GetOffset() ); -} - -// Back transform a vector -template -typename Rigid3DTransform::InputVectorType -Rigid3DTransform::BackTransform(const OutputVectorType & vect) const -{ - itkWarningMacro( - << "BackTransform(): This method is slated to be removed from ITK." - << - "Instead, please use GetInverse() to generate an inverse transform and then perform the transform using that inverted transform."); - return this->GetInverseMatrix() * vect; -} - -// Back transform a vnl_vector -template -typename Rigid3DTransform::InputVnlVectorType -Rigid3DTransform::BackTransform(const OutputVnlVectorType & vect) const -{ - itkWarningMacro( - << "BackTransform(): This method is slated to be removed from ITK." - << - " Instead, please use GetInverse() to generate an inverse transform and then perform the transform using that inverted transform."); - return this->GetInverseMatrix() * vect; -} - -// Back Transform a CovariantVector -template -typename Rigid3DTransform::InputCovariantVectorType -Rigid3DTransform::BackTransform(const OutputCovariantVectorType & vect) const -{ - itkWarningMacro( - << "BackTransform(): This method is slated to be removed from ITK." - << - " Instead, please use GetInverse() to generate an inverse transform and then perform the transform using that inverted transform."); - return this->GetMatrix() * vect; -} -#endif // end ITK_LEGACY_REMOVE - } // namespace #endif diff --git a/Modules/Core/Transform/include/itkScalableAffineTransform.h b/Modules/Core/Transform/include/itkScalableAffineTransform.h index 4e830476a26..1ecd9274b5e 100644 --- a/Modules/Core/Transform/include/itkScalableAffineTransform.h +++ b/Modules/Core/Transform/include/itkScalableAffineTransform.h @@ -112,23 +112,6 @@ class ITK_TEMPLATE_EXPORT ScalableAffineTransform: /** Return an inverse of this transform. */ virtual InverseTransformBasePointer GetInverseTransform() const ITK_OVERRIDE; - /** Set the matrix of the transform. The matrix should not include - * scale. - * \deprecated use SetMatrix instead */ - itkLegacyMacro(void SetMatrixComponent(const MatrixType & matrix)); - - /** Get matrix of the transform. - * \deprecated use GetMatrix instead */ - itkLegacyMacro(const MatrixType & GetMatrixComponent() const); - - /** Set offset (origin) of the Transform. - * \deprecated use SetTranslation instead. */ - itkLegacyMacro(void SetOffsetComponent(const OffsetType & offset) ); - - /** Get offset of the transform - * \deprecated use GetTranslation instead. */ - itkLegacyMacro(const OffsetType & GetOffsetComponent(void) const ); - protected: /** Construct an ScalableAffineTransform object * diff --git a/Modules/Core/Transform/include/itkScalableAffineTransform.hxx b/Modules/Core/Transform/include/itkScalableAffineTransform.hxx index 3e2483018c9..4818bc7e5e6 100644 --- a/Modules/Core/Transform/include/itkScalableAffineTransform.hxx +++ b/Modules/Core/Transform/include/itkScalableAffineTransform.hxx @@ -212,40 +212,6 @@ ScalableAffineTransform } } -#if !defined(ITK_LEGACY_REMOVE) -template -void -ScalableAffineTransform -::SetMatrixComponent(const MatrixType & matrix) -{ - this->SetMatrix(matrix); -} - -template -const typename ScalableAffineTransform::MatrixType & -ScalableAffineTransform -::GetMatrixComponent() const -{ - return this->GetMatrix(); -} - -template -void -ScalableAffineTransform -::SetOffsetComponent(const OffsetType & offset) -{ - this->SetTranslation(offset); -} - -template -const typename ScalableAffineTransform::OffsetType & -ScalableAffineTransform -::GetOffsetComponent(void) const -{ - return this->GetTranslation(); -} -#endif - } // namespace #endif diff --git a/Modules/Core/Transform/include/itkScaleTransform.h b/Modules/Core/Transform/include/itkScaleTransform.h index c1b77ecf61a..a9162b00ca2 100644 --- a/Modules/Core/Transform/include/itkScaleTransform.h +++ b/Modules/Core/Transform/include/itkScaleTransform.h @@ -108,23 +108,6 @@ class ITK_TEMPLATE_EXPORT ScaleTransform : public MatrixOffsetTransformBase FixedParametersType; -// The ITK_FIXED_PARAMETERS_ARE_DOUBLE is intended -// to facilitate transition of ITK for those very -// rare cases where multiple versions of ITK -// may need to be supported simultaneously. -#if defined( ITK_LEGACY_REMOVE ) - #undef ITK_FIXED_PARAMETERS_ARE_DOUBLE -#else - #define ITK_FIXED_PARAMETERS_ARE_DOUBLE - // #if !defined(ITK_FIXED_PARAMETERS_ARE_DOUBLE) - // typedef ParametersValueType FixedParametersValueType; - // #endif -#endif - /** Run-time type information (and related methods). */ itkTypeMacro(TransformBaseTemplate, Object); diff --git a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.h b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.h index 8bc168f8403..842da8e2d84 100644 --- a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.h @@ -141,10 +141,6 @@ class ITK_TEMPLATE_EXPORT HoughTransform2DCirclesImageFilter: /** Get the list of circles. This recomputes the circles. */ CirclesListType & GetCircles(); - /** Get the list of circles. - * \deprecated Use GetCircles() without arguments instead! */ - itkLegacyMacro(CirclesListType & GetCircles(unsigned int n)); - /** Set/Get the number of circles to extract. */ itkSetMacro(NumberOfCircles, CirclesListSizeType); itkGetConstMacro(NumberOfCircles, CirclesListSizeType); diff --git a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.hxx index 1927b83b3c1..61cd1d294e5 100644 --- a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.hxx @@ -279,16 +279,6 @@ HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType, TRadiusPi return m_CirclesList; } -#if !defined(ITK_LEGACY_REMOVE) -template< typename TInputPixelType, typename TOutputPixelType, typename TRadiusPixelType > -typename HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType, TRadiusPixelType >::CirclesListType & -HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType, TRadiusPixelType > -::GetCircles(unsigned int) -{ - return this->GetCircles(); -} -#endif - template< typename TInputPixelType, typename TOutputPixelType, typename TRadiusPixelType > void HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType, TRadiusPixelType > diff --git a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.h b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.h index 70c4e83efa2..c49ce5a07dc 100644 --- a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.h @@ -135,10 +135,6 @@ class ITK_TEMPLATE_EXPORT HoughTransform2DLinesImageFilter: /** Get the list of lines. This recomputes the lines */ LinesListType & GetLines(); - /** Get the list of lines. - * \deprecated Use GetLines() without arguments instead! */ - itkLegacyMacro(LinesListType & GetLines(unsigned int n)); - /** Set/Get the number of lines to extract */ itkSetMacro(NumberOfLines, LinesListSizeType); itkGetConstMacro(NumberOfLines, LinesListSizeType); diff --git a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.hxx index f25c14a9428..09fe1ac7dd6 100644 --- a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.hxx @@ -373,16 +373,6 @@ HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType > return m_LinesList; } -#if !defined(ITK_LEGACY_REMOVE) -template< typename TInputPixelType, typename TOutputPixelType > -typename HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >::LinesListType & -HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType > -::GetLines(unsigned int) -{ - return this->GetLines(); -} -#endif - /** Print Self information */ template< typename TInputPixelType, typename TOutputPixelType > void diff --git a/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.h b/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.h index fa93ae1ca6b..209e2426743 100644 --- a/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.h +++ b/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.h @@ -227,19 +227,6 @@ class ITK_TEMPLATE_EXPORT VectorGradientMagnitudeImageFilter: itkSetMacro(ComponentWeights, WeightsType); itkGetConstReferenceMacro(ComponentWeights, WeightsType); -#ifndef ITK_LEGACY_REMOVE - /** Get the neighborhood radius - always 1 */ - virtual const RadiusType GetNeighborhoodRadius() const - { - RadiusType r1; - r1.Fill(1); - return r1; - } - - /** Set the neighborhood radius - ignored */ - virtual void SetNeighborhoodRadius(const RadiusType) {} -#endif - /** Set/Get principle components calculation mode. When this is set to TRUE/ON, the gradient calculation will involve a priniciple component analysis of the partial derivatives of the color components. When this value is set diff --git a/Modules/IO/GDCM/include/itkGDCMSeriesFileNames.h b/Modules/IO/GDCM/include/itkGDCMSeriesFileNames.h index f9e71b1bc13..f8f93b436f2 100644 --- a/Modules/IO/GDCM/include/itkGDCMSeriesFileNames.h +++ b/Modules/IO/GDCM/include/itkGDCMSeriesFileNames.h @@ -141,15 +141,6 @@ class ITKIOGDCM_EXPORT GDCMSeriesFileNames:public ProcessObject return m_UseSeriesDetails; } - /** Returns a pointer to the SeriesHelper class. This access allows - * the files as gdcm dicom objects in a series to be queried for - * dicom tag values prior to reading the series. Such querying is - * useful to determine which series should be read - e.g., to determine - * which is the T2 scan, etc. - * \deprecated because SerieHelper is deprecated in GDCM itself. - */ - itkLegacyMacro(gdcm::SerieHelper * GetSeriesHelper(void)); - /** Add more restriction on the selection of a Series. This follow the same * approach as SetUseSeriesDetails, but allow a user to add even more DICOM * tags to take into account for subrefining a set of DICOM files into multiple diff --git a/Modules/IO/GDCM/src/itkGDCMSeriesFileNames.cxx b/Modules/IO/GDCM/src/itkGDCMSeriesFileNames.cxx index 53eee95be9f..d2d01fa31c3 100644 --- a/Modules/IO/GDCM/src/itkGDCMSeriesFileNames.cxx +++ b/Modules/IO/GDCM/src/itkGDCMSeriesFileNames.cxx @@ -40,14 +40,6 @@ GDCMSeriesFileNames::~GDCMSeriesFileNames() delete m_SerieHelper; } -#if !defined( ITK_LEGACY_REMOVE ) -gdcm::SerieHelper * GDCMSeriesFileNames::GetSeriesHelper(void) -{ - itkLegacyBodyMacro(GDCMSeriesFileNames::GetSeriesHelper, 4.9); - return m_SerieHelper; -} -#endif - void GDCMSeriesFileNames::SetInputDirectory(const char *name) { if ( !name ) diff --git a/Modules/IO/GDCM/test/itkGDCMSeriesMissingDicomTagTest.cxx b/Modules/IO/GDCM/test/itkGDCMSeriesMissingDicomTagTest.cxx index 52ace1c8a99..c4d5d40b59e 100644 --- a/Modules/IO/GDCM/test/itkGDCMSeriesMissingDicomTagTest.cxx +++ b/Modules/IO/GDCM/test/itkGDCMSeriesMissingDicomTagTest.cxx @@ -39,75 +39,5 @@ int itkGDCMSeriesMissingDicomTagTest( int argc, char* argv[] ) return EXIT_FAILURE; } -#if ! defined ( ITK_LEGACY_REMOVE ) - typedef itk::Image ImageType; - typedef itk::ImageSeriesReader< ImageType > ReaderType; - typedef itk::GDCMImageIO ImageIOType; - typedef itk::GDCMSeriesFileNames SeriesFileNames; - - ImageIOType::Pointer gdcmIO = ImageIOType::New(); - SeriesFileNames::Pointer it = SeriesFileNames::New(); - - // Get the DICOM filenames from the directory - // First add a restriction *before* selecting the input directory - // since SetInputDirectory has a side effect of executing - gdcm::SerieHelper *sh = it->GetSeriesHelper( ); - sh->AddRestriction(0x0010, 0x0010, "Wes Turner", gdcm::GDCM_EQUAL); - sh->AddRestriction(0x0020, 0x0013, "75", gdcm::GDCM_GREATEROREQUAL); - sh->AddRestriction(0x0020, 0x0013, "77", gdcm::GDCM_LESSOREQUAL); - it->SetInputDirectory( argv[1] ); - - ReaderType::Pointer reader = ReaderType::New(); - - const ReaderType::FileNamesContainer & fileNames = it->GetInputFileNames(); - const size_t numberOfFileNames = fileNames.size(); - std::cout << numberOfFileNames << std::endl; - for(unsigned int fni = 0; fni < numberOfFileNames; ++fni) - { - std::cout << "filename # " << fni << " = "; - std::cout << fileNames[fni] << std::endl; - } - - reader->SetFileNames( fileNames ); - reader->SetImageIO( gdcmIO ); - - try - { - reader->Update(); - } - catch (itk::ExceptionObject &excp) - { - std::cerr << "Exception thrown while writing the image" << std::endl; - std::cerr << excp << std::endl; - - return EXIT_FAILURE; - } - - ReaderType::DictionaryArrayRawPointer dictArray = - reader->GetMetaDataDictionaryArray(); - unsigned dictSize = static_cast( dictArray->size() ); - if(dictSize != 2) - { - std::cerr << "Expected 2 elements in MetaDataDictionary array, found " - << dictArray->size() << std::endl; - return EXIT_FAILURE; - } - // This key artificially removed from the second file in the series. - std::string missingKey("0008|0033"); - std::string val; - if(!itk::ExposeMetaData( *((*dictArray)[0]) ,missingKey, val )) - { - std::cerr << "Missing data object " << missingKey - << "in first slice" << std::endl; - return EXIT_FAILURE; - } - if(itk::ExposeMetaData( *((*dictArray)[1]) ,missingKey, val )) - { - std::cerr << "DataObject " << missingKey - << "found in second slice where it should be missing" << std::endl; - return EXIT_FAILURE; - } -#endif - return EXIT_SUCCESS; } diff --git a/Modules/IO/GDCM/test/itkGDCMSeriesReadImageWriteTest.cxx b/Modules/IO/GDCM/test/itkGDCMSeriesReadImageWriteTest.cxx index 6a96207a26b..4be1c479c05 100644 --- a/Modules/IO/GDCM/test/itkGDCMSeriesReadImageWriteTest.cxx +++ b/Modules/IO/GDCM/test/itkGDCMSeriesReadImageWriteTest.cxx @@ -39,104 +39,5 @@ int itkGDCMSeriesReadImageWriteTest( int argc, char* argv[] ) return EXIT_FAILURE; } -#if ! defined ( ITK_LEGACY_REMOVE ) - typedef itk::Image ImageType; - typedef itk::ImageSeriesReader< ImageType > ReaderType; - typedef itk::GDCMImageIO ImageIOType; - typedef itk::GDCMSeriesFileNames SeriesFileNames; - - ImageIOType::Pointer gdcmIO = ImageIOType::New(); - SeriesFileNames::Pointer it = SeriesFileNames::New(); - - // Get the DICOM filenames from the directory - // First add a restriction *before* selecting the input directory - // since SetInputDirectory has a side effect of executing - gdcm::SerieHelper *sh = it->GetSeriesHelper( ); - sh->AddRestriction(0x0010, 0x0010, "Wes Turner", gdcm::GDCM_EQUAL); - sh->AddRestriction(0x0020, 0x0013, "75", gdcm::GDCM_GREATEROREQUAL); - sh->AddRestriction(0x0020, 0x0013, "77", gdcm::GDCM_LESSOREQUAL); - it->SetInputDirectory( argv[1] ); - - ReaderType::Pointer reader = ReaderType::New(); - - const ReaderType::FileNamesContainer & fileNames = it->GetInputFileNames(); - const size_t numberOfFileNames = fileNames.size(); - std::cout << numberOfFileNames << std::endl; - for( unsigned int fni = 0; fni < numberOfFileNames; ++fni ) - { - std::cout << "filename # " << fni << " = "; - std::cout << fileNames[fni] << std::endl; - } - - reader->SetFileNames( fileNames ); - reader->SetImageIO( gdcmIO ); - - try - { - reader->Update(); - } - catch (itk::ExceptionObject &excp) - { - std::cerr << "Exception thrown while writing the image" << std::endl; - std::cerr << excp << std::endl; - - return EXIT_FAILURE; - } - - typedef itk::ImageFileWriter< ImageType > WriterType; - WriterType::Pointer writer = WriterType::New(); - - writer->SetFileName( argv[2] ); - writer->SetInput( reader->GetOutput() ); - - try - { - writer->Update(); - } - catch (itk::ExceptionObject &excp) - { - std::cerr << "Exception thrown while writing the image" << std::endl; - std::cerr << excp << std::endl; - - return EXIT_FAILURE; - } - - // Writing image afer downscaling to 8bits (unsigned char) - - typedef itk::Image< unsigned short, 3> Image3DType; - typedef itk::Image< unsigned char, 3> RescaleImageType; - typedef itk::Image< unsigned char, 2> OutputImageType; - typedef itk::RescaleIntensityImageFilter< - Image3DType, RescaleImageType > RescaleFilterType; - - RescaleFilterType::Pointer rescaler = RescaleFilterType::New(); - rescaler->SetInput( reader->GetOutput() ); - rescaler->SetOutputMinimum( 0 ); - rescaler->SetOutputMaximum( 255 ); - - typedef itk::ImageSeriesWriter< RescaleImageType, OutputImageType > SeriesWriterRescaleType; - - SeriesWriterRescaleType::Pointer swriter2 = SeriesWriterRescaleType::New(); - - it->SetOutputDirectory( argv[3] ); - swriter2->SetInput( rescaler->GetOutput() ); - swriter2->SetImageIO( gdcmIO ); - gdcmIO->SetInternalComponentType( itk::ImageIOBase::UCHAR ); - - swriter2->SetFileNames( it->GetOutputFileNames() ); - swriter2->SetMetaDataDictionaryArray( reader->GetMetaDataDictionaryArray() ); - - try - { - swriter2->Update(); - } - catch (itk::ExceptionObject & e) - { - std::cerr << "exception in file writer " << std::endl; - std::cerr << e << std::endl; - return EXIT_FAILURE; - } -#endif - return EXIT_SUCCESS; } diff --git a/Modules/Nonunit/Review/include/itkWarpHarmonicEnergyCalculator.h b/Modules/Nonunit/Review/include/itkWarpHarmonicEnergyCalculator.h index 6752f6dc44a..d6bd7cc11be 100644 --- a/Modules/Nonunit/Review/include/itkWarpHarmonicEnergyCalculator.h +++ b/Modules/Nonunit/Review/include/itkWarpHarmonicEnergyCalculator.h @@ -100,19 +100,6 @@ class ITK_TEMPLATE_EXPORT WarpHarmonicEnergyCalculator:public Object void SetUseImageSpacing(bool); itkGetConstMacro(UseImageSpacing, bool); itkBooleanMacro(UseImageSpacing); -#if !defined(ITK_LEGACY_REMOVE) - /** \deprecated Replaced by UseImageSpacingOn() as of ITK 4.12. */ - itkLegacyMacro(void SetUseImageSpacingOn()) - { - this->SetUseImageSpacing(true); - } - - /** \deprecated Replaced by UseImageSpacingOff() as of ITK 4.12. */ - itkLegacyMacro(void SetUseImageSpacingOff()) - { - this->SetUseImageSpacing(false); - } -#endif typedef FixedArray< double, ImageDimension > WeightsType; diff --git a/Modules/Numerics/Statistics/include/itkHistogram.h b/Modules/Numerics/Statistics/include/itkHistogram.h index cac921cbaa2..429a0735982 100644 --- a/Modules/Numerics/Statistics/include/itkHistogram.h +++ b/Modules/Numerics/Statistics/include/itkHistogram.h @@ -142,11 +142,6 @@ class ITK_TEMPLATE_EXPORT Histogram: /** Initialize the values of the histogram bins to zero */ void SetToZero(); - /** Get the index of a measurement value from the histogram. - * \deprecated Use GetIndex(const MeasurementVectorType & - * measurement, IndexType & index ) const instead. */ - itkLegacyMacro(const IndexType & GetIndex(const MeasurementVectorType & measurement) const); - /** Get the index of histogram corresponding to the specified * measurement value. Returns true if index is valid and false if * the measurement is outside the histogram */ diff --git a/Modules/Numerics/Statistics/include/itkHistogram.hxx b/Modules/Numerics/Statistics/include/itkHistogram.hxx index ce201b22943..f3f71f92caf 100644 --- a/Modules/Numerics/Statistics/include/itkHistogram.hxx +++ b/Modules/Numerics/Statistics/include/itkHistogram.hxx @@ -774,17 +774,6 @@ Histogram< TMeasurement, TFrequencyContainer > } } -#if !defined(ITK_LEGACY_REMOVE) -template< typename TMeasurement, typename TFrequencyContainer > -inline const typename Histogram< TMeasurement, TFrequencyContainer >::IndexType & -Histogram< TMeasurement, TFrequencyContainer > -::GetIndex(const MeasurementVectorType & measurement) const -{ - // Have this deprecated method call the un-deprecated one.. - this->GetIndex(measurement, m_TempIndex); - return m_TempIndex; -} -#endif } // end of namespace Statistics } // end of namespace itk diff --git a/Modules/Registration/FEM/include/itkFEMRegistrationFilter.h b/Modules/Registration/FEM/include/itkFEMRegistrationFilter.h index adff09fabb9..c091133587b 100644 --- a/Modules/Registration/FEM/include/itkFEMRegistrationFilter.h +++ b/Modules/Registration/FEM/include/itkFEMRegistrationFilter.h @@ -347,19 +347,7 @@ class ITK_TEMPLATE_EXPORT FEMRegistrationFilter : public ImageToImageFilter