<commit_before>/*===================================================================

The Medical Imaging Interaction Toolkit (MITK)

Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.

This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.

See LICENSE.txt or http://www.mitk.org for details.

===================================================================*/
#ifndef _mitkContourModelSet_H_
#define _mitkContourModelSet_H_

#include "mitkCommon.h"
#include "SegmentationContourExports.h"

#include "mitkContourModel.h"

#include <deque>

namespace mitk
{

  /** \brief
  */
  class SegmentationContour_EXPORT ContourModelSet : public itk::LightObject
  {

  public:

    mitkClassMacro(ContourModelSet, itk::LightObject);

    itkNewMacro(Self);

    mitkCloneMacro(Self);

    typedef std::deque<mitk::ContourModel::Pointer> ContourModelListType;
    typedef ContourModelListType::iterator ContourModelSetIterator;

    //  start of inline methods

    /** \brief Return an iterator a the front.
    */
    virtual ContourModelSetIterator Begin()
    {
      return this->m_Contours.begin();
    }

    /** \brief Return an iterator a the front.
    */
    virtual ContourModelSetIterator End()
    {
      return this->m_Contours.end();
    }

    /** \brief Returns the number of contained contours.
    */
    virtual int GetSize()
    {
      return this->m_Contours.size();
    }
    //   end of inline methods

    /** \brief Add a ContourModel to the container.
    */
    virtual void AddContourModel(mitk::ContourModel &contourModel);

    /** \brief Add a ContourModel to the container.
    */
    virtual void AddContourModel(mitk::ContourModel::Pointer contourModel);

    /** \brief Returns the ContourModel a given index
    \param index
    */
    virtual mitk::ContourModel* GetContourModelAt(int index);

    /** \brief Returns the container of the contours.
    */
    ContourModelListType* GetContourModelList();

    /** \brief Returns a bool whether the container is empty or not.
    */
    bool IsEmpty();

    /** \brief Remove the given ContourModel from the container if exists.
    \param ContourModel - the ContourModel to be removed.
    */
    virtual bool RemoveContourModel(mitk::ContourModel* contourModel);

    /** \brief Remove a ContourModel at given index within the container if exists.
    \param index - the index where the ContourModel should be removed.
    */
    virtual bool RemoveContourModelAt(int index);

    /** \brief Clear the storage container.
    */
    virtual void Clear();

  protected:

    ContourModelSet();
    ContourModelSet(const mitk::ContourModelSet &other);
    virtual ~ContourModelSet();
<commit_msg>Inherit from BaseData.<commit_after>/*===================================================================

The Medical Imaging Interaction Toolkit (MITK)

Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.

This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.

See LICENSE.txt or http://www.mitk.org for details.

===================================================================*/
#ifndef _mitkContourModelSet_H_
#define _mitkContourModelSet_H_

#include "mitkCommon.h"
#include "SegmentationContourExports.h"

#include "mitkContourModel.h"

#include <deque>

namespace mitk
{

  /** \brief
  */
  class SegmentationContour_EXPORT ContourModelSet : public mitk::BaseData
  {

  public:

    mitkClassMacro(ContourModelSet, mitk::BaseData);

    itkNewMacro(Self);

    mitkCloneMacro(Self);

    typedef std::deque<mitk::ContourModel::Pointer> ContourModelListType;
    typedef ContourModelListType::iterator ContourModelSetIterator;

    //  start of inline methods

    /** \brief Return an iterator a the front.
    */
    virtual ContourModelSetIterator Begin()
    {
      return this->m_Contours.begin();
    }

    /** \brief Return an iterator a the front.
    */
    virtual ContourModelSetIterator End()
    {
      return this->m_Contours.end();
    }

    /** \brief Returns the number of contained contours.
    */
    virtual int GetSize()
    {
      return this->m_Contours.size();
    }
    //   end of inline methods

    /** \brief Add a ContourModel to the container.
    */
    virtual void AddContourModel(mitk::ContourModel &contourModel);

    /** \brief Add a ContourModel to the container.
    */
    virtual void AddContourModel(mitk::ContourModel::Pointer contourModel);

    /** \brief Returns the ContourModel a given index
    \param index
    */
    virtual mitk::ContourModel* GetContourModelAt(int index);

    /** \brief Returns the container of the contours.
    */
    ContourModelListType* GetContourModelList();

    /** \brief Returns a bool whether the container is empty or not.
    */
    bool IsEmpty();

    /** \brief Remove the given ContourModel from the container if exists.
    \param ContourModel - the ContourModel to be removed.
    */
    virtual bool RemoveContourModel(mitk::ContourModel* contourModel);

    /** \brief Remove a ContourModel at given index within the container if exists.
    \param index - the index where the ContourModel should be removed.
    */
    virtual bool RemoveContourModelAt(int index);

    /** \brief Clear the storage container.
    */
    virtual void Clear();

    //////////////// inherit  from mitk::BaseData ////////////////////

    /*                  NO support for regions !                    */

    void SetRequestedRegionToLargestPossibleRegion(){}

    bool RequestedRegionIsOutsideOfTheBufferedRegion(){return false;}

    bool VerifyRequestedRegion(){return true;}

    void SetRequestedRegion(const itk::DataObject* ){}

    //////////////// END inherit  from mitk::BaseData ////////////////////


  protected:

    ContourModelSet();
    ContourModelSet(const mitk::ContourModelSet &other);
    virtual ~ContourModelSet();

{'fraction_non_alphanumeric': 0.140893470790378, 'fraction_numerical': 0.0, 'mean_word_length': 3.256267409470752, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '980812', 'n_tokens_mistral': 1715, 'n_tokens_neox': 1633, 'n_words': 508}