17 #ifndef itkAnalyzeObjectMap_h
18 #define itkAnalyzeObjectMap_h
45 template <
class TImage = itk::Image<
unsigned char, 4>,
class TRGBImage = itk::Image<itk::RGBPixel<
unsigned char>, 4> >
52 class AnalyzeObjectMap :
public TImage
57 using Self = AnalyzeObjectMap;
58 using Superclass = TImage;
59 using Pointer = SmartPointer<Self>;
60 using ConstPointer = SmartPointer<const Self>;
62 using ImageType = TImage;
63 using ObjectMapType = itk::AnalyzeObjectMap<TImage>;
65 using PixelType =
typename TImage::PixelType;
71 itkTypeMacro(AnalyzeObjectMap, TImage );
78 AnalyzeObjectMap & operator=(
const AnalyzeObjectMap & rhs );
92 itkSetMacro(NumberOfObjects,
int);
93 itkGetConstMacro(NumberOfObjects,
int);
107 typename itk::AnalyzeObjectMap<TImage>::Pointer PickOneEntry(
const int numberOfEntry = -1);
118 typename TRGBImage::Pointer ObjectMapToRGBImage();
127 void AddObjectEntryBasedOnImagePixel(ImageType *Image,
const int value = -1,
const std::string ObjectName =
"",
128 const int Red = 0,
const int Green = 0,
const int Blue = 0);
135 void AddAnalyzeObjectEntry(
const std::string ObjectName =
"");
145 void DeleteAnalyzeObjectEntry(
const std::string ObjectName =
"");
154 int FindObjectEntry(
const std::string ObjectName =
"");
162 void PlaceObjectMapEntriesIntoMetaData();
185 void ImageToObjectMap(ImageType *image);
191 AnalyzeObjectMap(
void );
196 ~AnalyzeObjectMap(
void )
override;
202 AnalyzeObjectMap(
const AnalyzeObjectMap & );
204 void PrintSelf(std::ostream& os, Indent indent)
const override;
208 int m_NumberOfObjects;
SmartPointer< Self > Pointer
static const int VERSION4
const char *const ANALYZE_OBJECT_LABEL_MAP_ENTRY_ARRAY
static const int VERSION5
static const int VERSION7
static const int VERSION6
std::vector< AnalyzeObjectEntry::Pointer > AnalyzeObjectEntryArrayType