InsightSoftwareConsortium / InsightSoftwareConsortium/ITK
Make instantiation of cost function internal
- Dominant language
- C++
- Stars
- 1.7k
- Forks
- 748
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 64
Description
Why is the (special) cost function ([SingleImageCostFunction](https://github.com/InsightSoftwareConsortium/ITKMinimalPathExtraction/blob/master/include/itkSingleImageCostFunction.h)) not instantiated internally? From the publication it seems that
```c++
PathFilterType :: CostFunctionType :: Pointer cost =
PathFilterType :: CostFunctionType :: New ();
PathFilterType :: Pointer pathFilter = PathFilterType :: New ();
pathFilter -> SetCostFunction ( cost );
```
is expected when employing `SpeedFunctionToPathFilter`.
What cases could there be where the cost function here would not be the predefined [SingleImageCostFunction](https://github.com/InsightSoftwareConsortium/ITKMinimalPathExtraction/blob/master/include/itkSingleImageCostFunction.h)?
If there are no other, the instantiation of cost function could be done internally, so that it is not necessary when using `SpeedFunctionToPathFilter`.
Contributor guide
Assessment
This issue has not been assessed yet.