13 #ifndef mitkSurfaceInterpolationController_h
14 #define mitkSurfaceInterpolationController_h
25 class ComputeContourSetNormalsFilter;
26 class CreateDistanceImageFromSurfaceFilter;
28 class ReduceContourSetFilter;
34 itkFactorylessNewMacro(Self);
36 itkGetMacro(DistanceImageSpacing,
double);
55 LayerValue(std::numeric_limits<unsigned int>::max()),
56 TimeStep(std::numeric_limits<size_t>::max())
67 typedef std::map<mitk::Image *, ContourPositionInformationVec3D>
ContourListMap;
74 if (m_CurrentTimePoint != tp)
76 m_CurrentTimePoint = tp;
78 if (m_SelectedSegmentation)
80 this->ReinitializeInterpolation();
98 void AddNewContours(
const std::vector<Surface::Pointer>& newContours, std::vector<const mitk::PlaneGeometry*>& contourPlanes,
bool reinitializeAction =
false);
105 const mitk::Surface *GetContour(
const ContourPositionInformation& contourInfo);
121 void AddLabelSetConnection();
127 void RemoveLabelSetConnection();
136 void ReinitializeInterpolation();
138 void RemoveObservers();
140 void AddLabelSetConnection(
unsigned int layerID);
144 m_SelectedSegmentation =
nullptr;
151 unsigned int GetNumberOfLayersInCurrentSegmentation()
const;
157 void SetNumberOfLayersInCurrentSegmentation(
unsigned int);
163 void OnRemoveLayer();
175 unsigned int GetNumberOfContours();
196 void SetMinSpacing(
double minSpacing);
203 void SetMaxSpacing(
double maxSpacing);
209 void SetDistanceImageVolume(
unsigned int distImageVolume);
217 Surface *GetContoursAsSurface();
260 void RemoveAllInterpolationSessions();
271 ContourPositionInformationList* GetContours(
unsigned int timeStep,
unsigned int layerID);
280 void CompleteReinitialization(
const std::vector<mitk::Surface::Pointer>& contourList,
281 std::vector<const mitk::PlaneGeometry *>& contourPlanes);
296 double EstimatePortionOfNeededMemory();
303 unsigned int GetNumberOfInterpolationSessions();
310 bool RemoveContour(ContourPositionInformation contourInfo);
326 template <
typename TPixel,
unsigned int VImageDimension>
327 void GetImageBase(itk::Image<TPixel, VImageDimension> *input, itk::ImageBase<3>::Pointer &result);
337 void OnSegmentationDeleted(
const itk::Object *caller,
const itk::EventObject &event);
353 void AddPlaneGeometryNodeToDataStorage(
const ContourPositionInformation& contourInfo);
365 void ClearInterpolationSession();
373 void AddToInterpolationPipeline(ContourPositionInformation& contourInfo,
bool reinitializationAction =
false);
379 void OnLayerChanged();
387 double m_DistanceImageSpacing;
393 ContourContainer m_ListOfInterpolationSessions;
394 ContourListMap m_ListOfContours;
398 unsigned int m_CurrentNumberOfReducedContours;
399 unsigned int m_NumberOfConnectionsAdded;
403 std::map<mitk::Image *, unsigned long> m_SegmentationObserverTags;
407 unsigned int m_ContourIndex;
408 unsigned int m_ContourPosIndex;
409 unsigned int m_NumberOfLayersInCurrentSegmentation;
414 unsigned int m_PreviousLayerIndex;
415 unsigned int m_CurrentLayerIndex;
439 template<
unsigned int VImageDimension>
458 size_t numPointsToSampleDim1,
461 size_t numPointsToSampleDim2,
463 double valuePlaneDim);