Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

mitk::OpeningTool Class Reference

#include <mitkOpeningTool.h>

Inheritance diagram for mitk::OpeningTool:
Inheritance graph
[legend]
Collaboration diagram for mitk::OpeningTool:
Collaboration graph
[legend]

List of all members.

Public Types

typedef OpeningTool Self
typedef MorphologicTool Superclass
typedef itk::SmartPointer< SelfPointer
typedef itk::SmartPointer
< const Self
ConstPointer

Public Member Functions

virtual const char * GetClassName () const
virtual const char * GetName () const
 Returns the name of this tool. Make it short!
virtual const char ** GetXPM () const
 Returns an icon in the XPM format.

Static Public Member Functions

static Pointer New ()

Protected Member Functions

 OpeningTool ()
virtual ~OpeningTool ()
mitk::Image::Pointer ApplyFilter (mitk::Image::Pointer image)

Protected Attributes

BallType m_Ball
BallOpeningFilterType::Pointer m_BallOpeningFilter

Detailed Description

Definition at line 16 of file mitkOpeningTool.h.


Member Typedef Documentation

typedef itk::SmartPointer<const Self> mitk::OpeningTool::ConstPointer

Reimplemented from mitk::MorphologicTool.

Definition at line 25 of file mitkOpeningTool.h.

typedef itk::SmartPointer<Self> mitk::OpeningTool::Pointer

Reimplemented from mitk::MorphologicTool.

Definition at line 25 of file mitkOpeningTool.h.

Reimplemented from mitk::MorphologicTool.

Definition at line 25 of file mitkOpeningTool.h.

Reimplemented from mitk::MorphologicTool.

Definition at line 25 of file mitkOpeningTool.h.


Constructor & Destructor Documentation

mitk::OpeningTool::OpeningTool (  ) [protected]

Definition at line 9 of file mitkOpeningTool.cpp.

{

}
mitk::OpeningTool::~OpeningTool (  ) [protected, virtual]

Definition at line 14 of file mitkOpeningTool.cpp.

{

}

Member Function Documentation

mitk::Image::Pointer mitk::OpeningTool::ApplyFilter ( mitk::Image::Pointer  image ) [protected, virtual]

Reimplemented from mitk::MorphologicTool.

Definition at line 29 of file mitkOpeningTool.cpp.

References mitk::CastToItkImage(), mitk::CastToMitkImage(), and mitk::Image::New().

{
  SegmentationType::Pointer itkImage = SegmentationType::New();
  mitk::CastToItkImage(image, itkImage);
  m_Ball.SetRadius( m_Radius);
  m_Ball.CreateStructuringElement();
  m_BallOpeningFilter = BallOpeningFilterType::New();
  m_BallOpeningFilter->SetKernel(m_Ball);
  m_BallOpeningFilter->SetInput(itkImage);
  //m_BallOpeningFilter->SetRadius(1);
  m_BallOpeningFilter->SetForegroundValue(1);
  m_BallOpeningFilter->SetBackgroundValue(0);
  m_BallOpeningFilter->UpdateLargestPossibleRegion();

  mitk::Image::Pointer new_image = mitk::Image::New();
  mitk::CastToMitkImage(m_BallOpeningFilter->GetOutput(), new_image);
  return new_image;
}
virtual const char* mitk::OpeningTool::GetClassName (  ) const [virtual]

Reimplemented from mitk::MorphologicTool.

const char * mitk::OpeningTool::GetName (  ) const [virtual]

Returns the name of this tool. Make it short!

This name has to fit into some kind of button in most applications, so take some time to think of a good name!

Implements mitk::Tool.

Definition at line 19 of file mitkOpeningTool.cpp.

{
  return "Opening Tool";
}
const char ** mitk::OpeningTool::GetXPM (  ) const [virtual]

Returns an icon in the XPM format.

This icon has to fit into some kind of button in most applications, so make it smaller than 25x25 pixels.

XPM is e.g. supported by The Gimp. But if you open any XPM file in your text editor, you will see that you could also "draw" it with an editor.

Implements mitk::Tool.

Definition at line 24 of file mitkOpeningTool.cpp.

{
  return mitkOpeningTool_xpm;
}
static Pointer mitk::OpeningTool::New (  ) [static]

Member Data Documentation

BallType mitk::OpeningTool::m_Ball [protected]

Definition at line 38 of file mitkOpeningTool.h.

BallOpeningFilterType::Pointer mitk::OpeningTool::m_BallOpeningFilter [protected]

Definition at line 39 of file mitkOpeningTool.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines