InsightSoftwareConsortium / InsightSoftwareConsortium/ITK

Make instantiation of cost function internal

Open
#6,353 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.