59 m_FeedbackContourNode->SetProperty(
"contour.color",
ColorProperty::New(0.0 / 255.0, 255.0 / 255.0, 0.0 / 255.0));
64 Superclass::Deactivated();
65 DataStorage *storage = m_ToolManager->GetDataStorage();
66 if (storage && m_FeedbackContourNode.IsNotNull())
68 storage->
Remove(m_FeedbackContourNode);
69 m_FeedbackContour->Clear();
70 SetFeedbackContourVisible(
false);
76 Superclass::Activated();
78 SetFeedbackContourVisible(
true);
83 return m_FeedbackContour;
88 m_FeedbackContour = contour;
89 m_FeedbackContourNode->SetData(m_FeedbackContour);
94 if (m_FeedbackContourVisible == visible)
97 if (
DataStorage *storage = m_ToolManager->GetDataStorage())
101 storage->Add(m_FeedbackContourNode);
105 storage->Remove(m_FeedbackContourNode);
109 m_FeedbackContourVisible = visible;
114 bool correctionForIpSegmentation,
115 bool constrainToInside)
118 slice, contourIn3D, correctionForIpSegmentation, constrainToInside);
123 bool correctionForIpSegmentation)
126 sliceGeometry, contourIn2D, correctionForIpSegmentation);
131 int paintingPixelValue)
133 this->FillContourInSlice(projectedContour, 0, sliceImage, paintingPixelValue);
137 unsigned int timeStep,
139 int paintingPixelValue)
static ContourModel::Pointer BackProjectContourFrom2DSlice(const BaseGeometry *sliceGeometry, ContourModel *contourIn2D, bool correctionForIpSegmentation=false)
Projects a slice index coordinates of a contour back into world coordinates.
ContourModel is a structure of linked vertices defining a contour in 3D space. The vertices are store...
Data management class that handles 'was created by' relations.
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.
Image class for storing images.
static ContourModel::Pointer ProjectContourTo2DSlice(Image *slice, ContourModel *contourIn3D, bool correctionForIpSegmentation, bool constrainToInside)
Projects a contour onto an image point by point. Converts from world to index coordinates.
virtual void Remove(const mitk::DataNode *node)=0
Removes node from the DataStorage.
itk::SmartPointer< Self > Pointer
BaseGeometry Describes the geometry of a data object.