37 m_LastPixelvalue( 0 ),
41 props[
"name"] = std::string(
"ParcellationHandler");
53 typedef itk::VectorContainer<unsigned int, mitk::DataNode::Pointer> SetOfObjects;
58 if(nodes.IsNull() || nodes->size() <= 0)
61 for (
unsigned int x = 0; x < nodes->size(); x++)
67 if( image.IsNotNull() && image->GetGeometry()->IsInside(worldposition) )
69 string typeStr = image->GetPixelType().GetComponentTypeAsString();
73 if( typeStr ==
"int" )
78 else if( typeStr ==
"unsigned_char" )
85 MITK_WARN(
"QmitkFreeSurferParcellationHandler") <<
"Pixeltype '" << typeStr <<
"' is not implemented yet.";
89 QString name( QString::fromStdString( this->
m_Translator->GetName( value ) ) );
93 if(mouseEvent.IsNotNull())
98 if( wheelEvent.IsNotNull() )
107 MITK_WARN(
"QmitkFreeSurferParcellationHandler") <<
"Could not access image for reading pixelvalue due to: " << ex.GetDescription();
111 MITK_WARN(
"QmitkFreeSurferParcellationHandler") <<
"Could not access image for reading pixelvalue.";
Super class for all position events.
Base class to implement InteractionEventObservers.
Gives locked and index-based read access for a particular image part. The class provides several set-...
BaseRenderer * GetSender() const
mitk::FreeSurferParcellationTranslator::Pointer m_Translator
Translator for coverting pixelvalue into anatomical label.
Point3D GetPositionInWorld() const
~QmitkFreeSurferParcellationHandler()
Organizes the rendering process.
static Module * GetModule(long id)
DataCollection - Class to facilitate loading/accessing structured data.
us::ServiceRegistration< InteractionEventObserver > m_ServiceRegistration
The mitkFreeSurferParcellationTranslator class.
void changed(int)
Emitted when pixelValue has changed.
void clicked(int)
Thrown if and only if the left mousebutton is pressed and pixelValue has changed. ...
itk::SmartPointer< const Self > ConstPointer
virtual DataStorage::Pointer GetDataStorage() const
QmitkFreeSurferParcellationHandler()
An object of this class represents an exception of MITK. Please don't instantiate exceptions manually...
void scrolled(int)
Thrown if mouse scrolled and pixelvalue changed.
Image class for storing images.
ModuleContext * GetModuleContext() const
US_UNORDERED_MAP_TYPE< std::string, Any > ServiceProperties
virtual void Notify(InteractionEvent *interactionEvent, bool isHandled)
const TPixel & GetPixelByWorldCoordinates(mitk::Point3D position)
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.