#ifndef UnitCubeCCCounter_h #define UnitCubeCCCounter_h #include #include "UnitCubeNeighbors.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 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; }; } #include "UnitCubeCCCounter.txx" #endif // UnitCubeCCCounter_h