35 m_PaintingPixelValue(paintingPixelValue),
54 Superclass::Activated();
59 Superclass::Deactivated();
71 m_LastEventSender = positionEvent->
GetSender();
72 m_LastEventSlice = m_LastEventSender->
GetSlice();
80 contour->
Expand(timestep + 1);
128 DataNode *workingNode(m_ToolManager->GetWorkingData(0));
132 Image *image =
dynamic_cast<Image *
>(workingNode->GetData());
134 if (!image || !planeGeometry)
144 m_CurrentLabelID = label->
GetValue();
148 m_CurrentLabelID = 1;
153 if (!image || abstractTransformGeometry)
161 MITK_ERROR <<
"Unable to extract slice." << std::endl;
167 slice, feedbackContour,
true,
false);
169 if (projectedContour.IsNull())
176 projectedContour, timestep, slice, image, (m_PaintingPixelValue * m_CurrentLabelID));
191 if (m_PaintingPixelValue == 1)
193 m_PaintingPixelValue = 0;
196 else if (m_PaintingPixelValue == 0)
198 m_PaintingPixelValue = 1;
ContourModel is a structure of linked vertices defining a contour in 3D space. The vertices are store...
Super class for all position events.
virtual unsigned int GetSlice() const
virtual void SetClosed(bool isClosed, int timestep=0)
Set closed property to given boolean.
BaseRenderer * GetSender() const
virtual void Initialize() override
Initialize all data objects.
static void FillContourInSlice(ContourModel *projectedContour, Image *sliceImage, mitk::Image::Pointer workingImage, int paintingPixelValue=1)
Fill a contour in a 2D slice with a specified pixel value at time step 0.
Point3D GetPositionInWorld() const
A data structure describing a label.
virtual const PlaneGeometry * GetCurrentWorldPlaneGeometry()
Get the current 2D-worldgeometry (m_CurrentWorldPlaneGeometry) used for 2D-rendering.
void AddVertex(mitk::Point3D &vertex, int timestep=0)
Add a vertex to the contour at given timestep. The vertex is added at the end of contour.
static RenderingManager * GetInstance()
Represents an action, that is executed after a certain event (in statemachine-mechanism) TODO: implem...
virtual void Expand(unsigned int timeSteps) override
Expand the timebounds of the TimeGeometry to given number of timesteps.
Image class for storing images.
mitk::Label * GetActiveLabel(unsigned int layer=0)
Returns the active label of a specific layer.
virtual unsigned int GetTimeStep() const
void RequestUpdate(vtkRenderWindow *renderWindow)
LabelSetImage class for handling labels and layers in a segmentation session.
Describes a two-dimensional, rectangular plane.
#define CONNECT_FUNCTION(a, f)
unsigned int GetActiveLayer() const
Gets the ID of the currently active layer.
PixelType GetValue() const
vtkRenderWindow * GetRenderWindow() const
Access the RenderWindow into which this renderer renders.
Class for nodes of the DataTree.