17 #ifndef __mitkLabelSetImage_H_
18 #define __mitkLabelSetImage_H_
60 virtual
void Initialize(const
mitk::
Image *image) override;
75 void MergeLabel(PixelType targetPixelValue,
unsigned int layer = 0);
83 void MergeLabels(
std::vector<PixelType> &VectorOfLablePixelValues, PixelType index,
unsigned int layer = 0);
87 void UpdateCenterOfMass(PixelType pixelValue,
unsigned int layer = 0);
95 void RemoveLabels(
std::vector<PixelType> &VectorOfLabelPixelValues,
unsigned int layer = 0);
104 void EraseLabel(PixelType pixelValue,
unsigned int layer = 0);
111 void EraseLabels(
std::vector<PixelType> &VectorOfLabelPixelValues,
unsigned int layer = 0);
115 bool ExistLabel(PixelType pixelValue) const;
123 bool ExistLabel(PixelType pixelValue,
unsigned int layer) const;
127 bool ExistLabelSet(
unsigned int layer) const;
134 mitk::
Label *GetActiveLabel(
unsigned int layer = 0);
142 mitk::
Label *GetLabel(PixelType pixelValue,
unsigned int layer = 0) const;
156 const
mitk::
LabelSet *GetLabelSet(
unsigned int layer = 0) const;
162 unsigned int GetActiveLayer() const;
169 unsigned int GetNumberOfLabels(
unsigned int layer = 0) const;
175 unsigned int GetTotalNumberOfLabels() const;
199 void MaskStamp(
mitk::
Image *mask,
bool forceOverwrite);
203 void SetActiveLayer(
unsigned int layer);
207 unsigned int GetNumberOfLayers() const;
236 void AddLabelSetToLayer(const
unsigned int layerIdx, const
mitk::
LabelSet::
Pointer labelSet);
246 mitk::
Image *GetLayerImage(
unsigned int layer);
248 const
mitk::
Image *GetLayerImage(
unsigned int layer) const;
250 void OnLabelSetModified();
256 void SetExteriorLabel(
mitk::
Label *label);
264 const
mitk::
Label *GetExteriorLabel() const;
270 LabelSetImage(const LabelSetImage &other);
271 virtual ~LabelSetImage();
273 template <typename ImageType1, typename ImageType2>
274 void ChangeLayerProcessing(ImageType1 *source, ImageType2 *target);
276 template <typename TPixel,
unsigned int VImageDimension>
277 void LayerContainerToImageProcessing(
itk::
Image<TPixel, VImageDimension> *source,
unsigned int layer);
279 template <typename TPixel,
unsigned int VImageDimension>
280 void ImageToLayerContainerProcessing(
itk::
Image<TPixel, VImageDimension> *source,
unsigned int layer) const;
283 void CalculateCenterOfMassProcessing(
ImageType *input, PixelType index,
unsigned int layer);
286 void ClearBufferProcessing(
ImageType *input);
289 void EraseLabelProcessing(
ImageType *input, PixelType index,
unsigned int layer);
295 void MergeLabelProcessing(
ImageType *input, PixelType pixelValue, PixelType index);
298 void ConcatenateProcessing(
ImageType *input,
mitk::LabelSetImage *other);
306 template <typename LabelSetImageType, typename
ImageType>
307 void InitializeByLabeledImageProcessing(LabelSetImageType *input,
ImageType *other);
314 bool m_activeLayerInvalid;
337 const
mitk::LabelSetImage &rightHandSide,
343 #endif // __mitkLabelSetImage_H_
Base of all data objects.
DataCollection - Class to facilitate loading/accessing structured data.
A data structure describing a label.
#define MITKMULTILABEL_EXPORT
map::core::discrete::Elements< 3 >::InternalImageType ImageType
#define mitkClassMacro(className, SuperClassName)
Image class for storing images.
Event/message/notification class.
mitk::Label::PixelType PixelType
#define mitkCloneMacro(classname)
MITKNEWMODULE_EXPORT bool Equal(mitk::ExampleDataStructure *leftHandSide, mitk::ExampleDataStructure *rightHandSide, mitk::ScalarType eps, bool verbose)
Returns true if the example data structures are considered equal.
LabelSetImage class for handling labels and layers in a segmentation session.
MITKCORE_EXPORT const ScalarType eps