13 #ifndef mitkImageLiveWireContourModelFilter_h
14 #define mitkImageLiveWireContourModelFilter_h
51 itkFactorylessNewMacro(Self);
75 itkSetMacro(UseDynamicCostMap,
bool);
76 itkGetMacro(UseDynamicCostMap,
bool);
99 using Superclass::SetInput;
128 void SetUseCostFunction(
bool doUseCostFunction) { m_ShortestPathFilter->SetUseCostFunction(doUseCostFunction); };
164 template <
typename TPixel,
unsigned int VImageDimension>
167 template <
typename TPixel,
unsigned int VImageDimension>
#define MITKSEGMENTATION_EXPORT
Cost function for LiveWire interactive segmentation.
ITK image filter that computes the shortest path between pixels using A*.
Base class for all pipeline sources that produce mitk::ContourModel outputs.
A time-resolved contour representation consisting of linked vertices in 3D space.
Calculates a LiveWire contour between two points in an image.
mitk::Point3D m_StartPoint
Start point in world coordinates.
void CreateDynamicCostMapByITK(const itk::Image< TPixel, VImageDimension > *inputImage, mitk::ContourModel *path=nullptr)
virtual void DumpMaskImage()
Debug helper that dumps the internal mask image.
void RemoveRepulsivePoint(const itk::Index< 2 > &idx)
Remove a single repulsive point from the cost function.
CostFunctionType::Pointer m_CostFunction
The cost function to compute costs between two pixels.
ImageLiveWireContourModelFilter()
const InputType * GetInput(void)
Get the first input image.
mitk::Point3D m_EndPointInIndex
End point in image index coordinates.
~ImageLiveWireContourModelFilter() override
InternalImageType::Pointer m_InternalImage
mitkClassMacro(ImageLiveWireContourModelFilter, ContourModelSource)
void ItkPreProcessImage(const itk::Image< TPixel, VImageDimension > *inputImage)
const InputType * GetInput(unsigned int idx)
Get the input image at a specific index.
virtual void SetInput(const InputType *input)
Set the input image for the LiveWire computation.
void SetRepulsivePoints(const ShortestPathType &points)
Set a vector with repulsive points to use in the cost function.
mitk::Point3D m_EndPoint
End point in world coordinates.
OutputType::Pointer OutputTypePointer
virtual void SetInput(unsigned int idx, const InputType *input)
Set the input image at a specific index.
ShortestPathImageFilterType::Pointer m_ShortestPathFilter
Shortest path filter according to cost function m_CostFunction.
void ClearRepulsivePoints()
Clear all repulsive points used in the cost function.
void AddRepulsivePoint(const itk::Index< 2 > &idx)
Add a single repulsive point to the cost function.
std::vector< itk::Index< 2 > > ShortestPathType
mitk::Point3D m_StartPointInIndex
Start point in image index coordinates.
void GenerateData() override
bool CreateDynamicCostMap(mitk::ContourModel *path=nullptr)
Create a dynamic cost transfer map using on-the-fly training.
itk::ShortestPathImageFilter< InternalImageType, InternalImageType > ShortestPathImageFilterType
itk::ShortestPathCostFunctionLiveWire< InternalImageType > CostFunctionType
virtual OutputType * GetOutput()
Get the output contour model.
void SetUseCostFunction(bool doUseCostFunction)
Enable or disable the cost function in the shortest path filter.
bool m_UseDynamicCostMap
Flag to use a dynamic cost map or not.
itk::Image< float, 2 > InternalImageType
void GenerateOutputInformation() override
Image class for storing multi-dimensional medical image data.
Provides the AccessByItk macro family for type-safe access to mitk::Image data through ITK image type...
Find image slices visible on a given plane.