13 #ifndef mitkSurfaceInterpolationController_h
14 #define mitkSurfaceInterpolationController_h
25 class ComputeContourSetNormalsFilter;
26 class CreateDistanceImageFromSurfaceFilter;
27 class MultiLabelSegmentation;
28 class ReduceContourSetFilter;
34 itkFactorylessNewMacro(Self);
40 PlaneGeometry::ConstPointer
Plane;
52 PlaneGeometry::ConstPointer plane,
58 LabelValue(labelValue),
69 typedef std::vector<ContourPositionInformation>
CPIVector;
77 void AddNewContours(
const std::vector<ContourPositionInformation>& newCPIs,
bool reinitializeAction =
false,
bool silent =
false);
199 template <
typename TPixel,
unsigned int VImageDimension>
200 void GetImageBase(itk::Image<TPixel, VImageDimension> *input, itk::ImageBase<3>::Pointer &result);
210 void OnSegmentationDeleted(
const itk::Object *caller,
const itk::EventObject &event);
217 void OnRemoveLabel(
const itk::Object* caller,
const itk::EventObject& event);
229 DataStorage::SetOfObjects::ConstPointer GetPlaneGeometryNodeFromDataStorage(
const DataNode* segNode)
const;
242 void ClearInterpolationSession();
254 unsigned int m_DistanceImageVolume;
255 mitk::DataStorage::Pointer m_DataStorage;
#define MITKSURFACEINTERPOLATION_EXPORT
Stores vertices for drawing a contour.
Class for nodes of the DataTree.
A data structure describing a label.
MultiLabelSegmentation class for handling labels and layers in a segmentation session.
mitk::Label::PixelType LabelValueType
Class for defining the data type of pixels.
Describes a two-dimensional, rectangular plane.
Plane surface representation.
A filter that reduces the number of points of contours represented by a mitk::Surface.
void SetDistanceImageVolume(unsigned int distImageVolume)
mitk::DataNode * GetSegmentationImageNode() const
Get the Segmentation Image Node object.
unsigned int GetNumberOfInterpolationSessions()
mitkClassMacroItkParent(SurfaceInterpolationController, itk::Object)
mitk::Surface::Pointer GetInterpolationResult(const MultiLabelSegmentation *segmentationImage, MultiLabelSegmentation::LabelValueType labelValue, TimeStepType timeStep)
Get the Result of the interpolation operation.
void RemoveContours(const MultiLabelSegmentation *segmentationImage, mitk::Label::PixelType label, TimeStepType timeStep)
Removes contours of a particular label and at a given time step for the current session/segmentation.
bool RemoveContour(ContourPositionInformation contourInfo, bool keepPlaceholderForUndo=false)
Removes the contour for a given plane for the current selected segmentation.
std::vector< ContourPositionInformation > CPIVector
SurfaceInterpolationController()
static SurfaceInterpolationController * GetInstance()
void CompleteReinitialization(const std::vector< ContourPositionInformation > &newCPIs)
Triggered with the "Reinit Interpolation" action. The contours are used to repopulate the.
void SetMaxSpacing(double maxSpacing)
Sets the minimum spacing of the current selected segmentation This is needed since the contour points...
void SetCurrentInterpolationSession(MultiLabelSegmentation *currentSegmentationImage)
void AddNewContours(const std::vector< ContourPositionInformation > &newCPIs, bool reinitializeAction=false, bool silent=false)
Adds new extracted contours to the list. If one or more contours at a given position already exist th...
void Interpolate(const MultiLabelSegmentation *segmentationImage, MultiLabelSegmentation::LabelValueType labelValue, TimeStepType timeStep)
Performs the interpolation.
void RemoveInterpolationSession(const MultiLabelSegmentation *segmentationImage)
Remove interpolation session.
mitk::MultiLabelSegmentation * GetCurrentSegmentation()
Get the current selected segmentation for which the interpolation is performed.
~SurfaceInterpolationController() override
CPIVector * GetContours(MultiLabelSegmentation::LabelValueType labelValue, TimeStepType timeStep)
Get the Contours at a certain timeStep and layerID.
std::vector< MultiLabelSegmentation::LabelValueType > GetAffectedLabels(const MultiLabelSegmentation *seg, TimeStepType timeStep, const PlaneGeometry *plane) const
void SetMinSpacing(double minSpacing)
Sets the minimum spacing of the current selected segmentation This is needed since the contour points...
void RemoveAllInterpolationSessions()
Removes all sessions.
void SetDataStorage(DataStorage::Pointer ds)
void RemoveContours(const MultiLabelSegmentation *segmentationImage, mitk::Label::PixelType label)
Removes contours of a particular label and at a given time step for the current session/segmentation.
void GetImageBase(itk::Image< TPixel, VImageDimension > *input, itk::ImageBase< 3 >::Pointer &result)
Find image slices visible on a given plane.