Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
Calculates some gray value statistics for segmentations. More...
#include <mitkCalculateGrayValueStatisticsTool.h>
Public Types | |
typedef itk::Statistics::Histogram< double > | HistogramType |
typedef HistogramType::MeasurementType | HistogramMeasurementType |
![]() | |
typedef mitk::Label::PixelType | DefaultSegmentationDataType |
![]() | |
typedef EventStateMachine | Self |
typedef InteractionEventHandler | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef std::map< std::string, TActionFunctor * > | ActionFunctionsMapType |
typedef itk::SmartPointer< StateMachineState > | StateMachineStateType |
![]() | |
typedef InteractionEventHandler | Self |
typedef itk::Object | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
Public Member Functions | |
mitkClassMacro (CalculateGrayValueStatisticsTool, SegmentationsProcessingTool) | |
Pointer | Clone () const |
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... | |
virtual std::string | GetReport () const |
HistogramType::ConstPointer | GetHistogram () |
![]() | |
mitkClassMacro (SegmentationsProcessingTool, Tool) | |
![]() | |
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 us::ModuleResource | GetIconResource () const |
Returns the tool button icon of the tool wrapped by a usModuleResource. 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 bool | CanHandle (BaseData *referenceData) const |
![]() | |
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 () |
Public Attributes | |
Message | StatisticsCompleted |
HistogramType::Pointer | m_ITKHistogram |
![]() | |
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... | |
Protected Member Functions | |
CalculateGrayValueStatisticsTool () | |
~CalculateGrayValueStatisticsTool () override | |
void | StartProcessingAllData () override |
Subclasses should override this method. More... | |
bool | ProcessOneWorkingData (DataNode *node) override |
Subclasses should override this method. More... | |
void | FinishProcessingAllData () override |
Subclasses should override this method. More... | |
std::string | GetErrorMessage () override |
Describes the error (if one occurred during processing). More... | |
template<typename TPixel , unsigned int VImageDimension> | |
void | CalculateMinMax (itk::Image< TPixel, VImageDimension > *referenceImage, Image *segmentation, TPixel &minimum, TPixel &maximum) |
template<typename TPixel , unsigned int VImageDimension> | |
void | ITKHistogramming (itk::Image< TPixel, VImageDimension > *referenceImage, Image *segmentation, std::stringstream &report) |
![]() | |
SegmentationsProcessingTool () | |
~SegmentationsProcessingTool () override | |
const char * | GetGroup () const override |
Name of a group. More... | |
void | Activated () override |
Called when the tool gets activated. More... | |
void | Deactivated () override |
Called when the tool gets deactivated. More... | |
virtual void | ProcessAllObjects () |
Loop over all working data items. More... | |
virtual void | SendErrorMessageIfAny () |
Sends an error message if there was an error during processing. More... | |
![]() | |
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 () |
Protected Attributes | |
std::stringstream | m_CompleteReport |
![]() | |
std::string | m_FailedNodes |
![]() | |
std::string | m_EventConfig |
Let subclasses change their event configuration. More... | |
ToolManager * | m_ToolManager |
![]() | |
bool | m_IsActive |
UndoController * | m_UndoController |
bool | m_UndoEnabled |
Additional Inherited Members | |
![]() | |
typedef MessageAbstractDelegate2< StateMachineAction *, InteractionEvent *, void > | ActionFunctionDelegate |
typedef MessageAbstractDelegate1< const InteractionEvent *, bool > | ConditionFunctionDelegate |
Calculates some gray value statistics for segmentations.
Last contributor: $Author$
Definition at line 38 of file mitkCalculateGrayValueStatisticsTool.h.
typedef HistogramType::MeasurementType mitk::CalculateGrayValueStatisticsTool::HistogramMeasurementType |
Definition at line 61 of file mitkCalculateGrayValueStatisticsTool.h.
typedef itk::Statistics::Histogram<double> mitk::CalculateGrayValueStatisticsTool::HistogramType |
Definition at line 56 of file mitkCalculateGrayValueStatisticsTool.h.
|
protected |
Definition at line 33 of file mitkCalculateGrayValueStatisticsTool.cpp.
|
overrideprotected |
Definition at line 37 of file mitkCalculateGrayValueStatisticsTool.cpp.
|
protected |
Calculates the minimum and maximum of the pixelvalues. They have to be known to initialize the histogram.
Definition at line 141 of file mitkCalculateGrayValueStatisticsTool.cpp.
References mitk::CastToItkImage(), max(), min(), and ROUND_P.
Pointer mitk::CalculateGrayValueStatisticsTool::Clone | ( | ) | const |
|
overrideprotectedvirtual |
Subclasses should override this method.
Reimplemented from mitk::SegmentationsProcessingTool.
Definition at line 129 of file mitkCalculateGrayValueStatisticsTool.cpp.
References mitk::SegmentationsProcessingTool::FinishProcessingAllData().
|
overrideprotectedvirtual |
Describes the error (if one occurred during processing).
Reimplemented from mitk::SegmentationsProcessingTool.
Definition at line 51 of file mitkCalculateGrayValueStatisticsTool.cpp.
mitk::CalculateGrayValueStatisticsTool::HistogramType::ConstPointer mitk::CalculateGrayValueStatisticsTool::GetHistogram | ( | ) |
Definition at line 329 of file mitkCalculateGrayValueStatisticsTool.cpp.
|
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 46 of file mitkCalculateGrayValueStatisticsTool.cpp.
|
virtual |
Definition at line 323 of file mitkCalculateGrayValueStatisticsTool.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 41 of file mitkCalculateGrayValueStatisticsTool.cpp.
|
protected |
Definition at line 193 of file mitkCalculateGrayValueStatisticsTool.cpp.
References mitk::CastToItkImage(), max(), min(), and ROUND_P.
mitk::CalculateGrayValueStatisticsTool::mitkClassMacro | ( | CalculateGrayValueStatisticsTool | , |
SegmentationsProcessingTool | |||
) |
|
static |
|
overrideprotectedvirtual |
Subclasses should override this method.
Reimplemented from mitk::SegmentationsProcessingTool.
Definition at line 62 of file mitkCalculateGrayValueStatisticsTool.cpp.
References AccessFixedDimensionByItk_2, mitk::ProgressBar::AddStepsToDo(), mitk::StatusBar::DisplayText(), mitk::DataNode::GetData(), mitk::ProgressBar::GetInstance(), mitk::StatusBar::GetInstance(), mitk::DataNode::GetName(), image, mitk::ImageTimeSelector::New(), and mitk::ProgressBar::Progress().
|
overrideprotectedvirtual |
Subclasses should override this method.
Reimplemented from mitk::SegmentationsProcessingTool.
Definition at line 56 of file mitkCalculateGrayValueStatisticsTool.cpp.
|
protected |
Definition at line 91 of file mitkCalculateGrayValueStatisticsTool.h.
HistogramType::Pointer mitk::CalculateGrayValueStatisticsTool::m_ITKHistogram |
Definition at line 57 of file mitkCalculateGrayValueStatisticsTool.h.
Message mitk::CalculateGrayValueStatisticsTool::StatisticsCompleted |
Definition at line 41 of file mitkCalculateGrayValueStatisticsTool.h.