13 #ifndef mitkLabelSetImage_h
14 #define mitkLabelSetImage_h
148 itkGetConstMacro(UnlabeledLabelLock,
bool);
149 itkSetMacro(UnlabeledLabelLock,
bool);
150 itkBooleanMacro(UnlabeledLabelLock);
279 bool m_UnlabeledLabelLock;
285 void UpdateCenterOfMass(
PixelType pixelValue);
299 void Initialize(
const mitk::Image *image)
override;
312 void MergeLabel(
PixelType pixelValue,
PixelType sourcePixelValue,
unsigned int layer = 0);
321 void MergeLabels(
PixelType pixelValue,
const std::vector<PixelType>& vectorOfSourcePixelValues,
unsigned int layer = 0);
325 void UpdateCenterOfMass(
PixelType pixelValue,
unsigned int layer);
340 void EraseLabels(
const std::vector<PixelType> &VectorOfLabelPixelValues);
359 DEPRECATED(
bool ExistLabelSet(
unsigned int layer)
const);
400 unsigned int GetActiveLayer()
const;
407 unsigned int GetNumberOfLabels(
unsigned int layer = 0)
const;
413 unsigned int GetTotalNumberOfLabels()
const;
437 void MaskStamp(
mitk::Image *mask,
bool forceOverwrite);
441 void SetActiveLayer(
unsigned int layer);
445 unsigned int GetNumberOfLayers()
const;
452 unsigned int AddLayer(mitk::LabelSet::Pointer labelSet =
nullptr);
460 unsigned int AddLayer(
mitk::Image::Pointer layerImage, mitk::LabelSet::Pointer labelSet =
nullptr);
477 void AddLabelSetToLayer(
const unsigned int layerIdx,
const mitk::LabelSet* labelSet);
489 const mitk::Image *GetLayerImage(
unsigned int layer)
const;
491 void OnLabelSetModified();
500 template <
typename TPixel,
unsigned int VImageDimension>
501 void LayerContainerToImageProcessing(itk::Image<TPixel, VImageDimension> *source,
unsigned int layer);
503 template <
typename TPixel,
unsigned int VImageDimension>
504 void ImageToLayerContainerProcessing(itk::Image<TPixel, VImageDimension> *source,
unsigned int layer)
const;
506 template <
typename ImageType>
507 void CalculateCenterOfMassProcessing(ImageType *input,
PixelType index,
unsigned int layer);
509 template <
typename ImageType>
510 void ClearBufferProcessing(ImageType *input);
512 template <
typename ImageType>
513 void EraseLabelProcessing(ImageType *input,
PixelType index);
515 template <
typename ImageType>
518 template <
typename ImageType>
519 void MaskStampProcessing(ImageType *input,
mitk::Image *mask,
bool forceOverwrite);
521 template <
typename LabelSetImageType,
typename ImageType>
522 void InitializeByLabeledImageProcessing(LabelSetImageType *input, ImageType *other);
566 namespace MultiLabelSegmentation
609 const TimeStepType timeStep, std::vector<std::pair<Label::PixelType, Label::PixelType> > labelMapping = { {1,1} },
653 bool destinationBackgroundLocked =
false,
654 std::vector<std::pair<Label::PixelType, Label::PixelType> > labelMapping = { {1,1} },
665 bool destinationBackgroundLocked =
false,
666 std::vector<std::pair<Label::PixelType, Label::PixelType> > labelMapping = { {1,1} },