/usr/include/InsightToolkit/Common/itkCellInterface.txx is in libinsighttoolkit3-dev 3.20.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | /*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: itkCellInterface.txx
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Insight Software Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __itkCellInterface_txx
#define __itkCellInterface_txx
#include "itkCellInterface.h"
namespace itk
{
/**
* Get the interpolation order of the cell. Usually linear.
*/
template <typename TPixelType, typename TCellTraits>
unsigned int
CellInterface< TPixelType , TCellTraits >
::GetInterpolationOrder(void) const
{
return 1;
}
/**
* Get the point id list used by the cell in a form suitable to pass to
* SetPointIds(first) on another cell. This is equivalent to
* PointIdsBegin() const.
*/
template <typename TPixelType, typename TCellTraits>
typename CellInterface< TPixelType , TCellTraits >::PointIdConstIterator
CellInterface< TPixelType , TCellTraits >
::GetPointIds(void) const
{
return this->PointIdsBegin();
}
/**
* Return true if the UsingCellsContainer m_UsingCells is nonempty,
* false otherwise. The container m_UsingCells is meant to contain a
* list of all the cells that have this one as part of their boundary.
* Boundary data is not automatically recorded upon mesh creation. If
* the boundary information has not been computed, this method always
* returns false.
*/
template <typename TPixelType, typename TCellTraits>
bool
CellInterface< TPixelType , TCellTraits >
::IsExplicitBoundary(void)
{
return !m_UsingCells.empty();
}
/**
* Register the fact that this cell is a part of the boundary of the
* cell \a cellId, by adding \a cellId to the UsingCellsContainer.
*/
template <typename TPixelType, typename TCellTraits>
void
CellInterface< TPixelType , TCellTraits >
::AddUsingCell(CellIdentifier cellId)
{
m_UsingCells.insert(cellId);
}
/**
* Remove a cell from the UsingCellsContainer.
*/
template <typename TPixelType, typename TCellTraits>
void
CellInterface< TPixelType , TCellTraits >
::RemoveUsingCell(CellIdentifier cellId)
{
m_UsingCells.erase(cellId);
}
/**
* Test if a cell is in the UsingCellsContainer. A result of \c true
* indicates that this cell is part of the boundary of the cell \c
* cellId, assuming that boundary information has been recorded.
*/
template <typename TPixelType, typename TCellTraits>
bool
CellInterface< TPixelType , TCellTraits >
::IsUsingCell(CellIdentifier cellId)
{
return (m_UsingCells.count(cellId) > 0);
}
/**
* Get the number of cells in the UsingCellsContainer.
*/
template <typename TPixelType, typename TCellTraits>
unsigned int
CellInterface< TPixelType , TCellTraits >
::GetNumberOfUsingCells(void)
{
return static_cast<unsigned int>( m_UsingCells.size() );
}
#if !defined(CABLE_CONFIGURATION)
/**
* Get a begin iterator for the UsingCellsContainer.
*/
template <typename TPixelType, typename TCellTraits>
typename CellInterface< TPixelType , TCellTraits >::UsingCellsContainerIterator
CellInterface< TPixelType , TCellTraits >
::UsingCellsBegin(void)
{
return m_UsingCells.begin();
}
/**
* Get an end iterator for the UsingCellsContainer.
*/
template <typename TPixelType, typename TCellTraits>
typename CellInterface< TPixelType , TCellTraits >::UsingCellsContainerIterator
CellInterface< TPixelType , TCellTraits >
::UsingCellsEnd(void)
{
return m_UsingCells.end();
}
#endif
} // end namespace itk
#endif
|