NifTK
16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
|
Seed tool for adding / removing / moving seeds. More...
Public Member Functions | |
mitkClassMacro (SeedTool, Tool) static Pointer New() | |
virtual void | InitializeStateMachine () |
virtual const char * | GetName () const |
virtual const char ** | GetXPM () const |
virtual void | Activated () |
When called, we create and register a point set interactor. More... | |
virtual void | Deactivated () |
When called, we unregister the point set interactor. More... | |
virtual void | InstallEventFilter (StateMachineEventFilter *eventFilter) |
Adds an event filter that can reject a state machine event or let it pass through. Overrides niftk::FilteringStateMachine::InstallEventFilter() so that it adds every filter also to the internal point set interactor. More... | |
virtual void | RemoveEventFilter (StateMachineEventFilter *eventFilter) |
Removes an event filter that can reject a state machine event or let it pass through. Overrides niftk::tateMachineFilters::InstallEventFilter() to that it removes every filter also from the internal point set interactor. More... | |
Public Member Functions inherited from niftk::Tool | |
mitkClassMacro (Tool, mitk::FeedbackContourTool) static void LoadBehaviourStrings() | |
Loads the behaviour string to the global interaction. This function should be called before any niftk::Tool object is created. More... | |
const char * | GetGroup () const override |
bool | GetBlockNumberOfSeedsSignal () const |
Gets the flag to block the signal that indicates that the number of seeds has changed. More... | |
void | SetBlockNumberOfSeedsSignal (bool blockNumberOfSeedsSignal) |
Sets the flag to block the signal that indicates that the number of seeds has changed. More... | |
Public Member Functions inherited from niftk::FilteringStateMachine | |
FilteringStateMachine () | |
Constructs a FilteringStateMachine object. More... | |
virtual | ~FilteringStateMachine () |
Destructs the FilteringStateMachine object. More... | |
float | CanHandleEvent (const mitk::StateEvent *event) const |
This function is to replace the original CanHandleEvent function to support event filtering. More... | |
bool | CanHandleEvent (mitk::InteractionEvent *event) |
std::vector < StateMachineEventFilter * > | GetEventFilters () const |
Gets the list of the installed event filters. More... | |
bool | IsFiltered (const mitk::StateEvent *stateEvent) const |
Tells if the event is rejected by the installed event filters or they let it pass through. More... | |
bool | IsFiltered (mitk::InteractionEvent *event) |
Tells if the event is rejected by the installed event filters or they let it pass through. More... | |
Protected Member Functions | |
SeedTool () | |
virtual | ~SeedTool () |
Protected Member Functions inherited from niftk::Tool | |
Tool () | |
virtual | ~Tool () |
bool | FilterEvents (mitk::InteractionEvent *event, mitk::DataNode *dataNode) |
Tells if this tool can handle the given event. More... | |
virtual void | RenderCurrentWindow (const mitk::PositionEvent &event) |
Makes the current window re-render. More... | |
virtual void | RenderAllWindows () |
Makes all windows re-render. More... | |
virtual void | UpdateWorkingDataNodeBoolProperty (int dataIndex, const std::string &name, bool value) |
Helper method to update a boolean property on a given working data node. More... | |
mitk::DataNode::Pointer | GetPointSetNode () const |
The node that contains the point set that is the working data of the seed tool. More... | |
mitk::PointSet::Pointer | GetPointSet () const |
The point set that is the working data of the seed tool. More... | |
Protected Member Functions inherited from niftk::FilteringStateMachine | |
virtual float | CanHandle (const mitk::StateEvent *stateEvent) const |
virtual bool | CanHandle (mitk::InteractionEvent *event) |
Additional Inherited Members | |
Public Types inherited from niftk::Tool | |
enum | { SEGMENTATION, SEEDS, CONTOURS, DRAW_CONTOURS, PRIOR_CONTOURS, NEXT_CONTOURS, REGION_GROWING, INITIAL_SEGMENTATION, INITIAL_SEEDS } |
Constants that identify the data needed for the irregular edit tools. They should be used to index the vector of working data. More... | |
Static Public Member Functions inherited from niftk::Tool | |
static bool | LoadBehaviour (const std::string &fileName, us::Module *module) |
Public Attributes inherited from niftk::Tool | |
mitk::Message1< int > | NumberOfSeedsHasChanged |
Used to signal that the number of seeds has changed. More... | |
Static Public Attributes inherited from niftk::Tool | |
static const std::string | SEEDS_NAME = "MIDAS_SEEDS" |
Stores a seed point set name, so all classes have access to the name. More... | |
static const std::string | CONTOURS_NAME = "MIDAS_CURRENT_CONTOURS" |
Stores the name of the current slice contours, so all classes have access to the name. More... | |
static const std::string | DRAW_CONTOURS_NAME = "MIDAS_DRAW_CONTOURS" |
Stores the name of the draw tool contours, so all classes have access to the name. More... | |
static const std::string | PRIOR_CONTOURS_NAME = "MIDAS_PRIOR_CONTOURS" |
Stores the name of the prior contours, so all classes have access to the name. More... | |
static const std::string | NEXT_CONTOURS_NAME = "MIDAS_NEXT_CONTOURS" |
Stores the name of the next contours, so all classes have access to the name. More... | |
static const std::string | REGION_GROWING_NAME = "MIDAS_REGION_GROWING_IMAGE" |
Stores the name of the region growing image, so all classes have access to the name. More... | |
static const std::string | INITIAL_SEGMENTATION_NAME = "MIDAS_INITIAL_SEGMENTATION_IMAGE" |
Stores the name of the initial segmentation image, so all classes have access to the name. More... | |
static const std::string | INITIAL_SEEDS_NAME = "MIDAS_INITIAL_SEEDS" |
Stores the name of the initial set of seeds, so all classes have access to the name. More... | |
Seed tool for adding / removing / moving seeds.
Interestingly, ANY of PolyTool, DrawTool or SeedTool can add seeds. but only SeedTool can remove them.
Provides
1. Right mouse button = place seed 2. Left mouse button = select seed 3. Move with left mouse button down = move selected seed 4. Middle mouse button = select a seed if it is within a given distance and remove it.
and includes Undo/Redo functionality. Given the above list, to remove seeds most people hold the middle mouse button down, and drag it around, sucking up the seed points like a hoover.
|
protected |
|
protectedvirtual |
|
virtual |
When called, we create and register a point set interactor.
Reimplemented from niftk::Tool.
|
virtual |
When called, we unregister the point set interactor.
Note: The interactor is disabled after it is destructed, therefore we have to make sure that we remove every reference to it. The data node also has a reference to it, therefore we have to decouple them here. If we do not do this, the interactor stays active and will keep processing the events.
Reimplemented from niftk::Tool.
|
virtual |
|
virtual |
|
virtual |
Note: This is a dummy, empty state machine, with no transitions. The job is done by the interactor.
|
virtual |
Adds an event filter that can reject a state machine event or let it pass through. Overrides niftk::FilteringStateMachine::InstallEventFilter() so that it adds every filter also to the internal point set interactor.
Reimplemented from niftk::Tool.
|
virtual |
Removes an event filter that can reject a state machine event or let it pass through. Overrides niftk::tateMachineFilters::InstallEventFilter() to that it removes every filter also from the internal point set interactor.
Reimplemented from niftk::Tool.