ITKMinimalPathExtraction icon indicating copy to clipboard operation
ITKMinimalPathExtraction copied to clipboard

Make instantiation of cost function internal

Open romangrothausmann opened this issue 5 years ago • 1 comments

Why is the (special) cost function (SingleImageCostFunction) not instantiated internally? From the publication it seems that

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? If there are no other, the instantiation of cost function could be done internally, so that it is not necessary when using SpeedFunctionToPathFilter.

romangrothausmann avatar Apr 12 '19 09:04 romangrothausmann