ITK  5.2.0
Insight Toolkit
itkShapeLabelObject.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkShapeLabelObject_h
19 #define itkShapeLabelObject_h
20 
21 #include "itkLabelObject.h"
22 #include "itkLabelMap.h"
23 #include "itkMath.h"
24 #include "itkAffineTransform.h"
25 
26 namespace itk
27 {
43 template <typename TLabel, unsigned int VImageDimension>
44 class ShapeLabelObject : public LabelObject<TLabel, VImageDimension>
45 {
46 public:
47  ITK_DISALLOW_COPY_AND_ASSIGN(ShapeLabelObject);
48 
56 
58  itkNewMacro(Self);
59 
61  itkTypeMacro(ShapeLabelObject, LabelObject);
62 
64 
65  static constexpr unsigned int ImageDimension = VImageDimension;
66 
67  using IndexType = typename Superclass::IndexType;
68 
69  using LabelType = TLabel;
70 
71  using LineType = typename Superclass::LineType;
72 
74 
76 
78  static constexpr AttributeType NUMBER_OF_PIXELS = 100;
79 
83  static constexpr AttributeType PHYSICAL_SIZE = 101;
84 
88  static constexpr AttributeType CENTROID = 104;
89 
90  static constexpr AttributeType BOUNDING_BOX = 105;
91 
98  static constexpr AttributeType NUMBER_OF_PIXELS_ON_BORDER = 106;
99 
107  static constexpr AttributeType PERIMETER_ON_BORDER = 107;
108 
112  static constexpr AttributeType FERET_DIAMETER = 108;
113 
115  static constexpr AttributeType PRINCIPAL_MOMENTS = 109;
116 
118  static constexpr AttributeType PRINCIPAL_AXES = 110;
119 
123  static constexpr AttributeType ELONGATION = 111;
124 
126  static constexpr AttributeType PERIMETER = 112;
127 
128  static constexpr AttributeType ROUNDNESS = 113;
129 
134 
139 
144 
145  static constexpr AttributeType FLATNESS = 117;
146 
147  static constexpr AttributeType PERIMETER_ON_BORDER_RATIO = 118;
148 
149 
153 
154 
163 
164  static AttributeType
165  GetAttributeFromName(const std::string & s)
166  {
167  if (s == "NumberOfPixels")
168  {
169  return NUMBER_OF_PIXELS;
170  }
171  else if (s == "PhysicalSize")
172  {
173  return PHYSICAL_SIZE;
174  }
175  else if (s == "Centroid")
176  {
177  return CENTROID;
178  }
179  else if (s == "BoundingBox")
180  {
181  return BOUNDING_BOX;
182  }
183  else if (s == "NumberOfPixelsOnBorder")
184  {
186  }
187  else if (s == "PerimeterOnBorder")
188  {
189  return PERIMETER_ON_BORDER;
190  }
191  else if (s == "FeretDiameter")
192  {
193  return FERET_DIAMETER;
194  }
195  else if (s == "PrincipalMoments")
196  {
197  return PRINCIPAL_MOMENTS;
198  }
199  else if (s == "PrincipalAxes")
200  {
201  return PRINCIPAL_AXES;
202  }
203  else if (s == "Elongation")
204  {
205  return ELONGATION;
206  }
207  else if (s == "Perimeter")
208  {
209  return PERIMETER;
210  }
211  else if (s == "Roundness")
212  {
213  return ROUNDNESS;
214  }
215  else if (s == "EquivalentSphericalRadius")
216  {
218  }
219  else if (s == "EquivalentSphericalPerimeter")
220  {
222  }
223  else if (s == "EquivalentEllipsoidDiameter")
224  {
226  }
227  else if (s == "Flatness")
228  {
229  return FLATNESS;
230  }
231  else if (s == "PerimeterOnBorderRatio")
232  {
234  }
235  else if (s == "OrientedBoundingBoxOrigin")
236  {
238  }
239  else if (s == "OrientedBoundingBoxSize")
240  {
242  }
243  // can't recognize the name
245  }
246 
247  static std::string
249  {
250  std::string name;
251  switch (a)
252  {
253  case NUMBER_OF_PIXELS:
254  name = "NumberOfPixels";
255  break;
256  case PHYSICAL_SIZE:
257  name = "PhysicalSize";
258  break;
259  case CENTROID:
260  name = "Centroid";
261  break;
262  case BOUNDING_BOX:
263  name = "BoundingBox";
264  break;
266  name = "NumberOfPixelsOnBorder";
267  break;
268  case PERIMETER_ON_BORDER:
269  name = "PerimeterOnBorder";
270  break;
271  case FERET_DIAMETER:
272  name = "FeretDiameter";
273  break;
274  case PRINCIPAL_MOMENTS:
275  name = "PrincipalMoments";
276  break;
277  case PRINCIPAL_AXES:
278  name = "PrincipalAxes";
279  break;
280  case ELONGATION:
281  name = "Elongation";
282  break;
283  case PERIMETER:
284  name = "Perimeter";
285  break;
286  case ROUNDNESS:
287  name = "Roundness";
288  break;
290  name = "EquivalentSphericalRadius";
291  break;
293  name = "EquivalentSphericalPerimeter";
294  break;
296  name = "EquivalentEllipsoidDiameter";
297  break;
298  case FLATNESS:
299  name = "Flatness";
300  break;
302  name = "PerimeterOnBorderRatio";
303  break;
305  name = "OrientedBoundingBoxOrigin";
306  break;
308  name = "OrientedBoundingBoxSize";
309  break;
310  default:
311  // can't recognize the name
313  break;
314  }
315  return name;
316  }
317 
319 
321 
323 
325 
326 public:
328 
330 
332 
335 
336 
337  const RegionType &
339  {
340  return m_BoundingBox;
341  }
342 
343  void
345  {
346  m_BoundingBox = v;
347  }
348 
349  const double &
351  {
352  return m_PhysicalSize;
353  }
354 
355  void
356  SetPhysicalSize(const double & v)
357  {
358  m_PhysicalSize = v;
359  }
360 
361  const SizeValueType &
363  {
364  return m_NumberOfPixels;
365  }
366 
367  void
369  {
370  m_NumberOfPixels = v;
371  }
372 
373  const CentroidType &
374  GetCentroid() const
375  {
376  return m_Centroid;
377  }
378 
379  void
380  SetCentroid(const CentroidType & centroid)
381  {
382  m_Centroid = centroid;
383  }
384 
385  const SizeValueType &
387  {
389  }
390 
391  void
393  {
395  }
396 
397  const double &
399  {
400  return m_PerimeterOnBorder;
401  }
402 
403  void
404  SetPerimeterOnBorder(const double & v)
405  {
407  }
408 
409  const double &
411  {
412  return m_FeretDiameter;
413  }
414 
415  void
416  SetFeretDiameter(const double & v)
417  {
418  m_FeretDiameter = v;
419  }
420 
421  const VectorType &
423  {
424  return m_PrincipalMoments;
425  }
426 
427  void
429  {
430  m_PrincipalMoments = v;
431  }
432 
433  const MatrixType &
435  {
436  return m_PrincipalAxes;
437  }
438 
439  void
441  {
442  m_PrincipalAxes = v;
443  }
444 
445  const double &
447  {
448  return m_Elongation;
449  }
450 
451  void
452  SetElongation(const double & v)
453  {
454  m_Elongation = v;
455  }
456 
457  const double &
458  GetPerimeter() const
459  {
460  return m_Perimeter;
461  }
462 
463  void
464  SetPerimeter(const double & v)
465  {
466  m_Perimeter = v;
467  }
468 
469  const double &
470  GetRoundness() const
471  {
472  return m_Roundness;
473  }
474 
475  void
476  SetRoundness(const double & v)
477  {
478  m_Roundness = v;
479  }
480 
481  const double &
483  {
485  }
486 
487  void
489  {
491  }
492 
493  const double &
495  {
497  }
498 
499  void
501  {
503  }
504 
505  const VectorType &
507  {
509  }
510 
511  void
513  {
515  }
516 
517  const double &
518  GetFlatness() const
519  {
520  return m_Flatness;
521  }
522 
523  void
524  SetFlatness(const double & v)
525  {
526  m_Flatness = v;
527  }
528 
529  const double &
531  {
533  }
534 
535  void
536  SetPerimeterOnBorderRatio(const double & v)
537  {
539  }
540 
543  {
545  }
546 
547  void
549  {
551  }
552 
555  {
557  }
558 
559  void
561  {
563  }
564 
565 
566  // some helper methods - not really required, but really useful!
567 
569  const RegionType &
570  GetRegion() const
571  {
572  return m_BoundingBox;
573  }
574 
575 
580  {
581  return this->GetPrincipalAxes();
582  }
583 
596  {
597  const MatrixType obbToPhysical(this->GetOrientedBoundingBoxDirection().GetTranspose());
598 
599 
601 
602  // Use binary index to map the vertices of the OBB to an array. For
603  // example, in 2D, binary counting will give[0,0], [0,1], [1,0],
604  // [1,1], which corresponds to [minX,minY], [minX,maxY],
605  // [maxX,minY], [maxX,maxY].
606  for (unsigned int i = 0; i < OrientedBoundingBoxVerticesType::Length; ++i)
607  {
608  constexpr unsigned int msb = 1 << (ImageDimension - 1);
610  for (unsigned int j = 0; j < ImageDimension; ++j)
611  {
612  if (i & msb >> j)
613  {
614  offset[j] = m_OrientedBoundingBoxSize[j];
615  }
616  else
617  {
618  offset[j] = 0;
619  }
620  }
621  vertices[i] = m_OrientedBoundingBoxOrigin + obbToPhysical * offset;
622  }
623  return vertices;
624  }
625 
629 
635  {
636  typename AffineTransformType::MatrixType matrix;
637  typename AffineTransformType::OffsetType offset;
638  for (unsigned int i = 0; i < VImageDimension; i++)
639  {
640  offset[i] = m_Centroid[i];
641  for (unsigned int j = 0; j < VImageDimension; j++)
642  {
643  matrix[j][i] = m_PrincipalAxes[i][j]; // Note the transposition
644  }
645  }
647 
649 
650  result->SetMatrix(matrix);
651  result->SetOffset(offset);
652 
653  return result;
654  }
655 
662  {
663  typename AffineTransformType::MatrixType matrix;
664  typename AffineTransformType::OffsetType offset;
665  for (unsigned int i = 0; i < VImageDimension; i++)
666  {
667  offset[i] = m_Centroid[i];
668  for (unsigned int j = 0; j < VImageDimension; j++)
669  {
670  matrix[j][i] = m_PrincipalAxes[i][j]; // Note the transposition
671  }
672  }
674 
676  result->SetMatrix(matrix);
677  result->SetOffset(offset);
678 
680  result->GetInverse(inverse);
681 
682  return inverse;
683  }
684 
685  template <typename TSourceLabelObject>
686  void
687  CopyAttributesFrom(const TSourceLabelObject * src)
688  {
689  Superclass::template CopyAttributesFrom<TSourceLabelObject>(src);
690 
691  m_BoundingBox = src->GetBoundingBox();
692  m_NumberOfPixels = src->GetNumberOfPixels();
693  m_PhysicalSize = src->GetPhysicalSize();
694  m_Centroid = src->GetCentroid();
695  m_NumberOfPixelsOnBorder = src->GetNumberOfPixelsOnBorder();
696  m_PerimeterOnBorder = src->GetPerimeterOnBorder();
697  m_FeretDiameter = src->GetFeretDiameter();
698  m_PrincipalMoments = src->GetPrincipalMoments();
699  m_PrincipalAxes = src->GetPrincipalAxes();
700  m_Elongation = src->GetElongation();
701  m_Perimeter = src->GetPerimeter();
702  m_Roundness = src->GetRoundness();
703  m_EquivalentSphericalRadius = src->GetEquivalentSphericalRadius();
704  m_EquivalentSphericalPerimeter = src->GetEquivalentSphericalPerimeter();
705  m_EquivalentEllipsoidDiameter = src->GetEquivalentEllipsoidDiameter();
706  m_Flatness = src->GetFlatness();
707  m_PerimeterOnBorderRatio = src->GetPerimeterOnBorderRatio();
708  m_OrientedBoundingBoxOrigin = src->GetOrientedBoundingBoxOrigin();
709  m_OrientedBoundingBoxSize = src->GetOrientedBoundingBoxSize();
710  }
711 
712  template <typename TSourceLabelObject>
713  void
714  CopyAllFrom(const TSourceLabelObject * src)
715  {
716  itkAssertOrThrowMacro((src != nullptr), "Null Pointer");
717  this->template CopyLinesFrom<TSourceLabelObject>(src);
718  this->template CopyAttributesFrom<TSourceLabelObject>(src);
719  }
720 
721 protected:
723  {
724  m_NumberOfPixels = 0;
725  m_PhysicalSize = 0;
726  m_Centroid.Fill(0);
729  m_FeretDiameter = 0;
732  m_Elongation = 0;
733  m_Perimeter = 0;
734  m_Roundness = 0;
738  m_Flatness = 0;
742  }
743 
744  void
745  PrintSelf(std::ostream & os, Indent indent) const override
746  {
747  Superclass::PrintSelf(os, indent);
748 
749  os << indent << "NumberOfPixels: " << m_NumberOfPixels << std::endl;
750  os << indent << "PhysicalSize: " << m_PhysicalSize << std::endl;
751  os << indent << "Perimeter: " << m_Perimeter << std::endl;
752  os << indent << "NumberOfPixelsOnBorder: " << m_NumberOfPixelsOnBorder << std::endl;
753  os << indent << "PerimeterOnBorder: " << m_PerimeterOnBorder << std::endl;
754  os << indent << "PerimeterOnBorderRatio: " << m_PerimeterOnBorderRatio << std::endl;
755  os << indent << "Elongation: " << m_Elongation << std::endl;
756  os << indent << "Flatness: " << m_Flatness << std::endl;
757  os << indent << "Roundness: " << m_Roundness << std::endl;
758  os << indent << "Centroid: " << m_Centroid << std::endl;
759  os << indent << "BoundingBox: ";
760  m_BoundingBox.Print(os, indent);
761  os << indent << "EquivalentSphericalRadius: " << m_EquivalentSphericalRadius << std::endl;
762  os << indent << "EquivalentSphericalPerimeter: " << m_EquivalentSphericalPerimeter << std::endl;
763  os << indent << "EquivalentEllipsoidDiameter: " << m_EquivalentEllipsoidDiameter << std::endl;
764  os << indent << "PrincipalMoments: " << m_PrincipalMoments << std::endl;
765  os << indent << "PrincipalAxes: " << std::endl << m_PrincipalAxes;
766  os << indent << "FeretDiameter: " << m_FeretDiameter << std::endl;
767  os << indent << "m_OrientedBoundingBoxSize: " << m_OrientedBoundingBoxSize << std::endl;
768  os << indent << "m_OrientedBoundingBoxOrigin: " << m_OrientedBoundingBoxOrigin << std::endl;
769  }
770 
771 private:
781  double m_Elongation;
782  double m_Perimeter;
783  double m_Roundness;
787  double m_Flatness;
789 
792 };
793 } // end namespace itk
794 
795 #endif
itk::ShapeLabelObject::PRINCIPAL_AXES
static constexpr AttributeType PRINCIPAL_AXES
Definition: itkShapeLabelObject.h:118
itk::ShapeLabelObject::GetBoundingBox
const RegionType & GetBoundingBox() const
Definition: itkShapeLabelObject.h:338
itk::AffineTransform::OffsetType
typename Superclass::OffsetType OffsetType
Definition: itkAffineTransform.h:144
itk::LabelObject::AttributeType
unsigned int AttributeType
Definition: itkLabelObject.h:92
itk::ShapeLabelObject::OrientedBoundingBoxSizeType
Vector< double, VImageDimension > OrientedBoundingBoxSizeType
Definition: itkShapeLabelObject.h:331
itk::ShapeLabelObject::m_FeretDiameter
double m_FeretDiameter
Definition: itkShapeLabelObject.h:778
itk::LabelObject::LengthType
typename LineType::LengthType LengthType
Definition: itkLabelObject.h:91
itk::ShapeLabelObject::GetPrincipalMoments
const VectorType & GetPrincipalMoments() const
Definition: itkShapeLabelObject.h:422
itk::ShapeLabelObject::PERIMETER
static constexpr AttributeType PERIMETER
Definition: itkShapeLabelObject.h:126
itk::Index< VImageDimension >
itk::ShapeLabelObject::CopyAllFrom
void CopyAllFrom(const TSourceLabelObject *src)
Definition: itkShapeLabelObject.h:714
itk::ShapeLabelObject::ELONGATION
static constexpr AttributeType ELONGATION
Definition: itkShapeLabelObject.h:123
itk::ShapeLabelObject::EQUIVALENT_ELLIPSOID_DIAMETER
static constexpr AttributeType EQUIVALENT_ELLIPSOID_DIAMETER
Definition: itkShapeLabelObject.h:143
itk::LabelObject::GetAttributeFromName
static AttributeType GetAttributeFromName(const std::string &s)
itk::Matrix::Fill
void Fill(const T &value)
Definition: itkMatrix.h:199
itk::ShapeLabelObject::m_PerimeterOnBorderRatio
double m_PerimeterOnBorderRatio
Definition: itkShapeLabelObject.h:788
itk::ShapeLabelObject::GetCentroid
const CentroidType & GetCentroid() const
Definition: itkShapeLabelObject.h:374
itk::ShapeLabelObject::SetFlatness
void SetFlatness(const double &v)
Definition: itkShapeLabelObject.h:524
itk::ShapeLabelObject::GetFeretDiameter
const double & GetFeretDiameter() const
Definition: itkShapeLabelObject.h:410
itk::ShapeLabelObject::GetNumberOfPixelsOnBorder
const SizeValueType & GetNumberOfPixelsOnBorder() const
Definition: itkShapeLabelObject.h:386
itk::ShapeLabelObject::m_BoundingBox
RegionType m_BoundingBox
Definition: itkShapeLabelObject.h:772
itk::ShapeLabelObject::SetNumberOfPixelsOnBorder
void SetNumberOfPixelsOnBorder(const SizeValueType &v)
Definition: itkShapeLabelObject.h:392
itk::ShapeLabelObject::GetFlatness
const double & GetFlatness() const
Definition: itkShapeLabelObject.h:518
itk::ImageRegion
An image region represents a structured region of data.
Definition: itkImageRegion.h:69
itk::ShapeLabelObject::GetPrincipalAxesToPhysicalAxesTransform
AffineTransformPointer GetPrincipalAxesToPhysicalAxesTransform() const
Definition: itkShapeLabelObject.h:634
itk::ShapeLabelObject::AffineTransformPointer
typename AffineTransformType::Pointer AffineTransformPointer
Definition: itkShapeLabelObject.h:628
itk::ShapeLabelObject::m_NumberOfPixelsOnBorder
SizeValueType m_NumberOfPixelsOnBorder
Definition: itkShapeLabelObject.h:776
itk::ShapeLabelObject::GetOrientedBoundingBoxDirection
const OrientedBoundingBoxDirectionType & GetOrientedBoundingBoxDirection() const
Definition: itkShapeLabelObject.h:579
itk::Vector< double, VImageDimension >
itk::ShapeLabelObject::EQUIVALENT_SPHERICAL_RADIUS
static constexpr AttributeType EQUIVALENT_SPHERICAL_RADIUS
Definition: itkShapeLabelObject.h:133
itk::ShapeLabelObject::GetNumberOfPixels
const SizeValueType & GetNumberOfPixels() const
Definition: itkShapeLabelObject.h:362
itk::ShapeLabelObject::SetPerimeterOnBorder
void SetPerimeterOnBorder(const double &v)
Definition: itkShapeLabelObject.h:404
itk::ShapeLabelObject::m_PrincipalMoments
VectorType m_PrincipalMoments
Definition: itkShapeLabelObject.h:779
itk::ShapeLabelObject::CopyAttributesFrom
void CopyAttributesFrom(const TSourceLabelObject *src)
Definition: itkShapeLabelObject.h:687
itk::ShapeLabelObject::GetPerimeterOnBorder
const double & GetPerimeterOnBorder() const
Definition: itkShapeLabelObject.h:398
itk::ShapeLabelObject::EQUIVALENT_SPHERICAL_PERIMETER
static constexpr AttributeType EQUIVALENT_SPHERICAL_PERIMETER
Definition: itkShapeLabelObject.h:138
itk::ShapeLabelObject::m_PerimeterOnBorder
double m_PerimeterOnBorder
Definition: itkShapeLabelObject.h:777
itk::ShapeLabelObject::m_Elongation
double m_Elongation
Definition: itkShapeLabelObject.h:781
itk::ShapeLabelObject::GetRegion
const RegionType & GetRegion() const
Definition: itkShapeLabelObject.h:570
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ShapeLabelObject::SetPhysicalSize
void SetPhysicalSize(const double &v)
Definition: itkShapeLabelObject.h:356
itk::ShapeLabelObject::GetEquivalentSphericalPerimeter
const double & GetEquivalentSphericalPerimeter() const
Definition: itkShapeLabelObject.h:494
itkAffineTransform.h
itk::AffineTransform
Definition: itkAffineTransform.h:101
itk::AffineTransform::New
static Pointer New()
itk::AffineTransform::MatrixType
typename Superclass::MatrixType MatrixType
Definition: itkAffineTransform.h:141
itk::ShapeLabelObject::FERET_DIAMETER
static constexpr AttributeType FERET_DIAMETER
Definition: itkShapeLabelObject.h:112
itk::ShapeLabelObject::m_EquivalentEllipsoidDiameter
VectorType m_EquivalentEllipsoidDiameter
Definition: itkShapeLabelObject.h:786
itk::ShapeLabelObject::CENTROID
static constexpr AttributeType CENTROID
Definition: itkShapeLabelObject.h:88
itk::ShapeLabelObject::SetEquivalentEllipsoidDiameter
void SetEquivalentEllipsoidDiameter(const VectorType &v)
Definition: itkShapeLabelObject.h:512
itk::ShapeLabelObject::SetNumberOfPixels
void SetNumberOfPixels(const SizeValueType &v)
Definition: itkShapeLabelObject.h:368
itk::LabelMap
Templated n-dimensional image to store labeled objects.
Definition: itkLabelMap.h:71
itk::ShapeLabelObject::ORIENTED_BOUNDING_BOX_SIZE
static constexpr AttributeType ORIENTED_BOUNDING_BOX_SIZE
Definition: itkShapeLabelObject.h:162
itk::ShapeLabelObject::SetEquivalentSphericalPerimeter
void SetEquivalentSphericalPerimeter(const double &v)
Definition: itkShapeLabelObject.h:500
itk::ShapeLabelObject::m_PhysicalSize
double m_PhysicalSize
Definition: itkShapeLabelObject.h:774
itkLabelMap.h
itk::ShapeLabelObject::SetBoundingBox
void SetBoundingBox(const RegionType &v)
Definition: itkShapeLabelObject.h:344
itk::LabelObject::SizeValueType
itk::SizeValueType SizeValueType
Definition: itkLabelObject.h:93
itk::ShapeLabelObject::GetAttributeFromName
static AttributeType GetAttributeFromName(const std::string &s)
Definition: itkShapeLabelObject.h:165
itk::ShapeLabelObject::GetPerimeterOnBorderRatio
const double & GetPerimeterOnBorderRatio() const
Definition: itkShapeLabelObject.h:530
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::ShapeLabelObject::SetOrientedBoundingBoxOrigin
void SetOrientedBoundingBoxOrigin(const OrientedBoundingBoxPointType &v)
Definition: itkShapeLabelObject.h:548
itk::ShapeLabelObject::m_Roundness
double m_Roundness
Definition: itkShapeLabelObject.h:783
itk::ShapeLabelObject::GetNameFromAttribute
static std::string GetNameFromAttribute(const AttributeType &a)
Definition: itkShapeLabelObject.h:248
itk::LabelObject
The base class for the representation of an labeled binary object in an image.
Definition: itkLabelObject.h:65
itk::ShapeLabelObject::SetRoundness
void SetRoundness(const double &v)
Definition: itkShapeLabelObject.h:476
itk::ShapeLabelObject::SetFeretDiameter
void SetFeretDiameter(const double &v)
Definition: itkShapeLabelObject.h:416
itk::ShapeLabelObject::ImageDimension
static constexpr unsigned int ImageDimension
Definition: itkShapeLabelObject.h:65
itk::ShapeLabelObject::m_Centroid
CentroidType m_Centroid
Definition: itkShapeLabelObject.h:775
itk::ShapeLabelObject::ShapeLabelObject
ShapeLabelObject()
Definition: itkShapeLabelObject.h:722
itk::ShapeLabelObject::GetElongation
const double & GetElongation() const
Definition: itkShapeLabelObject.h:446
itk::ShapeLabelObject::PERIMETER_ON_BORDER_RATIO
static constexpr AttributeType PERIMETER_ON_BORDER_RATIO
Definition: itkShapeLabelObject.h:147
itk::LabelObject::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
itk::ShapeLabelObject::PERIMETER_ON_BORDER
static constexpr AttributeType PERIMETER_ON_BORDER
Definition: itkShapeLabelObject.h:107
itk::ShapeLabelObject::SetOrientedBoundingBoxSize
void SetOrientedBoundingBoxSize(const OrientedBoundingBoxSizeType &v)
Definition: itkShapeLabelObject.h:560
itk::ShapeLabelObject::SetPerimeter
void SetPerimeter(const double &v)
Definition: itkShapeLabelObject.h:464
itk::ShapeLabelObject::GetPerimeter
const double & GetPerimeter() const
Definition: itkShapeLabelObject.h:458
itk::ShapeLabelObject::SetPerimeterOnBorderRatio
void SetPerimeterOnBorderRatio(const double &v)
Definition: itkShapeLabelObject.h:536
itk::ShapeLabelObject::OrientedBoundingBoxPointType
Point< double, VImageDimension > OrientedBoundingBoxPointType
Definition: itkShapeLabelObject.h:329
itk::ShapeLabelObject::m_NumberOfPixels
SizeValueType m_NumberOfPixels
Definition: itkShapeLabelObject.h:773
itk::LabelObject::LabelType
TLabel LabelType
Definition: itkLabelObject.h:89
itk::FixedArray
Simulate a standard C array with copy semantics.
Definition: itkFixedArray.h:52
itkLabelObject.h
itk::ShapeLabelObject::SetPrincipalMoments
void SetPrincipalMoments(const VectorType &v)
Definition: itkShapeLabelObject.h:428
itk::Region::Print
virtual void Print(std::ostream &os, Indent indent=0) const
itk::AffineTransform::Pointer
SmartPointer< Self > Pointer
Definition: itkAffineTransform.h:111
itk::ShapeLabelObject::BOUNDING_BOX
static constexpr AttributeType BOUNDING_BOX
Definition: itkShapeLabelObject.h:90
itk::Matrix< double, VImageDimension, VImageDimension >
itk::LabelObject::LineType
LabelObjectLine< VImageDimension > LineType
Definition: itkLabelObject.h:90
itk::ShapeLabelObject::m_EquivalentSphericalRadius
double m_EquivalentSphericalRadius
Definition: itkShapeLabelObject.h:784
itk::ShapeLabelObject::SetPrincipalAxes
void SetPrincipalAxes(const MatrixType &v)
Definition: itkShapeLabelObject.h:440
itk::ShapeLabelObject::SetCentroid
void SetCentroid(const CentroidType &centroid)
Definition: itkShapeLabelObject.h:380
itk::ShapeLabelObject::PRINCIPAL_MOMENTS
static constexpr AttributeType PRINCIPAL_MOMENTS
Definition: itkShapeLabelObject.h:115
itk::ShapeLabelObject::SetElongation
void SetElongation(const double &v)
Definition: itkShapeLabelObject.h:452
itk::LabelObjectLine
Definition: itkLabelObjectLine.h:43
itk::ShapeLabelObject::m_EquivalentSphericalPerimeter
double m_EquivalentSphericalPerimeter
Definition: itkShapeLabelObject.h:785
itk::ShapeLabelObject::VectorType
Vector< double, VImageDimension > VectorType
Definition: itkShapeLabelObject.h:324
itk::ShapeLabelObject::MatrixType
Matrix< double, VImageDimension, VImageDimension > MatrixType
Definition: itkShapeLabelObject.h:322
itk::ShapeLabelObject::GetOrientedBoundingBoxSize
const OrientedBoundingBoxSizeType & GetOrientedBoundingBoxSize() const
Definition: itkShapeLabelObject.h:554
itk::ShapeLabelObject::ROUNDNESS
static constexpr AttributeType ROUNDNESS
Definition: itkShapeLabelObject.h:128
itk::WeakPointer
Implements a weak reference to an object.
Definition: itkWeakPointer.h:44
itk::ShapeLabelObject::NUMBER_OF_PIXELS_ON_BORDER
static constexpr AttributeType NUMBER_OF_PIXELS_ON_BORDER
Definition: itkShapeLabelObject.h:98
itk::LabelObject::IndexType
Index< VImageDimension > IndexType
Definition: itkLabelObject.h:87
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ShapeLabelObject::m_PrincipalAxes
MatrixType m_PrincipalAxes
Definition: itkShapeLabelObject.h:780
itk::FixedArray::Length
static constexpr unsigned int Length
Definition: itkFixedArray.h:56
itk::ShapeLabelObject::GetPrincipalAxes
const MatrixType & GetPrincipalAxes() const
Definition: itkShapeLabelObject.h:434
itk::ShapeLabelObject
A Label object to store the common attributes related to the shape of the object.
Definition: itkShapeLabelObject.h:44
itk::ShapeLabelObject::RegionType
ImageRegion< VImageDimension > RegionType
Definition: itkShapeLabelObject.h:318
itk::ShapeLabelObject::PHYSICAL_SIZE
static constexpr AttributeType PHYSICAL_SIZE
Definition: itkShapeLabelObject.h:83
itk::ShapeLabelObject::GetPhysicalAxesToPrincipalAxesTransform
AffineTransformPointer GetPhysicalAxesToPrincipalAxesTransform() const
Definition: itkShapeLabelObject.h:661
itk::ShapeLabelObject::GetRoundness
const double & GetRoundness() const
Definition: itkShapeLabelObject.h:470
itk::ShapeLabelObject::FLATNESS
static constexpr AttributeType FLATNESS
Definition: itkShapeLabelObject.h:145
itk::ShapeLabelObject::GetEquivalentSphericalRadius
const double & GetEquivalentSphericalRadius() const
Definition: itkShapeLabelObject.h:482
itk::ShapeLabelObject::m_OrientedBoundingBoxOrigin
OrientedBoundingBoxPointType m_OrientedBoundingBoxOrigin
Definition: itkShapeLabelObject.h:791
itk::ShapeLabelObject::m_Perimeter
double m_Perimeter
Definition: itkShapeLabelObject.h:782
itk::Point< double, VImageDimension >
itk::ShapeLabelObject::CentroidType
Point< double, VImageDimension > CentroidType
Definition: itkShapeLabelObject.h:320
itk::ShapeLabelObject::AttributeType
typename Superclass::AttributeType AttributeType
Definition: itkShapeLabelObject.h:75
itk::ShapeLabelObject::OrientedBoundingBoxDirectionType
MatrixType OrientedBoundingBoxDirectionType
Definition: itkShapeLabelObject.h:327
itk::ShapeLabelObject::m_OrientedBoundingBoxSize
OrientedBoundingBoxSizeType m_OrientedBoundingBoxSize
Definition: itkShapeLabelObject.h:790
itk::ShapeLabelObject::SetEquivalentSphericalRadius
void SetEquivalentSphericalRadius(const double &v)
Definition: itkShapeLabelObject.h:488
itk::LabelObject::GetNameFromAttribute
static std::string GetNameFromAttribute(const AttributeType &a)
itkMath.h
itk::ShapeLabelObject::m_Flatness
double m_Flatness
Definition: itkShapeLabelObject.h:787
itk::ShapeLabelObject::ORIENTED_BOUNDING_BOX_ORIGIN
static constexpr AttributeType ORIENTED_BOUNDING_BOX_ORIGIN
Definition: itkShapeLabelObject.h:152
itk::ShapeLabelObject::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
Definition: itkShapeLabelObject.h:745
itk::LabelObject::LabelObjectType
Self LabelObjectType
Definition: itkLabelObject.h:74
itk::ShapeLabelObject::GetOrientedBoundingBoxVertices
OrientedBoundingBoxVerticesType GetOrientedBoundingBoxVertices() const
Definition: itkShapeLabelObject.h:595
itk::ShapeLabelObject::GetEquivalentEllipsoidDiameter
const VectorType & GetEquivalentEllipsoidDiameter() const
Definition: itkShapeLabelObject.h:506
itk::ShapeLabelObject::NUMBER_OF_PIXELS
static constexpr AttributeType NUMBER_OF_PIXELS
Definition: itkShapeLabelObject.h:78
itk::ShapeLabelObject::GetPhysicalSize
const double & GetPhysicalSize() const
Definition: itkShapeLabelObject.h:350
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83
itk::ShapeLabelObject::OrientedBoundingBoxVerticesType
FixedArray< OrientedBoundingBoxPointType, Math::UnsignedPower< unsigned int >(2, ImageDimension)> OrientedBoundingBoxVerticesType
Definition: itkShapeLabelObject.h:334
itk::FixedArray::Fill
void Fill(const ValueType &)
itk::ShapeLabelObject::GetOrientedBoundingBoxOrigin
const OrientedBoundingBoxPointType & GetOrientedBoundingBoxOrigin() const
Definition: itkShapeLabelObject.h:542