#ifndef itkUnitCubeCCCounter_h #define itkUnitCubeCCCounter_h #include #include "itkUnitCubeNeighbors.h" namespace itk { /** * @brief Functor counting the number of connected components restricted in a * unit cube. This class is used for topological number computation, and * should be mostly useless in any other cases. */ template< typename TConnectivity, typename TNeighborhoodConnectivity = typename NeighborhoodConnectivity::Type > class ITK_EXPORT UnitCubeCCCounter { public : UnitCubeCCCounter(); ~UnitCubeCCCounter(); unsigned int operator()() const; template void SetImage(Iterator imageBegin, Iterator imageEnd); private : template static std::vector CreateConnectivityTest(); static std::vector const m_NeighborhoodConnectivityTest; static std::vector const m_ConnectivityTest; char* m_Image; static UnitCubeNeighbors const m_UnitCubeNeighbors; }; } #ifndef ITK_MANUAL_INSTANTIATION #include "itkUnitCubeCCCounter.txx" #endif #endif // itkUnitCubeCCCounter_h