Skip to content

Commit 67a88b4

Browse files
committed
DOC: Remove uses of itk::ImageTraits
Remove uses of `itk::ImageTraits`. Cros-referencing related ITK commits: InsightSoftwareConsortium/ITK@dc9630a InsightSoftwareConsortium/ITK@d775b4d Update the template parameters of `itk::Image` to the current implementation: https://github.com/InsightSoftwareConsortium/ITK/tree/217c0d408487d454cf9b0f945ab5575c2322ee7a
1 parent dea95a7 commit 67a88b4

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

SoftwareGuide/Latex/Appendices/CodingStyleGuide.tex

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,6 @@ \subsection{Naming Classes}
591591
\item \code{ScalarImageRegionIterator}
592592
\item \code{NeighborhoodIterator}
593593
\item \code{MapContainer}
594-
\item \code{DefaultImageTraits}
595594
\item \code{BackwardDifferenceOperator}
596595
\end{itemize}
597596
@@ -1757,10 +1756,16 @@ \subsection{Class Layout}
17571756
#ifndef itkImage_h
17581757
#define itkImage_h
17591758
1760-
#include "itkImageBase.h"
1761-
#include "itkPixelTraits.h"
1762-
#include "itkDefaultImageTraits.h"
1763-
#include "itkDefaultDataAccessor.h"
1759+
#include "itkImageRegion.h"
1760+
#include "itkImportImageContainer.h"
1761+
#include "itkDefaultPixelAccessor.h"
1762+
#include "itkDefaultPixelAccessorFunctor.h"
1763+
#include "itkPoint.h"
1764+
#include "itkFixedArray.h"
1765+
#include "itkWeakPointer.h"
1766+
#include "itkNeighborhoodAccessorFunctor.h"
1767+
1768+
#include <type_traits>
17641769
17651770
namespace itk
17661771
{
@@ -1771,9 +1776,8 @@ \subsection{Class Layout}
17711776
* Detailed documentation...
17721777
*/
17731778
1774-
template< typename TPixel, unsigned int VImageDimension=2,
1775-
typename TImageTraits=DefaultImageTraits< TPixel, VImageDimension > >
1776-
class Image: public ImageBase< VImageDimension >
1779+
template< typename TPixel, unsigned int VImageDimension = 2 >
1780+
class ITK_TEMPLATE_EXPORT Image: public ImageBase< VImageDimension >
17771781
{
17781782
public:
17791783
...
@@ -1910,10 +1914,10 @@ \subsection{Method Definition}
19101914
19111915
\small
19121916
\begin{minted}[baselinestretch=1,fontsize=\footnotesize,linenos=false,bgcolor=ltgray]{cpp}
1913-
template< typename TPixel, unsigned int VImageDimension, typename TImageTraits >
1914-
const double *
1915-
Image< TPixel, VImageDimension, TImageTraits >
1916-
::GetSpacing() const
1917+
template< typename TPixel, unsigned int VImageDimension >
1918+
unsigned int
1919+
Image< TPixel, VImageDimension >
1920+
::GetNumberOfComponentsPerPixel() const
19171921
{
19181922
...
19191923
}
@@ -2406,9 +2410,8 @@ \subsection{Alignment}
24062410
* Detailed documentation...
24072411
*/
24082412
2409-
template< typename TPixel, unsigned int VImageDimension=2,
2410-
typename TImageTraits=DefaultImageTraits< TPixel, VImageDimension > >
2411-
class Image: public ImageBase< VImageDimension >
2413+
template< typename TPixel, unsigned int VImageDimension = 2 >
2414+
class ITK_TEMPLATE_EXPORT Image: public ImageBase< VImageDimension >
24122415
{
24132416
public:
24142417
...
@@ -2440,10 +2443,10 @@ \subsection{Alignment}
24402443
24412444
\small
24422445
\begin{minted}[baselinestretch=1,fontsize=\footnotesize,linenos=false,bgcolor=ltgray]{cpp}
2443-
template< typename TPixel, unsigned int VImageDimension, typename TImageTraits >
2444-
const double *
2445-
Image< TPixel, VImageDimension, TImageTraits >
2446-
::GetSpacing() const
2446+
template< typename TPixel, unsigned int VImageDimension >
2447+
unsigned int
2448+
Image< TPixel, VImageDimension >
2449+
::GetNumberOfComponentsPerPixel() const
24472450
{
24482451
...
24492452
}

0 commit comments

Comments
 (0)