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 {
42 template <typename TLabel, unsigned int VImageDimension>
43 class ShapeLabelObject : public LabelObject<TLabel, VImageDimension>
44 {
45 public:
46  ITK_DISALLOW_COPY_AND_MOVE(ShapeLabelObject);
47 
55 
57  itkNewMacro(Self);
58 
60  itkTypeMacro(ShapeLabelObject, LabelObject);
61 
63 
64  static constexpr unsigned int ImageDimension = VImageDimension;
65 
66  using IndexType = typename Superclass::IndexType;
67 
68  using LabelType = TLabel;
69 
70  using LineType = typename Superclass::LineType;
71 
73 
75 
77  static constexpr AttributeType NUMBER_OF_PIXELS = 100;
78 
82  static constexpr AttributeType PHYSICAL_SIZE = 101;
83 
87  static constexpr AttributeType CENTROID = 104;
88 
89  static constexpr AttributeType BOUNDING_BOX = 105;
90 
97  static constexpr AttributeType NUMBER_OF_PIXELS_ON_BORDER = 106;
98 
106  static constexpr AttributeType PERIMETER_ON_BORDER = 107;
107 
111  static constexpr AttributeType FERET_DIAMETER = 108;
112 
114  static constexpr AttributeType PRINCIPAL_MOMENTS = 109;
115 
117  static constexpr AttributeType PRINCIPAL_AXES = 110;
118 
122  static constexpr AttributeType ELONGATION = 111;
123 
125  static constexpr AttributeType PERIMETER = 112;
126 
127  static constexpr AttributeType ROUNDNESS = 113;
128 
133 
138 
143 
144  static constexpr AttributeType FLATNESS = 117;
145 
146  static constexpr AttributeType PERIMETER_ON_BORDER_RATIO = 118;
147 
148 
152 
153 
162 
163  static AttributeType
164  GetAttributeFromName(const std::string & s)
165  {
166  if (s == "NumberOfPixels")
167  {
168  return NUMBER_OF_PIXELS;
169  }
170  else if (s == "PhysicalSize")
171  {
172  return PHYSICAL_SIZE;
173  }
174  else if (s == "Centroid")
175  {
176  return CENTROID;
177  }
178  else if (s == "BoundingBox")
179  {
180  return BOUNDING_BOX;
181  }
182  else if (s == "NumberOfPixelsOnBorder")
183  {
185  }
186  else if (s == "PerimeterOnBorder")
187  {
188  return PERIMETER_ON_BORDER;
189  }
190  else if (s == "FeretDiameter")
191  {
192  return FERET_DIAMETER;
193  }
194  else if (s == "PrincipalMoments")
195  {
196  return PRINCIPAL_MOMENTS;
197  }
198  else if (s == "PrincipalAxes")
199  {
200  return PRINCIPAL_AXES;
201  }
202  else if (s == "Elongation")
203  {
204  return ELONGATION;
205  }
206  else if (s == "Perimeter")
207  {
208  return PERIMETER;
209  }
210  else if (s == "Roundness")
211  {
212  return ROUNDNESS;
213  }
214  else if (s == "EquivalentSphericalRadius")
215  {
217  }
218  else if (s == "EquivalentSphericalPerimeter")
219  {
221  }
222  else if (s == "EquivalentEllipsoidDiameter")
223  {
225  }
226  else if (s == "Flatness")
227  {
228  return FLATNESS;
229  }
230  else if (s == "PerimeterOnBorderRatio")
231  {
233  }
234  else if (s == "OrientedBoundingBoxOrigin")
235  {
237  }
238  else if (s == "OrientedBoundingBoxSize")
239  {
241  }
242  // can't recognize the name
244  }
245 
246  static std::string
248  {
249  std::string name;
250  switch (a)
251  {
252  case NUMBER_OF_PIXELS:
253  name = "NumberOfPixels";
254  break;
255  case PHYSICAL_SIZE:
256  name = "PhysicalSize";
257  break;
258  case CENTROID:
259  name = "Centroid";
260  break;
261  case BOUNDING_BOX:
262  name = "BoundingBox";
263  break;
265  name = "NumberOfPixelsOnBorder";
266  break;
267  case PERIMETER_ON_BORDER:
268  name = "PerimeterOnBorder";
269  break;
270  case FERET_DIAMETER:
271  name = "FeretDiameter";
272  break;
273  case PRINCIPAL_MOMENTS:
274  name = "PrincipalMoments";
275  break;
276  case PRINCIPAL_AXES:
277  name = "PrincipalAxes";
278  break;
279  case ELONGATION:
280  name = "Elongation";
281  break;
282  case PERIMETER:
283  name = "Perimeter";
284  break;
285  case ROUNDNESS:
286  name = "Roundness";
287  break;
289  name = "EquivalentSphericalRadius";
290  break;
292  name = "EquivalentSphericalPerimeter";
293  break;
295  name = "EquivalentEllipsoidDiameter";
296  break;
297  case FLATNESS:
298  name = "Flatness";
299  break;
301  name = "PerimeterOnBorderRatio";
302  break;
304  name = "OrientedBoundingBoxOrigin";
305  break;
307  name = "OrientedBoundingBoxSize";
308  break;
309  default:
310  // can't recognize the name
312  break;
313  }
314  return name;
315  }
316 
318 
320 
322 
324 
325 public:
327 
329 
331 
334 
335 
336  const RegionType &
338  {
339  return m_BoundingBox;
340  }
341 
342  void
344  {
345  m_BoundingBox = v;
346  }
347 
348  const double &
350  {
351  return m_PhysicalSize;
352  }
353 
354  void
355  SetPhysicalSize(const double & v)
356  {
357  m_PhysicalSize = v;
358  }
359 
360  const SizeValueType &
362  {
363  return m_NumberOfPixels;
364  }
365 
366  void
368  {
369  m_NumberOfPixels = v;
370  }
371 
372  const CentroidType &
373  GetCentroid() const
374  {
375  return m_Centroid;
376  }
377 
378  void
379  SetCentroid(const CentroidType & centroid)
380  {
381  m_Centroid = centroid;
382  }
383 
384  const SizeValueType &
386  {
388  }
389 
390  void
392  {
394  }
395 
396  const double &
398  {
399  return m_PerimeterOnBorder;
400  }
401 
402  void
403  SetPerimeterOnBorder(const double & v)
404  {
406  }
407 
408  const double &
410  {
411  return m_FeretDiameter;
412  }
413 
414  void
415  SetFeretDiameter(const double & v)
416  {
417  m_FeretDiameter = v;
418  }
419 
420  const VectorType &
422  {
423  return m_PrincipalMoments;
424  }
425 
426  void
428  {
429  m_PrincipalMoments = v;
430  }
431 
432  const MatrixType &
434  {
435  return m_PrincipalAxes;
436  }
437 
438  void
440  {
441  m_PrincipalAxes = v;
442  }
443 
444  const double &
446  {
447  return m_Elongation;
448  }
449 
450  void
451  SetElongation(const double & v)
452  {
453  m_Elongation = v;
454  }
455 
456  const double &
457  GetPerimeter() const
458  {
459  return m_Perimeter;
460  }
461 
462  void
463  SetPerimeter(const double & v)
464  {
465  m_Perimeter = v;
466  }
467 
468  const double &
469  GetRoundness() const
470  {
471  return m_Roundness;
472  }
473 
474  void
475  SetRoundness(const double & v)
476  {
477  m_Roundness = v;
478  }
479 
480  const double &
482  {
484  }
485 
486  void
488  {
490  }
491 
492  const double &
494  {
496  }
497 
498  void
500  {
502  }
503 
504  const VectorType &
506  {
508  }
509 
510  void
512  {
514  }
515 
516  const double &
517  GetFlatness() const
518  {
519  return m_Flatness;
520  }
521 
522  void
523  SetFlatness(const double & v)
524  {
525  m_Flatness = v;
526  }
527 
528  const double &
530  {
532  }
533 
534  void
535  SetPerimeterOnBorderRatio(const double & v)
536  {
538  }
539 
542  {
544  }
545 
546  void
548  {
550  }
551 
554  {
556  }
557 
558  void
560  {
562  }
563 
564 
565  // some helper methods - not really required, but really useful!
566 
568  const RegionType &
569  GetRegion() const
570  {
571  return m_BoundingBox;
572  }
573 
574 
579  {
580  return this->GetPrincipalAxes();
581  }
582 
595  {
596  const MatrixType obbToPhysical(this->GetOrientedBoundingBoxDirection().GetTranspose());
597 
598 
600 
601  // Use binary index to map the vertices of the OBB to an array. For
602  // example, in 2D, binary counting will give[0,0], [0,1], [1,0],
603  // [1,1], which corresponds to [minX,minY], [minX,maxY],
604  // [maxX,minY], [maxX,maxY].
605  for (unsigned int i = 0; i < OrientedBoundingBoxVerticesType::Length; ++i)
606  {
607  constexpr unsigned int msb = 1 << (ImageDimension - 1);
609  for (unsigned int j = 0; j < ImageDimension; ++j)
610  {
611  if (i & msb >> j)
612  {
613  offset[j] = m_OrientedBoundingBoxSize[j];
614  }
615  else
616  {
617  offset[j] = 0;
618  }
619  }
620  vertices[i] = m_OrientedBoundingBoxOrigin + obbToPhysical * offset;
621  }
622  return vertices;
623  }
624 
628 
634  {
635  typename AffineTransformType::MatrixType matrix;
636  typename AffineTransformType::OffsetType offset;
637  for (unsigned int i = 0; i < VImageDimension; i++)
638  {
639  offset[i] = m_Centroid[i];
640  for (unsigned int j = 0; j < VImageDimension; j++)
641  {
642  matrix[j][i] = m_PrincipalAxes[i][j]; // Note the transposition
643  }
644  }
646 
648 
649  result->SetMatrix(matrix);
650  result->SetOffset(offset);
651 
652  return result;
653  }
654 
661  {
662  typename AffineTransformType::MatrixType matrix;
663  typename AffineTransformType::OffsetType offset;
664  for (unsigned int i = 0; i < VImageDimension; i++)
665  {
666  offset[i] = m_Centroid[i];
667  for (unsigned int j = 0; j < VImageDimension; j++)
668  {
669  matrix[j][i] = m_PrincipalAxes[i][j]; // Note the transposition
670  }
671  }
673 
675  result->SetMatrix(matrix);
676  result->SetOffset(offset);
677 
679  result->GetInverse(inverse);
680 
681  return inverse;
682  }
683 
684  template <typename TSourceLabelObject>
685  void
686  CopyAttributesFrom(const TSourceLabelObject * src)
687  {
688  Superclass::template CopyAttributesFrom<TSourceLabelObject>(src);
689 
690  m_BoundingBox = src->GetBoundingBox();
691  m_NumberOfPixels = src->GetNumberOfPixels();
692  m_PhysicalSize = src->GetPhysicalSize();
693  m_Centroid = src->GetCentroid();
694  m_NumberOfPixelsOnBorder = src->GetNumberOfPixelsOnBorder();
695  m_PerimeterOnBorder = src->GetPerimeterOnBorder();
696  m_FeretDiameter = src->GetFeretDiameter();
697  m_PrincipalMoments = src->GetPrincipalMoments();
698  m_PrincipalAxes = src->GetPrincipalAxes();
699  m_Elongation = src->GetElongation();
700  m_Perimeter = src->GetPerimeter();
701  m_Roundness = src->GetRoundness();
702  m_EquivalentSphericalRadius = src->GetEquivalentSphericalRadius();
703  m_EquivalentSphericalPerimeter = src->GetEquivalentSphericalPerimeter();
704  m_EquivalentEllipsoidDiameter = src->GetEquivalentEllipsoidDiameter();
705  m_Flatness = src->GetFlatness();
706  m_PerimeterOnBorderRatio = src->GetPerimeterOnBorderRatio();
707  m_OrientedBoundingBoxOrigin = src->GetOrientedBoundingBoxOrigin();
708  m_OrientedBoundingBoxSize = src->GetOrientedBoundingBoxSize();
709  }
710 
711  template <typename TSourceLabelObject>
712  void
713  CopyAllFrom(const TSourceLabelObject * src)
714  {
715  itkAssertOrThrowMacro((src != nullptr), "Null Pointer");
716  this->template CopyLinesFrom<TSourceLabelObject>(src);
717  this->template CopyAttributesFrom<TSourceLabelObject>(src);
718  }
719 
720 protected:
722  {
723  m_NumberOfPixels = 0;
724  m_PhysicalSize = 0;
725  m_Centroid.Fill(0);
728  m_FeretDiameter = 0;
731  m_Elongation = 0;
732  m_Perimeter = 0;
733  m_Roundness = 0;
737  m_Flatness = 0;
741  }
742 
743  void
744  PrintSelf(std::ostream & os, Indent indent) const override
745  {
746  Superclass::PrintSelf(os, indent);
747 
748  os << indent << "NumberOfPixels: " << m_NumberOfPixels << std::endl;
749  os << indent << "PhysicalSize: " << m_PhysicalSize << std::endl;
750  os << indent << "Perimeter: " << m_Perimeter << std::endl;
751  os << indent << "NumberOfPixelsOnBorder: " << m_NumberOfPixelsOnBorder << std::endl;
752  os << indent << "PerimeterOnBorder: " << m_PerimeterOnBorder << std::endl;
753  os << indent << "PerimeterOnBorderRatio: " << m_PerimeterOnBorderRatio << std::endl;
754  os << indent << "Elongation: " << m_Elongation << std::endl;
755  os << indent << "Flatness: " << m_Flatness << std::endl;
756  os << indent << "Roundness: " << m_Roundness << std::endl;
757  os << indent << "Centroid: " << m_Centroid << std::endl;
758  os << indent << "BoundingBox: ";
759  m_BoundingBox.Print(os, indent);
760  os << indent << "EquivalentSphericalRadius: " << m_EquivalentSphericalRadius << std::endl;
761  os << indent << "EquivalentSphericalPerimeter: " << m_EquivalentSphericalPerimeter << std::endl;
762  os << indent << "EquivalentEllipsoidDiameter: " << m_EquivalentEllipsoidDiameter << std::endl;
763  os << indent << "PrincipalMoments: " << m_PrincipalMoments << std::endl;
764  os << indent << "PrincipalAxes: " << std::endl << m_PrincipalAxes;
765  os << indent << "FeretDiameter: " << m_FeretDiameter << std::endl;
766  os << indent << "m_OrientedBoundingBoxSize: " << m_OrientedBoundingBoxSize << std::endl;
767  os << indent << "m_OrientedBoundingBoxOrigin: " << m_OrientedBoundingBoxOrigin << std::endl;
768  }
769 
770 private:
780  double m_Elongation;
781  double m_Perimeter;
782  double m_Roundness;
786  double m_Flatness;
788 
791 };
792 } // end namespace itk
793 
794 #endif
itk::ShapeLabelObject::PRINCIPAL_AXES
static constexpr AttributeType PRINCIPAL_AXES
Definition: itkShapeLabelObject.h:117
itk::ShapeLabelObject::GetBoundingBox
const RegionType & GetBoundingBox() const
Definition: itkShapeLabelObject.h:337
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:330
itk::ShapeLabelObject::m_FeretDiameter
double m_FeretDiameter
Definition: itkShapeLabelObject.h:777
itk::LabelObject::LengthType
typename LineType::LengthType LengthType
Definition: itkLabelObject.h:91
itk::ShapeLabelObject::GetPrincipalMoments
const VectorType & GetPrincipalMoments() const
Definition: itkShapeLabelObject.h:421
itk::ShapeLabelObject::PERIMETER
static constexpr AttributeType PERIMETER
Definition: itkShapeLabelObject.h:125
itk::Index< VImageDimension >
itk::ShapeLabelObject::CopyAllFrom
void CopyAllFrom(const TSourceLabelObject *src)
Definition: itkShapeLabelObject.h:713
itk::ShapeLabelObject::ELONGATION
static constexpr AttributeType ELONGATION
Definition: itkShapeLabelObject.h:122
itk::ShapeLabelObject::EQUIVALENT_ELLIPSOID_DIAMETER
static constexpr AttributeType EQUIVALENT_ELLIPSOID_DIAMETER
Definition: itkShapeLabelObject.h:142
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:787
itk::ShapeLabelObject::GetCentroid
const CentroidType & GetCentroid() const
Definition: itkShapeLabelObject.h:373
itk::ShapeLabelObject::SetFlatness
void SetFlatness(const double &v)
Definition: itkShapeLabelObject.h:523
itk::ShapeLabelObject::GetFeretDiameter
const double & GetFeretDiameter() const
Definition: itkShapeLabelObject.h:409
itk::ShapeLabelObject::GetNumberOfPixelsOnBorder
const SizeValueType & GetNumberOfPixelsOnBorder() const
Definition: itkShapeLabelObject.h:385
itk::ShapeLabelObject::m_BoundingBox
RegionType m_BoundingBox
Definition: itkShapeLabelObject.h:771
itk::ShapeLabelObject::SetNumberOfPixelsOnBorder
void SetNumberOfPixelsOnBorder(const SizeValueType &v)
Definition: itkShapeLabelObject.h:391
itk::ShapeLabelObject::GetFlatness
const double & GetFlatness() const
Definition: itkShapeLabelObject.h:517
itk::ImageRegion
An image region represents a structured region of data.
Definition: itkImageRegion.h:69
itk::ShapeLabelObject::GetPrincipalAxesToPhysicalAxesTransform
AffineTransformPointer GetPrincipalAxesToPhysicalAxesTransform() const
Definition: itkShapeLabelObject.h:633
itk::ShapeLabelObject::AffineTransformPointer
typename AffineTransformType::Pointer AffineTransformPointer
Definition: itkShapeLabelObject.h:627
itk::ShapeLabelObject::m_NumberOfPixelsOnBorder
SizeValueType m_NumberOfPixelsOnBorder
Definition: itkShapeLabelObject.h:775
itk::ShapeLabelObject::GetOrientedBoundingBoxDirection
const OrientedBoundingBoxDirectionType & GetOrientedBoundingBoxDirection() const
Definition: itkShapeLabelObject.h:578
itk::Vector< double, VImageDimension >
itk::ShapeLabelObject::EQUIVALENT_SPHERICAL_RADIUS
static constexpr AttributeType EQUIVALENT_SPHERICAL_RADIUS
Definition: itkShapeLabelObject.h:132
itk::ShapeLabelObject::GetNumberOfPixels
const SizeValueType & GetNumberOfPixels() const
Definition: itkShapeLabelObject.h:361
itk::ShapeLabelObject::SetPerimeterOnBorder
void SetPerimeterOnBorder(const double &v)
Definition: itkShapeLabelObject.h:403
itk::ShapeLabelObject::m_PrincipalMoments
VectorType m_PrincipalMoments
Definition: itkShapeLabelObject.h:778
itk::ShapeLabelObject::CopyAttributesFrom
void CopyAttributesFrom(const TSourceLabelObject *src)
Definition: itkShapeLabelObject.h:686
itk::ShapeLabelObject::GetPerimeterOnBorder
const double & GetPerimeterOnBorder() const
Definition: itkShapeLabelObject.h:397
itk::ShapeLabelObject::EQUIVALENT_SPHERICAL_PERIMETER
static constexpr AttributeType EQUIVALENT_SPHERICAL_PERIMETER
Definition: itkShapeLabelObject.h:137
itk::ShapeLabelObject::m_PerimeterOnBorder
double m_PerimeterOnBorder
Definition: itkShapeLabelObject.h:776
itk::ShapeLabelObject::m_Elongation
double m_Elongation
Definition: itkShapeLabelObject.h:780
itk::ShapeLabelObject::GetRegion
const RegionType & GetRegion() const
Definition: itkShapeLabelObject.h:569
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:355
itk::ShapeLabelObject::GetEquivalentSphericalPerimeter
const double & GetEquivalentSphericalPerimeter() const
Definition: itkShapeLabelObject.h:493
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:111
itk::ShapeLabelObject::m_EquivalentEllipsoidDiameter
VectorType m_EquivalentEllipsoidDiameter
Definition: itkShapeLabelObject.h:785
itk::ShapeLabelObject::CENTROID
static constexpr AttributeType CENTROID
Definition: itkShapeLabelObject.h:87
itk::ShapeLabelObject::SetEquivalentEllipsoidDiameter
void SetEquivalentEllipsoidDiameter(const VectorType &v)
Definition: itkShapeLabelObject.h:511
itk::ShapeLabelObject::SetNumberOfPixels
void SetNumberOfPixels(const SizeValueType &v)
Definition: itkShapeLabelObject.h:367
itk::LabelMap
Templated n-dimensional image to store labeled objects.
Definition: itkLabelMap.h:70
itk::ShapeLabelObject::ORIENTED_BOUNDING_BOX_SIZE
static constexpr AttributeType ORIENTED_BOUNDING_BOX_SIZE
Definition: itkShapeLabelObject.h:161
itk::ShapeLabelObject::SetEquivalentSphericalPerimeter
void SetEquivalentSphericalPerimeter(const double &v)
Definition: itkShapeLabelObject.h:499
itk::ShapeLabelObject::m_PhysicalSize
double m_PhysicalSize
Definition: itkShapeLabelObject.h:773
itkLabelMap.h
itk::ShapeLabelObject::SetBoundingBox
void SetBoundingBox(const RegionType &v)
Definition: itkShapeLabelObject.h:343
itk::LabelObject::SizeValueType
itk::SizeValueType SizeValueType
Definition: itkLabelObject.h:93
itk::ShapeLabelObject::GetAttributeFromName
static AttributeType GetAttributeFromName(const std::string &s)
Definition: itkShapeLabelObject.h:164
itk::ShapeLabelObject::GetPerimeterOnBorderRatio
const double & GetPerimeterOnBorderRatio() const
Definition: itkShapeLabelObject.h:529
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:547
itk::ShapeLabelObject::m_Roundness
double m_Roundness
Definition: itkShapeLabelObject.h:782
itk::ShapeLabelObject::GetNameFromAttribute
static std::string GetNameFromAttribute(const AttributeType &a)
Definition: itkShapeLabelObject.h:247
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:475
itk::ShapeLabelObject::SetFeretDiameter
void SetFeretDiameter(const double &v)
Definition: itkShapeLabelObject.h:415
itk::ShapeLabelObject::ImageDimension
static constexpr unsigned int ImageDimension
Definition: itkShapeLabelObject.h:64
itk::ShapeLabelObject::m_Centroid
CentroidType m_Centroid
Definition: itkShapeLabelObject.h:774
itk::ShapeLabelObject::ShapeLabelObject
ShapeLabelObject()
Definition: itkShapeLabelObject.h:721
itk::ShapeLabelObject::GetElongation
const double & GetElongation() const
Definition: itkShapeLabelObject.h:445
itk::ShapeLabelObject::PERIMETER_ON_BORDER_RATIO
static constexpr AttributeType PERIMETER_ON_BORDER_RATIO
Definition: itkShapeLabelObject.h:146
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:106
itk::ShapeLabelObject::SetOrientedBoundingBoxSize
void SetOrientedBoundingBoxSize(const OrientedBoundingBoxSizeType &v)
Definition: itkShapeLabelObject.h:559
itk::ShapeLabelObject::SetPerimeter
void SetPerimeter(const double &v)
Definition: itkShapeLabelObject.h:463
itk::ShapeLabelObject::GetPerimeter
const double & GetPerimeter() const
Definition: itkShapeLabelObject.h:457
itk::ShapeLabelObject::SetPerimeterOnBorderRatio
void SetPerimeterOnBorderRatio(const double &v)
Definition: itkShapeLabelObject.h:535
itk::ShapeLabelObject::OrientedBoundingBoxPointType
Point< double, VImageDimension > OrientedBoundingBoxPointType
Definition: itkShapeLabelObject.h:328
itk::ShapeLabelObject::m_NumberOfPixels
SizeValueType m_NumberOfPixels
Definition: itkShapeLabelObject.h:772
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:427
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:89
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:783
itk::ShapeLabelObject::SetPrincipalAxes
void SetPrincipalAxes(const MatrixType &v)
Definition: itkShapeLabelObject.h:439
itk::ShapeLabelObject::SetCentroid
void SetCentroid(const CentroidType &centroid)
Definition: itkShapeLabelObject.h:379
itk::ShapeLabelObject::PRINCIPAL_MOMENTS
static constexpr AttributeType PRINCIPAL_MOMENTS
Definition: itkShapeLabelObject.h:114
itk::ShapeLabelObject::SetElongation
void SetElongation(const double &v)
Definition: itkShapeLabelObject.h:451
itk::LabelObjectLine
Definition: itkLabelObjectLine.h:42
itk::ShapeLabelObject::m_EquivalentSphericalPerimeter
double m_EquivalentSphericalPerimeter
Definition: itkShapeLabelObject.h:784
itk::ShapeLabelObject::VectorType
Vector< double, VImageDimension > VectorType
Definition: itkShapeLabelObject.h:323
itk::ShapeLabelObject::MatrixType
Matrix< double, VImageDimension, VImageDimension > MatrixType
Definition: itkShapeLabelObject.h:321
itk::ShapeLabelObject::GetOrientedBoundingBoxSize
const OrientedBoundingBoxSizeType & GetOrientedBoundingBoxSize() const
Definition: itkShapeLabelObject.h:553
itk::ShapeLabelObject::ROUNDNESS
static constexpr AttributeType ROUNDNESS
Definition: itkShapeLabelObject.h:127
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:97
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:779
itk::FixedArray::Length
static constexpr unsigned int Length
Definition: itkFixedArray.h:56
itk::ShapeLabelObject::GetPrincipalAxes
const MatrixType & GetPrincipalAxes() const
Definition: itkShapeLabelObject.h:433
itk::ShapeLabelObject
A Label object to store the common attributes related to the shape of the object.
Definition: itkShapeLabelObject.h:43
itk::ShapeLabelObject::RegionType
ImageRegion< VImageDimension > RegionType
Definition: itkShapeLabelObject.h:317
itk::ShapeLabelObject::PHYSICAL_SIZE
static constexpr AttributeType PHYSICAL_SIZE
Definition: itkShapeLabelObject.h:82
itk::ShapeLabelObject::GetPhysicalAxesToPrincipalAxesTransform
AffineTransformPointer GetPhysicalAxesToPrincipalAxesTransform() const
Definition: itkShapeLabelObject.h:660
itk::ShapeLabelObject::GetRoundness
const double & GetRoundness() const
Definition: itkShapeLabelObject.h:469
itk::ShapeLabelObject::FLATNESS
static constexpr AttributeType FLATNESS
Definition: itkShapeLabelObject.h:144
itk::ShapeLabelObject::GetEquivalentSphericalRadius
const double & GetEquivalentSphericalRadius() const
Definition: itkShapeLabelObject.h:481
itk::ShapeLabelObject::m_OrientedBoundingBoxOrigin
OrientedBoundingBoxPointType m_OrientedBoundingBoxOrigin
Definition: itkShapeLabelObject.h:790
itk::ShapeLabelObject::m_Perimeter
double m_Perimeter
Definition: itkShapeLabelObject.h:781
itk::Point< double, VImageDimension >
itk::ShapeLabelObject::CentroidType
Point< double, VImageDimension > CentroidType
Definition: itkShapeLabelObject.h:319
itk::ShapeLabelObject::AttributeType
typename Superclass::AttributeType AttributeType
Definition: itkShapeLabelObject.h:74
itk::ShapeLabelObject::OrientedBoundingBoxDirectionType
MatrixType OrientedBoundingBoxDirectionType
Definition: itkShapeLabelObject.h:326
itk::ShapeLabelObject::m_OrientedBoundingBoxSize
OrientedBoundingBoxSizeType m_OrientedBoundingBoxSize
Definition: itkShapeLabelObject.h:789
itk::ShapeLabelObject::SetEquivalentSphericalRadius
void SetEquivalentSphericalRadius(const double &v)
Definition: itkShapeLabelObject.h:487
itk::LabelObject::GetNameFromAttribute
static std::string GetNameFromAttribute(const AttributeType &a)
itkMath.h
itk::ShapeLabelObject::m_Flatness
double m_Flatness
Definition: itkShapeLabelObject.h:786
itk::ShapeLabelObject::ORIENTED_BOUNDING_BOX_ORIGIN
static constexpr AttributeType ORIENTED_BOUNDING_BOX_ORIGIN
Definition: itkShapeLabelObject.h:151
itk::ShapeLabelObject::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
Definition: itkShapeLabelObject.h:744
itk::LabelObject::LabelObjectType
Self LabelObjectType
Definition: itkLabelObject.h:74
itk::ShapeLabelObject::GetOrientedBoundingBoxVertices
OrientedBoundingBoxVerticesType GetOrientedBoundingBoxVertices() const
Definition: itkShapeLabelObject.h:594
itk::ShapeLabelObject::GetEquivalentEllipsoidDiameter
const VectorType & GetEquivalentEllipsoidDiameter() const
Definition: itkShapeLabelObject.h:505
itk::ShapeLabelObject::NUMBER_OF_PIXELS
static constexpr AttributeType NUMBER_OF_PIXELS
Definition: itkShapeLabelObject.h:77
itk::ShapeLabelObject::GetPhysicalSize
const double & GetPhysicalSize() const
Definition: itkShapeLabelObject.h:349
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83
itk::ShapeLabelObject::OrientedBoundingBoxVerticesType
FixedArray< OrientedBoundingBoxPointType, Math::UnsignedPower< unsigned int >(2, ImageDimension)> OrientedBoundingBoxVerticesType
Definition: itkShapeLabelObject.h:333
itk::FixedArray::Fill
void Fill(const ValueType &)
itk::ShapeLabelObject::GetOrientedBoundingBoxOrigin
const OrientedBoundingBoxPointType & GetOrientedBoundingBoxOrigin() const
Definition: itkShapeLabelObject.h:541