Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
FastMarching semgentation tool. More...
#include <mitkFastMarchingTool3D.h>
Public Member Functions | |
mitkClassMacro (FastMarchingTool3D, AutoSegmentationTool) | |
Pointer | Clone () const |
bool | CanHandle (BaseData *referenceData) const override |
const char ** | GetXPM () const override |
Returns an icon in the XPM format. More... | |
const char * | GetName () const override |
Returns the name of this tool. Make it short! More... | |
us::ModuleResource | GetIconResource () const override |
Returns the tool button icon of the tool wrapped by a usModuleResource. More... | |
void | SetUpperThreshold (double) |
Set parameter used in Threshold filter. More... | |
void | SetLowerThreshold (double) |
Set parameter used in Threshold filter. More... | |
void | SetStoppingValue (double) |
Set parameter used in Fast Marching filter. More... | |
void | SetSigma (double) |
Set parameter used in Gradient Magnitude filter. More... | |
void | SetAlpha (double) |
Set parameter used in Fast Marching filter. More... | |
void | SetBeta (double) |
Set parameter used in Fast Marching filter. More... | |
virtual void | ConfirmSegmentation () |
Adds the feedback image to the current working image. More... | |
virtual void | SetCurrentTimeStep (int t) |
Set the working time step. More... | |
void | ClearSeeds () |
Clear all seed points. More... | |
void | Update () |
Updates the itk pipeline and shows the result of FastMarching. More... | |
![]() | |
mitkClassMacro (AutoSegmentationTool, Tool) | |
void | SetOverwriteExistingSegmentation (bool overwrite) |
std::string | GetCurrentSegmentationName () |
Gets the name of the currently selected segmentation node. More... | |
virtual mitk::DataNode * | GetTargetSegmentationNode () |
Depending on the selected mode either returns the currently selected segmentation or creates a new one from the selected reference data and adds the new segmentation to the datastorage. More... | |
![]() | |
mitkClassMacro (Tool, EventStateMachine) | |
virtual std::string | GetIconPath () const |
Returns the path of an icon. More... | |
virtual us::ModuleResource | GetCursorIconResource () const |
Returns the path of a cursor icon. More... | |
virtual void | InitializeStateMachine () |
virtual itk::Object::Pointer | GetGUI (const std::string &toolkitPrefix, const std::string &toolkitPostfix) |
Interface for GUI creation. More... | |
virtual NodePredicateBase::ConstPointer | GetReferenceDataPreference () const |
virtual NodePredicateBase::ConstPointer | GetWorkingDataPreference () const |
DataNode::Pointer | CreateEmptySegmentationNode (const Image *original, const std::string &organName, const mitk::Color &color) |
DataNode::Pointer | CreateSegmentationNode (Image *image, const std::string &organName, const mitk::Color &color) |
![]() | |
virtual std::vector< std::string > | GetClassHierarchy () const override |
virtual const char * | GetClassName () const |
bool | LoadStateMachine (const std::string &filename, const us::Module *module=nullptr) |
Loads XML resource. More... | |
bool | HandleEvent (InteractionEvent *event, DataNode *dataNode) |
void | EnableUndo (bool enable) |
Enables or disabled Undo. More... | |
void | EnableInteraction (bool enable) |
Enables/disables the state machine. In un-enabled state it won't react to any events. More... | |
![]() | |
bool | SetEventConfig (const std::string &filename, const us::Module *module=nullptr) |
Loads a configuration from an XML resource. More... | |
bool | SetEventConfig (const EventConfig &config) |
Loads a configuration from an EventConfig object. More... | |
EventConfig | GetEventConfig () const |
Returns the current configuration. More... | |
bool | AddEventConfig (const std::string &filename, const us::Module *module=nullptr) |
This method extends the configuration. More... | |
bool | AddEventConfig (const EventConfig &config) |
This method extends the configuration. The configuration from the EventConfig object is loaded and only the ones conflicting are replaced by the new one. This way several configurations can be combined. More... | |
![]() | |
InteractionEventObserver () | |
virtual | ~InteractionEventObserver () |
void | Disable () |
void | Enable () |
bool | IsEnabled () const |
Static Public Member Functions | |
static Pointer | New () |
![]() | |
static const char * | GetStaticNameOfClass () |
![]() | |
static const char * | GetStaticNameOfClass () |
Protected Member Functions | |
FastMarchingTool3D () | |
~FastMarchingTool3D () override | |
void | Activated () override |
Called when the tool gets activated. More... | |
void | Deactivated () override |
Called when the tool gets deactivated. More... | |
virtual void | Initialize () |
virtual void | OnAddPoint () |
Add point action of StateMachine pattern. More... | |
virtual void | OnDelete () |
Delete action of StateMachine pattern. More... | |
void | Reset () |
Reset all relevant inputs of the itk pipeline. More... | |
![]() | |
AutoSegmentationTool () | |
~AutoSegmentationTool () override | |
const char * | GetGroup () const override |
Name of a group. More... | |
virtual itk::SmartPointer< Image > | Get3DImage (itk::SmartPointer< Image > image, unsigned int timestep) |
![]() | |
virtual void | SetToolManager (ToolManager *) |
void | ConnectActionsAndFunctions () override |
Tool () | |
Tool (const char *, const us::Module *interactorModule=nullptr) | |
~Tool () override | |
void | Notify (InteractionEvent *interactionEvent, bool isHandled) override |
bool | FilterEvents (InteractionEvent *, DataNode *) override |
![]() | |
EventStateMachine () | |
~EventStateMachine () override | |
void | AddActionFunction (const std::string &action, TActionFunctor *functor) |
void | AddActionFunction (const std::string &action, const ActionFunctionDelegate &delegate) |
void | AddConditionFunction (const std::string &condition, const ConditionFunctionDelegate &delegate) |
StateMachineState * | GetCurrentState () const |
void | ResetToStartState () |
ResetToStartState Reset state machine to it initial starting state. More... | |
virtual bool | CheckCondition (const StateMachineCondition &condition, const InteractionEvent *interactionEvent) |
virtual void | ExecuteAction (StateMachineAction *action, InteractionEvent *interactionEvent) |
void | SetMouseCursor (const char *xpm[], int hotspotX, int hotspotY) |
Sets the specified mouse cursor. More... | |
void | ResetMouseCursor () |
Resets the mouse cursor (if modified by the SlicesCoordinator) to its original state. More... | |
StateMachineTransition * | GetExecutableTransition (InteractionEvent *event) |
Returns the executable transition for the given event. More... | |
![]() | |
InteractionEventHandler () | |
~InteractionEventHandler () override | |
PropertyList::Pointer | GetAttributes () const |
std::string | MapToEventVariant (InteractionEvent *interactionEvent) |
virtual void | ConfigurationChanged () |
Additional Inherited Members | |
![]() | |
Message | GUIProcessEventsMessage |
To let GUI process new events (e.g. qApp->processEvents() ) More... | |
Message1< std::string > | ErrorMessage |
To send error messages (to be shown by some GUI) More... | |
Message1< bool > | CurrentlyBusy |
To send whether the tool is busy (to be shown by some GUI) More... | |
Message1< std::string > | GeneralMessage |
To send general messages (to be shown by some GUI) More... | |
![]() | |
typedef MessageAbstractDelegate2< StateMachineAction *, InteractionEvent *, void > | ActionFunctionDelegate |
typedef MessageAbstractDelegate1< const InteractionEvent *, bool > | ConditionFunctionDelegate |
FastMarching semgentation tool.
The segmentation is done by setting one or more seed points on the image and adapting the time range and threshold. The pipeline is: Smoothing->GradientMagnitude->SigmoidFunction->FastMarching->Threshold The resulting binary image is seen as a segmentation of an object.
For detailed documentation see ITK Software Guide section 9.3.1 Fast Marching Segmentation.
Definition at line 51 of file mitkFastMarchingTool3D.h.
typedef itk::FastMarchingImageFilter<InternalImageType, InternalImageType> mitk::FastMarchingTool3D::FastMarchingFilterType |
Definition at line 70 of file mitkFastMarchingTool3D.h.
typedef itk::GradientMagnitudeRecursiveGaussianImageFilter<InternalImageType, InternalImageType> mitk::FastMarchingTool3D::GradientFilterType |
Definition at line 68 of file mitkFastMarchingTool3D.h.
Definition at line 62 of file mitkFastMarchingTool3D.h.
typedef float mitk::FastMarchingTool3D::InternalPixelType |
Definition at line 58 of file mitkFastMarchingTool3D.h.
typedef FastMarchingFilterType::NodeContainer mitk::FastMarchingTool3D::NodeContainer |
Definition at line 71 of file mitkFastMarchingTool3D.h.
typedef FastMarchingFilterType::NodeType mitk::FastMarchingTool3D::NodeType |
Definition at line 72 of file mitkFastMarchingTool3D.h.
Definition at line 64 of file mitkFastMarchingTool3D.h.
Definition at line 63 of file mitkFastMarchingTool3D.h.
typedef itk::SigmoidImageFilter<InternalImageType, InternalImageType> mitk::FastMarchingTool3D::SigmoidFilterType |
Definition at line 69 of file mitkFastMarchingTool3D.h.
typedef itk::CurvatureAnisotropicDiffusionImageFilter<InternalImageType, InternalImageType> mitk::FastMarchingTool3D::SmoothingFilterType |
Definition at line 67 of file mitkFastMarchingTool3D.h.
typedef itk::BinaryThresholdImageFilter<InternalImageType, OutputImageType> mitk::FastMarchingTool3D::ThresholdingFilterType |
Definition at line 66 of file mitkFastMarchingTool3D.h.
|
protected |
Definition at line 35 of file mitkFastMarchingTool3D.cpp.
|
overrideprotected |
Definition at line 50 of file mitkFastMarchingTool3D.cpp.
|
overrideprotectedvirtual |
Called when the tool gets activated.
Derived tools should call their parents implementation at the beginning of the overriding function.
Reimplemented from mitk::Tool.
Definition at line 144 of file mitkFastMarchingTool3D.cpp.
References mitk::DataStorage::Add(), mitk::ToolManager::GetDataStorage(), mitk::ToolManager::GetReferenceData(), mitk::ToolManager::GetWorkingData(), Initialize(), m_Alpha, m_Beta, m_FastMarchingFilter, m_GradientMagnitudeFilter, m_LowerThreshold, m_PointSetAddObserverTag, m_PointSetRemoveObserverTag, m_ProgressCommand, m_ReferenceImageAsITK, m_ResultImageNode, m_SeedContainer, m_SeedPointInteractor, m_SeedsAsPointSet, m_SeedsAsPointSetNode, m_Sigma, m_SigmoidFilter, m_SmoothFilter, m_StoppingValue, m_ThresholdFilter, mitk::Tool::m_ToolManager, m_UpperThreshold, mitk::ToolCommand::New(), mitk::PointSetDataInteractor::New(), mitk::DataNode::New(), mitk::PointSet::New(), OnAddPoint(), and OnDelete().
|
overridevirtual |
Reimplemented from mitk::Tool.
Definition at line 54 of file mitkFastMarchingTool3D.cpp.
References image.
void mitk::FastMarchingTool3D::ClearSeeds | ( | ) |
Clear all seed points.
Definition at line 404 of file mitkFastMarchingTool3D.cpp.
References m_FastMarchingFilter, m_NeedUpdate, m_PointSetAddObserverTag, m_PointSetRemoveObserverTag, m_SeedContainer, m_SeedsAsPointSet, m_SeedsAsPointSetNode, mitk::PointSet::New(), OnAddPoint(), and OnDelete().
Referenced by ConfirmSegmentation(), Deactivated(), and Reset().
Pointer mitk::FastMarchingTool3D::Clone | ( | ) | const |
|
virtual |
Adds the feedback image to the current working image.
Definition at line 274 of file mitkFastMarchingTool3D.cpp.
References mitk::ToolManager::ActivateTool(), mitk::CastToItkImage(), ClearSeeds(), mitk::DataNode::GetData(), mitk::RenderingManager::GetInstance(), mitk::AutoSegmentationTool::GetTargetSegmentationNode(), m_CurrentTimeStep, m_ResultImageNode, m_ThresholdFilter, mitk::Tool::m_ToolManager, mitk::ImageTimeSelector::New(), and mitk::RenderingManager::RequestUpdateAll().
|
overrideprotectedvirtual |
Called when the tool gets deactivated.
Derived tools should call their parents implementation at the end of the overriding function.
Reimplemented from mitk::Tool.
Definition at line 229 of file mitkFastMarchingTool3D.cpp.
References ClearSeeds(), mitk::ToolManager::GetDataStorage(), mitk::RenderingManager::GetInstance(), m_FastMarchingFilter, m_GradientMagnitudeFilter, m_PointSetAddObserverTag, m_PointSetRemoveObserverTag, m_ResultImageNode, m_SeedPointInteractor, m_SeedsAsPointSet, m_SeedsAsPointSetNode, m_SigmoidFilter, m_SmoothFilter, mitk::Tool::m_ToolManager, mitk::OpREMOVE, mitk::DataStorage::Remove(), and mitk::RenderingManager::RequestUpdateAll().
|
overridevirtual |
Returns the tool button icon of the tool wrapped by a usModuleResource.
Reimplemented from mitk::Tool.
Definition at line 75 of file mitkFastMarchingTool3D.cpp.
References ModuleContext::GetModule(), us::GetModuleContext(), and us::Module::GetResource().
|
overridevirtual |
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 82 of file mitkFastMarchingTool3D.cpp.
|
overridevirtual |
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 70 of file mitkFastMarchingTool3D.cpp.
|
protectedvirtual |
Definition at line 258 of file mitkFastMarchingTool3D.cpp.
References mitk::CastToItkImage(), mitk::ToolManager::GetReferenceData(), m_CurrentTimeStep, m_NeedUpdate, m_ReferenceImage, m_ReferenceImageAsITK, m_SmoothFilter, mitk::Tool::m_ToolManager, and mitk::ImageTimeSelector::New().
Referenced by Activated(), and SetCurrentTimeStep().
mitk::FastMarchingTool3D::mitkClassMacro | ( | FastMarchingTool3D | , |
AutoSegmentationTool | |||
) |
|
static |
|
protectedvirtual |
Add point action of StateMachine pattern.
Definition at line 315 of file mitkFastMarchingTool3D.cpp.
References mitk::RenderingManager::GetInstance(), m_FastMarchingFilter, m_NeedUpdate, m_ReferenceImage, m_SeedContainer, m_SeedsAsPointSet, mitk::RenderingManager::RequestUpdateAll(), and Update().
Referenced by Activated(), and ClearSeeds().
|
protectedvirtual |
Delete action of StateMachine pattern.
Definition at line 343 of file mitkFastMarchingTool3D.cpp.
References mitk::RenderingManager::GetInstance(), m_FastMarchingFilter, m_NeedUpdate, m_SeedContainer, mitk::RenderingManager::RequestUpdateAll(), and Update().
Referenced by Activated(), and ClearSeeds().
|
protected |
Reset all relevant inputs of the itk pipeline.
Definition at line 442 of file mitkFastMarchingTool3D.cpp.
References ClearSeeds(), mitk::RenderingManager::GetInstance(), m_ResultImageNode, and mitk::RenderingManager::RequestUpdateAll().
void mitk::FastMarchingTool3D::SetAlpha | ( | double | value | ) |
Set parameter used in Fast Marching filter.
Definition at line 124 of file mitkFastMarchingTool3D.cpp.
References m_Alpha, m_NeedUpdate, and m_SigmoidFilter.
void mitk::FastMarchingTool3D::SetBeta | ( | double | value | ) |
Set parameter used in Fast Marching filter.
Definition at line 101 of file mitkFastMarchingTool3D.cpp.
References m_Beta, m_NeedUpdate, and m_SigmoidFilter.
|
virtual |
Set the working time step.
Definition at line 452 of file mitkFastMarchingTool3D.cpp.
References Initialize(), and m_CurrentTimeStep.
void mitk::FastMarchingTool3D::SetLowerThreshold | ( | double | value | ) |
Set parameter used in Threshold filter.
Definition at line 94 of file mitkFastMarchingTool3D.cpp.
References m_LowerThreshold, m_NeedUpdate, and m_ThresholdFilter.
void mitk::FastMarchingTool3D::SetSigma | ( | double | value | ) |
Set parameter used in Gradient Magnitude filter.
Definition at line 111 of file mitkFastMarchingTool3D.cpp.
References m_GradientMagnitudeFilter, m_NeedUpdate, and m_Sigma.
void mitk::FastMarchingTool3D::SetStoppingValue | ( | double | value | ) |
Set parameter used in Fast Marching filter.
Definition at line 134 of file mitkFastMarchingTool3D.cpp.
References m_FastMarchingFilter, m_NeedUpdate, and m_StoppingValue.
void mitk::FastMarchingTool3D::SetUpperThreshold | ( | double | value | ) |
Set parameter used in Threshold filter.
Definition at line 87 of file mitkFastMarchingTool3D.cpp.
References m_NeedUpdate, m_ThresholdFilter, and m_UpperThreshold.
void mitk::FastMarchingTool3D::Update | ( | ) |
Updates the itk pipeline and shows the result of FastMarching.
Definition at line 360 of file mitkFastMarchingTool3D.cpp.
References mitk::CastToMitkImage(), mitk::Tool::CurrentlyBusy, mitk::Tool::ErrorMessage, mitk::RenderingManager::GetInstance(), m_NeedUpdate, m_ProgressCommand, m_ReferenceImage, m_ResultImageNode, m_SeedPointInteractor, m_SeedsAsPointSetNode, m_ThresholdFilter, MITK_ERROR, mitk::Image::New(), mitk::RenderingManager::RequestUpdateAll(), and mitk::Message1< T, A >::Send().
Referenced by OnAddPoint(), and OnDelete().
|
protected |
Definition at line 140 of file mitkFastMarchingTool3D.h.
Referenced by Activated(), and SetAlpha().
|
protected |
Definition at line 141 of file mitkFastMarchingTool3D.h.
Referenced by Activated(), and SetBeta().
|
protected |
Definition at line 134 of file mitkFastMarchingTool3D.h.
Referenced by ConfirmSegmentation(), Initialize(), and SetCurrentTimeStep().
|
protected |
Definition at line 159 of file mitkFastMarchingTool3D.h.
Referenced by Activated(), ClearSeeds(), Deactivated(), OnAddPoint(), OnDelete(), and SetStoppingValue().
|
protected |
Definition at line 157 of file mitkFastMarchingTool3D.h.
Referenced by Activated(), Deactivated(), and SetSigma().
|
protected |
Definition at line 136 of file mitkFastMarchingTool3D.h.
Referenced by Activated(), and SetLowerThreshold().
|
protected |
Definition at line 132 of file mitkFastMarchingTool3D.h.
Referenced by ClearSeeds(), Initialize(), OnAddPoint(), OnDelete(), SetAlpha(), SetBeta(), SetLowerThreshold(), SetSigma(), SetStoppingValue(), SetUpperThreshold(), and Update().
|
protected |
Definition at line 152 of file mitkFastMarchingTool3D.h.
Referenced by Activated(), ClearSeeds(), and Deactivated().
|
protected |
Definition at line 153 of file mitkFastMarchingTool3D.h.
Referenced by Activated(), ClearSeeds(), and Deactivated().
|
protected |
Definition at line 128 of file mitkFastMarchingTool3D.h.
Referenced by Activated(), and Update().
|
protected |
Definition at line 130 of file mitkFastMarchingTool3D.h.
Referenced by Initialize(), OnAddPoint(), and Update().
|
protected |
Definition at line 145 of file mitkFastMarchingTool3D.h.
Referenced by Activated(), and Initialize().
|
protected |
Definition at line 147 of file mitkFastMarchingTool3D.h.
Referenced by Activated(), ConfirmSegmentation(), Deactivated(), Reset(), and Update().
|
protected |
Definition at line 143 of file mitkFastMarchingTool3D.h.
Referenced by Activated(), ClearSeeds(), OnAddPoint(), and OnDelete().
|
protected |
Definition at line 151 of file mitkFastMarchingTool3D.h.
Referenced by Activated(), Deactivated(), and Update().
|
protected |
Definition at line 150 of file mitkFastMarchingTool3D.h.
Referenced by Activated(), ClearSeeds(), Deactivated(), and OnAddPoint().
|
protected |
Definition at line 149 of file mitkFastMarchingTool3D.h.
Referenced by Activated(), ClearSeeds(), Deactivated(), and Update().
|
protected |
Definition at line 139 of file mitkFastMarchingTool3D.h.
Referenced by Activated(), and SetSigma().
|
protected |
Definition at line 158 of file mitkFastMarchingTool3D.h.
Referenced by Activated(), Deactivated(), SetAlpha(), and SetBeta().
|
protected |
Definition at line 156 of file mitkFastMarchingTool3D.h.
Referenced by Activated(), Deactivated(), and Initialize().
|
protected |
Definition at line 138 of file mitkFastMarchingTool3D.h.
Referenced by Activated(), and SetStoppingValue().
|
protected |
Definition at line 155 of file mitkFastMarchingTool3D.h.
Referenced by Activated(), ConfirmSegmentation(), SetLowerThreshold(), SetUpperThreshold(), and Update().
|
protected |
Definition at line 137 of file mitkFastMarchingTool3D.h.
Referenced by Activated(), and SetUpperThreshold().