#include <mitkErodeTool.h>
Public Types | |
typedef ErodeTool | Self |
typedef MorphologicTool | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
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 | |
ErodeTool () | |
virtual | ~ErodeTool () |
mitk::Image::Pointer | ApplyFilter (mitk::Image::Pointer) |
Protected Attributes | |
BallType | m_Ball |
BallErodeFilterType::Pointer | m_BallErodeFilter |
Definition at line 16 of file mitkErodeTool.h.
typedef itk::SmartPointer<const Self> mitk::ErodeTool::ConstPointer |
Reimplemented from mitk::MorphologicTool.
Definition at line 25 of file mitkErodeTool.h.
typedef itk::SmartPointer<Self> mitk::ErodeTool::Pointer |
Reimplemented from mitk::MorphologicTool.
Definition at line 25 of file mitkErodeTool.h.
typedef ErodeTool mitk::ErodeTool::Self |
Reimplemented from mitk::MorphologicTool.
Definition at line 25 of file mitkErodeTool.h.
Reimplemented from mitk::MorphologicTool.
Definition at line 25 of file mitkErodeTool.h.
mitk::ErodeTool::ErodeTool | ( | ) | [protected] |
Definition at line 9 of file mitkErodeTool.cpp.
{ }
mitk::ErodeTool::~ErodeTool | ( | ) | [protected, virtual] |
Definition at line 14 of file mitkErodeTool.cpp.
{ }
mitk::Image::Pointer mitk::ErodeTool::ApplyFilter | ( | mitk::Image::Pointer | image ) | [protected, virtual] |
Reimplemented from mitk::MorphologicTool.
Definition at line 29 of file mitkErodeTool.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_BallErodeFilter = BallErodeFilterType::New(); m_BallErodeFilter->SetKernel(m_Ball); m_BallErodeFilter->SetInput(itkImage); m_BallErodeFilter->SetErodeValue(1); m_BallErodeFilter->BoundaryToForegroundOn(); m_BallErodeFilter->UpdateLargestPossibleRegion(); mitk::Image::Pointer new_image = mitk::Image::New(); mitk::CastToMitkImage(m_BallErodeFilter->GetOutput(), new_image); return new_image; }
virtual const char* mitk::ErodeTool::GetClassName | ( | ) | const [virtual] |
Reimplemented from mitk::MorphologicTool.
const char * mitk::ErodeTool::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 mitkErodeTool.cpp.
{ return "Erode Tool"; }
const char ** mitk::ErodeTool::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 mitkErodeTool.cpp.
{
return mitkErodeTool_xpm;
}
static Pointer mitk::ErodeTool::New | ( | ) | [static] |
BallType mitk::ErodeTool::m_Ball [protected] |
Definition at line 38 of file mitkErodeTool.h.
BallErodeFilterType::Pointer mitk::ErodeTool::m_BallErodeFilter [protected] |
Definition at line 39 of file mitkErodeTool.h.