18#ifndef itkLabelGeometryImageFilter_h
19#define itkLabelGeometryImageFilter_h
27#include "vnl/algo/vnl_symmetric_eigensystem.h"
28#include "vnl/vnl_det.h"
80template <
typename TLabelImage,
typename TIntensityImage = TLabelImage>
81class ITK_TEMPLATE_EXPORT
82#if !defined(ITK_LEGACY_SILENT)
83 [[deprecated(
"This class contains known computational bugs. See class documentation for details.")]]
106 using SizeType =
typename TIntensityImage::SizeType;
174 for (
unsigned int i = 0; i < imageDimension * 2; i += 2)
251 using MapType = std::map<LabelPixelType, LabelGeometry>;
252 using MapIterator =
typename std::map<LabelPixelType, LabelGeometry>::iterator;
256 itkGetMacro(CalculatePixelIndices,
bool);
257 itkBooleanMacro(CalculatePixelIndices);
283 itkGetMacro(CalculateOrientedBoundingBox,
bool);
284 itkBooleanMacro(CalculateOrientedBoundingBox);
302 itkGetMacro(CalculateOrientedLabelRegions,
bool);
303 itkBooleanMacro(CalculateOrientedLabelRegions);
321 itkGetMacro(CalculateOrientedIntensityRegions,
bool);
322 itkBooleanMacro(CalculateOrientedIntensityRegions);
345 this->
SetNthInput(1,
const_cast<TIntensityImage *
>(input));
349 const TIntensityImage *
377 std::vector<LabelPixelType>
519#ifndef ITK_MANUAL_INSTANTIATION
520# include "itkLabelGeometryImageFilter.hxx"
Base class for all data objects in ITK.
SmartPointer< Self > Pointer
Simulate a standard C array with copy semantics.
Control indentation during Print() invocation.
Geometry stored per label.
MatrixType m_Eigenvectors
LabelIndicesType m_PixelIndices
SizeValueType m_FirstOrderRawCrossMoment
MatrixType m_SecondOrderCentralMoments
SizeValueType m_ZeroOrderMoment
RealType m_OrientedBoundingBoxVolume
LabelPointType m_OrientedBoundingBoxSize
MatrixType m_RotationMatrix
RealType m_BoundingBoxVolume
FixedArray< float, Self::ImageDimension > m_AxesLength
AxesLengthType m_FirstOrderWeightedRawMoments
LabelSizeType m_BoundingBoxSize
LabelPointType m_Centroid
IntensityImageType::Pointer m_OrientedIntensityImage
RealType m_FirstOrderCentralCrossMoment
LabelPointType m_OrientedBoundingBoxOrigin
LabelImageType::Pointer m_OrientedLabelImage
BoundingBoxVerticesType m_OrientedBoundingBoxVertices
MatrixType m_SecondOrderRawMoments
BoundingBoxType m_BoundingBox
LabelPointType m_WeightedCentroid
IndexArrayType m_FirstOrderRawMoments
typename TLabelImage::RegionType LabelRegionType
void SetCalculateOrientedIntensityRegions(const bool value)
RealType GetMajorAxisLength(LabelPixelType label) const
const TIntensityImage * GetIntensityInput() const
RealType GetElongation(LabelPixelType label) const
SmartPointer< const Self > ConstPointer
bool m_CalculatePixelIndices
typename std::map< LabelPixelType, LabelGeometry >::iterator MapIterator
LabelSizeType GetBoundingBoxSize(LabelPixelType label) const
VectorType GetEigenvalues(LabelPixelType label) const
typename TLabelImage::SizeType LabelSizeType
typename TIntensityImage::SizeType SizeType
bool m_CalculateOrientedLabelRegions
MapType m_LabelGeometryMapper
typename TIntensityImage::Pointer InputImagePointer
void GenerateData() override
typename DataObject::Pointer DataObjectPointer
ImageToImageFilter< TLabelImage, TIntensityImage > Superclass
RealType GetEccentricity(LabelPixelType label) const
LabelGeometry m_LabelGeometry
std::vector< double > VectorType
SimpleDataObjectDecorator< RealType > RealObjectType
TIntensityImage IntensityImageType
void SetCalculateOrientedBoundingBox(const bool value)
itk::FixedArray< typename LabelIndexType::IndexValueType, Self::ImageDimension > IndexArrayType
typename TIntensityImage::PixelType PixelType
typename TLabelImage::Pointer LabelImagePointer
LabelPointType GetCentroid(LabelPixelType label) const
void PrintSelf(std::ostream &os, Indent indent) const override
BoundingBoxVerticesType GetOrientedBoundingBoxVertices(LabelPixelType label) const
bool m_CalculateOrientedBoundingBox
std::vector< LabelPixelType > LabelsType
LabelIndicesType GetPixelIndices(LabelPixelType label) const
typename TLabelImage::PixelType LabelPixelType
bool CalculateOrientedBoundingBoxVertices(vnl_symmetric_eigensystem< double > eig, LabelGeometry &m_LabelGeometry)
LabelGeometryImageFilter Self
std::vector< LabelPixelType > GetLabels() const
std::vector< LabelPointType > BoundingBoxVerticesType
RealType GetIntegratedIntensity(LabelPixelType label) const
void SetCalculatePixelIndices(const bool value)
SizeValueType GetVolume(LabelPixelType label) const
MatrixType GetRotationMatrix(LabelPixelType label) const
SizeValueType GetNumberOfObjects() const
AxesLengthType GetAxesLength(LabelPixelType label) const
typename TIntensityImage::IndexType IndexType
itk::FixedArray< float, Self::ImageDimension *2 > BoundingBoxFloatType
RealType GetBoundingBoxVolume(LabelPixelType label) const
TLabelImage * GetOrientedLabelImage(LabelPixelType label) const
bool HasLabel(LabelPixelType label) const
LabelPointType GetWeightedCentroid(LabelPixelType label) const
itk::FixedArray< typename LabelIndexType::IndexValueType, Self::ImageDimension *2 > BoundingBoxType
TIntensityImage * GetOrientedIntensityImage(LabelPixelType label) const
SizeValueType GetNumberOfLabels() const
typename TIntensityImage::RegionType RegionType
RealType GetOrientedBoundingBoxVolume(LabelPixelType label) const
vnl_matrix< double > MatrixType
RealType GetMinorAxisLength(LabelPixelType label) const
MatrixType GetEigenvectors(LabelPixelType label) const
itk::FixedArray< RealType, Self::ImageDimension > AxesLengthType
BoundingBoxType GetBoundingBox(LabelPixelType label) const
LabelGeometryImageFilter()
typename TLabelImage::PointType LabelPointType
static constexpr unsigned int ImageDimension
LabelPointType GetOrientedBoundingBoxSize(LabelPixelType label) const
std::vector< LabelIndexType > LabelIndicesType
bool m_CalculateOrientedIntensityRegions
typename TLabelImage::IndexType LabelIndexType
typename std::map< LabelPixelType, LabelGeometry >::const_iterator MapConstIterator
std::map< LabelPixelType, LabelGeometry > MapType
void SetIntensityInput(const TIntensityImage *input)
~LabelGeometryImageFilter() override=default
LabelPointType GetOrientedBoundingBoxOrigin(LabelPixelType label) const
TLabelImage LabelImageType
void SetCalculateOrientedLabelRegions(const bool value)
RealType GetOrientation(LabelPixelType label) const
typename NumericTraits< PixelType >::RealType RealType
SmartPointer< Self > Pointer
RegionType GetRegion(LabelPixelType label) const
static constexpr T NonpositiveMin()
static constexpr T max(const T &)
virtual void Modified() const
virtual void SetNthInput(DataObjectPointerArraySizeType idx, DataObject *input)
DataObject * GetInput(const DataObjectIdentifierType &key)
Return an input.
Decorates any "simple" data type (data types without smart pointers) with a DataObject API.
Implements transparent reference counting.
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType