31 m_PaintingPixelValue(paintingPixelValue),
50 Superclass::Activated();
55 Superclass::Deactivated();
70 int timestep = positionEvent->GetSender()->GetTimeStep();
76 contour->
Expand(timestep + 1);
84 assert(positionEvent->GetSender()->GetRenderWindow());
103 assert(positionEvent->GetSender()->GetRenderWindow());
121 assert(positionEvent->GetSender()->GetRenderWindow());
128 auto *
image =
dynamic_cast<Image *
>(workingNode->GetData());
129 const PlaneGeometry *planeGeometry((positionEvent->GetSender()->GetCurrentWorldPlaneGeometry()));
130 if (!
image || !planeGeometry)
139 mitk::Label *label = labelSetImage->GetActiveLabel(labelSetImage->GetActiveLayer());
147 const auto *abstractTransformGeometry(
148 dynamic_cast<const AbstractTransformGeometry *>(positionEvent->GetSender()->GetCurrentWorldPlaneGeometry()));
149 if (!
image || abstractTransformGeometry)
157 MITK_ERROR <<
"Unable to extract slice." << std::endl;
163 slice, feedbackContour,
true,
false);
165 if (projectedContour.IsNull())
168 int timestep = positionEvent->GetSender()->GetTimeStep();
178 assert(positionEvent->GetSender()->GetRenderWindow());
ContourModel is a structure of linked vertices defining a contour in 3D space. The vertices are store...
Super class for all position events.
virtual void SetClosed(bool isClosed, int timestep=0)
Set closed property to given boolean.
virtual unsigned int GetSlice() const
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.
A data structure describing a label.
BaseRenderer * GetSender() const
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 unsigned int GetTimeStep() const
void Expand(unsigned int timeSteps) override
Expand the timebounds of the TimeGeometry to given number of timesteps.
Image class for storing images.
mitk::Image::Pointer image
PixelType GetValue() 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)
Class for nodes of the DataTree.