|
| mitkClassMacro (DrawTool, ContourTool) static Pointer New() |
|
virtual void | InitializeStateMachine () |
|
virtual void | ExecuteOperation (mitk::Operation *operation) |
| Method to enable this class to interact with the Undo/Redo framework. More...
|
|
virtual const char * | GetName () const |
|
virtual const char ** | GetXPM () const |
|
double | GetCursorSize () const |
| Gets the cursor size. Default size is 0.5. More...
|
|
void | SetCursorSize (double cursorSize) |
| Sets the cursor size. More...
|
|
virtual bool | StartDrawing (mitk::StateMachineAction *action, mitk::InteractionEvent *event) |
| Start drawing a line at the given mouse point. More...
|
|
virtual bool | KeepDrawing (mitk::StateMachineAction *action, mitk::InteractionEvent *event) |
| Continue drawing a line. More...
|
|
virtual bool | StopDrawing (mitk::StateMachineAction *action, mitk::InteractionEvent *event) |
| Finish drawing a line. More...
|
|
virtual bool | StartErasing (mitk::StateMachineAction *action, mitk::InteractionEvent *event) |
| Erase any contours within the distance given by the cursor size in this class, and denoted by the Erase slider in the GUI. More...
|
|
virtual bool | KeepErasing (mitk::StateMachineAction *action, mitk::InteractionEvent *event) |
| Erase any contours within the distance given by the cursor size in this class, and denoted by the Erase slider in the GUI. More...
|
|
virtual bool | StopErasing (mitk::StateMachineAction *action, mitk::InteractionEvent *event) |
| Finish editing. More...
|
|
virtual void | ClearWorkingData () |
| Different to ContourTool::ClearData which clears the Feedback contour, this one finds the working data node, and erases all contours. More...
|
|
virtual void | Clean (int sliceNumber, int axisNumber) |
| Called by the main application to clean the contour, which means, to erase any bits of contour not currently touching the region growing image. More...
|
|
virtual void | ClearData () |
| Clears the contour, meaning it re-initialised the feedback contour in mitk::FeedbackContourTool, and also the background contour herein. More...
|
|
virtual mitk::ContourModel * | GetContour () |
| Get a pointer to the current feedback contour. More...
|
|
virtual void | SetFeedbackContourVisible (bool) |
| Turns the feedback contour on/off. More...
|
|
| 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 |
|
virtual void | Deactivated () |
| When called, we unregister the reference to the set of seeds, and deactivate the interactors(s). More...
|
|
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...
|
|
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 niftkFilteringStateMachine::InstallEventFilter() to that it removes every filter also from the internal point set interactor. More...
|
|
| 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...
|
|
|
| DrawTool () |
|
virtual | ~DrawTool () |
|
virtual void | ConnectActionsAndFunctions () |
| Connects state machine actions to functions. More...
|
|
virtual void | Activated () |
| Called when the tool gets activated (registered to mitk::GlobalInteraction). More...
|
|
| ContourTool () |
|
virtual | ~ContourTool () |
|
virtual bool | OnMousePressed (mitk::StateMachineAction *action, mitk::InteractionEvent *event) |
| Calls the FeedbackContour::OnMousePressed method, then checks for working image, reference image and geometry. More...
|
|
void | Disable3dRenderingOfNode (mitk::DataNode *node) |
| This method makes sure that the argument node will not show up in ANY 3D viewer thats currently registered with the global mitk::RenderingManager. More...
|
|
void | AccumulateContourInWorkingData (mitk::ContourModel &contour, int contourIndex) |
| Adds the given contour to the Working Data registered with mitk::ToolManager, where the ToolManager can have multiple data sets registered, so we add the contour to the dataset specified by dataSetNumber. More...
|
|
void | ConvertPointInMmToVx (const mitk::Point3D &pointInMm, mitk::Point3D &pointInVx) |
|
void | ConvertPointToNearestVoxelCentreInVx (const mitk::Point3D &pointInMm, mitk::Point3D &nearestVoxelCentreInVx) |
|
void | ConvertPointToNearestVoxelCentreInMm (const mitk::Point3D &pointInMm, mitk::Point3D &nearestVoxelCentreInMm) |
|
void | GetClosestCornerPoint2D (const mitk::Point3D &pointInMm, int *whichTwoAxesInVx, mitk::Point3D &cornerPointInMm) |
|
int | GetEqualCoordinateAxes (const mitk::Point3D &cornerPoint1InMm, const mitk::Point3D &cornerPoint2InMm, int *whichTwoAxesInVx) |
| Compares two coordinates of the points and tells which of them are equal. The axes of the two coordinates to compare are given in whichTwoAxesInVx. Returns 0 if both coordinates are different, 1 if only the first coordinates are equal, 2 if only the second coordinates are equal and 3 the points are the same. More...
|
|
void | GetAdditionalCornerPoint (const mitk::Point3D &cornerPoint1InMm, const mitk::Point3D &point2InMm, const mitk::Point3D &cornerPoint2InMm, int *whichTwoAxesInVx, mitk::Point3D &newCornerPointInMm) |
|
bool | DrawLineAroundVoxelEdges (const mitk::Image *image, const mitk::BaseGeometry *geometry, const mitk::PlaneGeometry *planeGeometry, const mitk::Point3D ¤tPoint, const mitk::Point3D &previousPoint, mitk::ContourModel &contourAroundCorners, mitk::ContourModel &contourAlongLine) |
|
mitk::ContourModel * | GetBackgroundContour () |
|
void | SetBackgroundContour (mitk::ContourModel &) |
|
void | Disable3dRenderingOfBackgroundContour () |
|
void | SetBackgroundContourVisible (bool) |
|
void | SetBackgroundContourColor (float r, float g, float b) |
|
void | SetBackgroundContourColorDefault () |
|
| 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...
|
|
virtual float | CanHandle (const mitk::StateEvent *stateEvent) const |
|
virtual bool | CanHandle (mitk::InteractionEvent *event) |
|
|
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 void | CopyContour (mitk::ContourModel &a, mitk::ContourModel &b) |
| Copies contour from a to b. More...
|
|
static void | CopyContourSet (mitk::ContourModelSet &a, mitk::ContourModelSet &b, bool initialise=true) |
| Copies contour set from a to b. More...
|
|
static void | InitialiseContour (mitk::ContourModel &a, mitk::ContourModel &b) |
| Initialises the output contour b with properties like, closed, width and selected, copied from the reference contour a. More...
|
|
static bool | LoadBehaviour (const std::string &fileName, us::Module *module) |
|
static mitkClassMacro(ContourTool,
Tool) static const std const
std::string | MIDAS_CONTOUR_TOOL_BACKGROUND_CONTOUR |
| We store the name of a property to say we are editing. More...
|
|
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...
|
|
int | m_ContourWidth |
|
bool | m_ContourClosed |
|
float | m_Tolerance |
|
mitk::BaseGeometry * | m_SegmentationImageGeometry |
|
mitk::Image * | m_SegmentationImage |
|
mitk::Image * | m_ReferenceImage |
|
mitk::ContourModel::Pointer | m_BackgroundContour |
|
mitk::DataNode::Pointer | m_BackgroundContourNode |
|
bool | m_BackgroundContourVisible |
|
Tool to draw lines around voxel edges like MIDAS does rather than through them as most of the MITK tools do.
Provides
1. Left mouse button down = start line
2. Move with left button down = continue line
3. Left mouse button release = finish line
4. Middle mouse button down = erase anything within the range given by the Eraser (cursor size).
5. Move with middle mouse button down = same as 4.
6. Middle mouse button release = finish editing.
and includes Undo/Redo functionality.
bool niftk::DrawTool::StopDrawing |
( |
mitk::StateMachineAction * |
action, |
|
|
mitk::InteractionEvent * |
event |
|
) |
| |
|
virtual |
Finish drawing a line.
When we finish a contour, we take the Current contour, and add it to the Cumulative contour. This action should be undo-able, as we are creating data.
Make sure we have a valid position event, otherwise no point continuing.
When the mouse is released, we need to add the contour to the cumulative one.
Re-initialize contours to zero length.
Set this flag to indicate that we have stopped editing, which will trigger an update of the region growing.