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),
65 return Contour.IsNull();
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;
243 void ClearInterpolationSession();
255 unsigned int m_DistanceImageVolume;
256 mitk::DataStorage::Pointer m_DataStorage;
#define MITKSURFACEINTERPOLATION_EXPORT
Central node class of the MITK data tree, associating a data object with properties and mappers.
A data structure describing a label in a multi-label segmentation.
unsigned short PixelType
Pixel type used for label values (unsigned short).
MultiLabelSegmentation class for handling labels and layers in a segmentation session.
mitk::Label::PixelType LabelValueType
Describes the data type of image pixels.
Describes the geometry of a plane object.
Bounding object representing a flat plane surface.
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)
A weak pointer that observes an itk::Object without preventing its deletion.
Find image slices visible on a given plane.
std::size_t TimeStepType
Type for time step indices (non-negative integers starting from 0).