diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/Algorithms/ITKImportFijiMontage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/Algorithms/ITKImportFijiMontage.cpp index 0b0f0ec9ba..89f6d723aa 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/Algorithms/ITKImportFijiMontage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/Algorithms/ITKImportFijiMontage.cpp @@ -267,7 +267,7 @@ class IOHandler // rename grayscale array to reflect original { - auto& gray = m_DataStructure.getDataRefAs(imageDataPath.getParent().createChildPath("gray" + imageDataPath.getTargetName())); + auto& gray = m_DataStructure.getDataRefAs(imageDataPath.replaceName("gray" + imageDataPath.getTargetName())); if(!gray.canRename(imageDataPath.getTargetName())) { return MakeErrorResult(-18543, fmt::format("Unable to rename the grayscale array to {}", imageDataPath.getTargetName())); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKAbsImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKAbsImage.cpp index ca15995937..4d5bec96f2 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKAbsImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKAbsImage.cpp @@ -92,7 +92,7 @@ IFilter::PreflightResult ITKAbsImage::preflightImpl(const DataStructure& dataStr auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -106,7 +106,7 @@ Result<> ITKAbsImage::executeImpl(DataStructure& dataStructure, const Arguments& auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); const cxITKAbsImage::ITKAbsImageFunctor itkFunctor = {}; diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKAcosImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKAcosImage.cpp index 3ab91dae87..d4f6cbd0f2 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKAcosImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKAcosImage.cpp @@ -92,7 +92,7 @@ IFilter::PreflightResult ITKAcosImage::preflightImpl(const DataStructure& dataSt auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -106,7 +106,7 @@ Result<> ITKAcosImage::executeImpl(DataStructure& dataStructure, const Arguments auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); const cxITKAcosImage::ITKAcosImageFunctor itkFunctor = {}; diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKAdaptiveHistogramEqualizationImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKAdaptiveHistogramEqualizationImage.cpp index 5a80af0ff7..d82f04e55f 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKAdaptiveHistogramEqualizationImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKAdaptiveHistogramEqualizationImage.cpp @@ -120,7 +120,7 @@ IFilter::PreflightResult ITKAdaptiveHistogramEqualizationImage::preflightImpl(co auto alpha = filterArgs.value(k_Alpha_Key); auto beta = filterArgs.value(k_Beta_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -134,7 +134,7 @@ Result<> ITKAdaptiveHistogramEqualizationImage::executeImpl(DataStructure& dataS auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto radius = filterArgs.value(k_Radius_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKApproximateSignedDistanceMapImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKApproximateSignedDistanceMapImage.cpp index 2c906a8839..7a06880681 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKApproximateSignedDistanceMapImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKApproximateSignedDistanceMapImage.cpp @@ -103,7 +103,7 @@ IFilter::PreflightResult ITKApproximateSignedDistanceMapImage::preflightImpl(con auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); auto insideValue = filterArgs.value(k_InsideValue_Key); auto outsideValue = filterArgs.value(k_OutsideValue_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck( dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -118,7 +118,7 @@ Result<> ITKApproximateSignedDistanceMapImage::executeImpl(DataStructure& dataSt auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto insideValue = filterArgs.value(k_InsideValue_Key); auto outsideValue = filterArgs.value(k_OutsideValue_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKAsinImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKAsinImage.cpp index 6f94d79791..592c815fcb 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKAsinImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKAsinImage.cpp @@ -92,7 +92,7 @@ IFilter::PreflightResult ITKAsinImage::preflightImpl(const DataStructure& dataSt auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -106,7 +106,7 @@ Result<> ITKAsinImage::executeImpl(DataStructure& dataStructure, const Arguments auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); const cxITKAsinImage::ITKAsinImageFunctor itkFunctor = {}; diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKAtanImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKAtanImage.cpp index a74f2b0a28..c4dc86cd18 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKAtanImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKAtanImage.cpp @@ -92,7 +92,7 @@ IFilter::PreflightResult ITKAtanImage::preflightImpl(const DataStructure& dataSt auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -106,7 +106,7 @@ Result<> ITKAtanImage::executeImpl(DataStructure& dataStructure, const Arguments auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); const cxITKAtanImage::ITKAtanImageFunctor itkFunctor = {}; diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryContourImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryContourImage.cpp index 218c430573..9ad7bc528c 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryContourImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryContourImage.cpp @@ -111,7 +111,7 @@ IFilter::PreflightResult ITKBinaryContourImage::preflightImpl(const DataStructur auto fullyConnected = filterArgs.value(k_FullyConnected_Key); auto backgroundValue = filterArgs.value(k_BackgroundValue_Key); auto foregroundValue = filterArgs.value(k_ForegroundValue_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -125,7 +125,7 @@ Result<> ITKBinaryContourImage::executeImpl(DataStructure& dataStructure, const auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); auto backgroundValue = filterArgs.value(k_BackgroundValue_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryDilateImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryDilateImage.cpp index 4e5f355d0a..99a9897308 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryDilateImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryDilateImage.cpp @@ -120,7 +120,7 @@ IFilter::PreflightResult ITKBinaryDilateImage::preflightImpl(const DataStructure auto backgroundValue = filterArgs.value(k_BackgroundValue_Key); auto foregroundValue = filterArgs.value(k_ForegroundValue_Key); auto boundaryToForeground = filterArgs.value(k_BoundaryToForeground_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -134,7 +134,7 @@ Result<> ITKBinaryDilateImage::executeImpl(DataStructure& dataStructure, const A auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto kernelRadius = filterArgs.value::ValueType>(k_KernelRadius_Key); auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryErodeImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryErodeImage.cpp index 7f5030e94e..f452012190 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryErodeImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryErodeImage.cpp @@ -120,7 +120,7 @@ IFilter::PreflightResult ITKBinaryErodeImage::preflightImpl(const DataStructure& auto backgroundValue = filterArgs.value(k_BackgroundValue_Key); auto foregroundValue = filterArgs.value(k_ForegroundValue_Key); auto boundaryToForeground = filterArgs.value(k_BoundaryToForeground_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -134,7 +134,7 @@ Result<> ITKBinaryErodeImage::executeImpl(DataStructure& dataStructure, const Ar auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto kernelRadius = filterArgs.value::ValueType>(k_KernelRadius_Key); auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryMorphologicalClosingImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryMorphologicalClosingImage.cpp index ea182d0ad2..7956486413 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryMorphologicalClosingImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryMorphologicalClosingImage.cpp @@ -115,7 +115,7 @@ IFilter::PreflightResult ITKBinaryMorphologicalClosingImage::preflightImpl(const auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); auto foregroundValue = filterArgs.value(k_ForegroundValue_Key); auto safeBorder = filterArgs.value(k_SafeBorder_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -129,7 +129,7 @@ Result<> ITKBinaryMorphologicalClosingImage::executeImpl(DataStructure& dataStru auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto kernelRadius = filterArgs.value::ValueType>(k_KernelRadius_Key); auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryMorphologicalOpeningImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryMorphologicalOpeningImage.cpp index bbf3968a7c..cfd4da3982 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryMorphologicalOpeningImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryMorphologicalOpeningImage.cpp @@ -115,7 +115,7 @@ IFilter::PreflightResult ITKBinaryMorphologicalOpeningImage::preflightImpl(const auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); auto backgroundValue = filterArgs.value(k_BackgroundValue_Key); auto foregroundValue = filterArgs.value(k_ForegroundValue_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -129,7 +129,7 @@ Result<> ITKBinaryMorphologicalOpeningImage::executeImpl(DataStructure& dataStru auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto kernelRadius = filterArgs.value::ValueType>(k_KernelRadius_Key); auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryOpeningByReconstructionImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryOpeningByReconstructionImage.cpp index 2813f3faa4..33b9011e33 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryOpeningByReconstructionImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryOpeningByReconstructionImage.cpp @@ -123,7 +123,7 @@ IFilter::PreflightResult ITKBinaryOpeningByReconstructionImage::preflightImpl(co auto foregroundValue = filterArgs.value(k_ForegroundValue_Key); auto backgroundValue = filterArgs.value(k_BackgroundValue_Key); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -137,7 +137,7 @@ Result<> ITKBinaryOpeningByReconstructionImage::executeImpl(DataStructure& dataS auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto kernelRadius = filterArgs.value::ValueType>(k_KernelRadius_Key); auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryProjectionImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryProjectionImage.cpp index 35f60a9952..83679b0a1b 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryProjectionImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryProjectionImage.cpp @@ -112,7 +112,7 @@ IFilter::PreflightResult ITKBinaryProjectionImage::preflightImpl(const DataStruc auto projectionDimension = filterArgs.value(k_ProjectionDimension_Key); auto foregroundValue = filterArgs.value(k_ForegroundValue_Key); auto backgroundValue = filterArgs.value(k_BackgroundValue_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -126,7 +126,7 @@ Result<> ITKBinaryProjectionImage::executeImpl(DataStructure& dataStructure, con auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto projectionDimension = filterArgs.value(k_ProjectionDimension_Key); auto foregroundValue = filterArgs.value(k_ForegroundValue_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryThinningImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryThinningImage.cpp index bb647ffd60..c6553a3ea2 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryThinningImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryThinningImage.cpp @@ -92,7 +92,7 @@ IFilter::PreflightResult ITKBinaryThinningImage::preflightImpl(const DataStructu auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -106,7 +106,7 @@ Result<> ITKBinaryThinningImage::executeImpl(DataStructure& dataStructure, const auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); const cxITKBinaryThinningImage::ITKBinaryThinningImageFunctor itkFunctor = {}; diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryThresholdImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryThresholdImage.cpp index b48f41c807..0c8179424f 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryThresholdImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBinaryThresholdImage.cpp @@ -113,7 +113,7 @@ IFilter::PreflightResult ITKBinaryThresholdImage::preflightImpl(const DataStruct auto upperThreshold = filterArgs.value(k_UpperThreshold_Key); auto insideValue = filterArgs.value(k_InsideValue_Key); auto outsideValue = filterArgs.value(k_OutsideValue_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -128,7 +128,7 @@ Result<> ITKBinaryThresholdImage::executeImpl(DataStructure& dataStructure, cons auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto lowerThreshold = filterArgs.value(k_LowerThreshold_Key); auto upperThreshold = filterArgs.value(k_UpperThreshold_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBlackTopHatImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBlackTopHatImage.cpp index 55b86f96c9..0f0ae9c96d 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBlackTopHatImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBlackTopHatImage.cpp @@ -111,7 +111,7 @@ IFilter::PreflightResult ITKBlackTopHatImage::preflightImpl(const DataStructure& auto kernelRadius = filterArgs.value::ValueType>(k_KernelRadius_Key); auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); auto safeBorder = filterArgs.value(k_SafeBorder_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -125,7 +125,7 @@ Result<> ITKBlackTopHatImage::executeImpl(DataStructure& dataStructure, const Ar auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto kernelRadius = filterArgs.value::ValueType>(k_KernelRadius_Key); auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBoundedReciprocalImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBoundedReciprocalImage.cpp index 02f07358da..61ebe81e6a 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBoundedReciprocalImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKBoundedReciprocalImage.cpp @@ -93,7 +93,7 @@ IFilter::PreflightResult ITKBoundedReciprocalImage::preflightImpl(const DataStru auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageDataPath_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -108,7 +108,7 @@ Result<> ITKBoundedReciprocalImage::executeImpl(DataStructure& dataStructure, co auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageDataPath_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); const cxITKBoundedReciprocalImage::ITKBoundedReciprocalImageFunctor itkFunctor = {}; diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKClosingByReconstructionImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKClosingByReconstructionImage.cpp index 890b3413ae..1d52c09f1c 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKClosingByReconstructionImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKClosingByReconstructionImage.cpp @@ -120,7 +120,7 @@ IFilter::PreflightResult ITKClosingByReconstructionImage::preflightImpl(const Da auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); auto preserveIntensities = filterArgs.value(k_PreserveIntensities_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -134,7 +134,7 @@ Result<> ITKClosingByReconstructionImage::executeImpl(DataStructure& dataStructu auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto kernelRadius = filterArgs.value::ValueType>(k_KernelRadius_Key); auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKConnectedComponentImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKConnectedComponentImage.cpp index f45e3f2bbe..96310205e6 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKConnectedComponentImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKConnectedComponentImage.cpp @@ -102,7 +102,7 @@ IFilter::PreflightResult ITKConnectedComponentImage::preflightImpl(const DataStr auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -117,7 +117,7 @@ Result<> ITKConnectedComponentImage::executeImpl(DataStructure& dataStructure, c auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKCosImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKCosImage.cpp index a6969c162b..a85890286e 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKCosImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKCosImage.cpp @@ -92,7 +92,7 @@ IFilter::PreflightResult ITKCosImage::preflightImpl(const DataStructure& dataStr auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -106,7 +106,7 @@ Result<> ITKCosImage::executeImpl(DataStructure& dataStructure, const Arguments& auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); const cxITKCosImage::ITKCosImageFunctor itkFunctor = {}; diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKCurvatureAnisotropicDiffusionImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKCurvatureAnisotropicDiffusionImage.cpp index 16d3980681..bc6607bd71 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKCurvatureAnisotropicDiffusionImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKCurvatureAnisotropicDiffusionImage.cpp @@ -111,7 +111,7 @@ IFilter::PreflightResult ITKCurvatureAnisotropicDiffusionImage::preflightImpl(co auto conductanceParameter = filterArgs.value(k_ConductanceParameter_Key); auto conductanceScalingUpdateInterval = filterArgs.value(k_ConductanceScalingUpdateInterval_Key); auto numberOfIterations = filterArgs.value(k_NumberOfIterations_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -125,7 +125,7 @@ Result<> ITKCurvatureAnisotropicDiffusionImage::executeImpl(DataStructure& dataS auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto timeStep = filterArgs.value(k_TimeStep_Key); auto conductanceParameter = filterArgs.value(k_ConductanceParameter_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKCurvatureFlowImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKCurvatureFlowImage.cpp index 14a4e3e30f..60c935ea6b 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKCurvatureFlowImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKCurvatureFlowImage.cpp @@ -103,7 +103,7 @@ IFilter::PreflightResult ITKCurvatureFlowImage::preflightImpl(const DataStructur auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); auto timeStep = filterArgs.value(k_TimeStep_Key); auto numberOfIterations = filterArgs.value(k_NumberOfIterations_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -117,7 +117,7 @@ Result<> ITKCurvatureFlowImage::executeImpl(DataStructure& dataStructure, const auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto timeStep = filterArgs.value(k_TimeStep_Key); auto numberOfIterations = filterArgs.value(k_NumberOfIterations_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKDanielssonDistanceMapImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKDanielssonDistanceMapImage.cpp index 26f596c3b5..cc29f847cf 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKDanielssonDistanceMapImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKDanielssonDistanceMapImage.cpp @@ -111,7 +111,7 @@ IFilter::PreflightResult ITKDanielssonDistanceMapImage::preflightImpl(const Data auto inputIsBinary = filterArgs.value(k_InputIsBinary_Key); auto squaredDistance = filterArgs.value(k_SquaredDistance_Key); auto useImageSpacing = filterArgs.value(k_UseImageSpacing_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -126,7 +126,7 @@ Result<> ITKDanielssonDistanceMapImage::executeImpl(DataStructure& dataStructure auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto inputIsBinary = filterArgs.value(k_InputIsBinary_Key); auto squaredDistance = filterArgs.value(k_SquaredDistance_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKDilateObjectMorphologyImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKDilateObjectMorphologyImage.cpp index 22ac205492..25b750f255 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKDilateObjectMorphologyImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKDilateObjectMorphologyImage.cpp @@ -111,7 +111,7 @@ IFilter::PreflightResult ITKDilateObjectMorphologyImage::preflightImpl(const Dat auto kernelRadius = filterArgs.value::ValueType>(k_KernelRadius_Key); auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); auto objectValue = filterArgs.value(k_ObjectValue_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -125,7 +125,7 @@ Result<> ITKDilateObjectMorphologyImage::executeImpl(DataStructure& dataStructur auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto kernelRadius = filterArgs.value::ValueType>(k_KernelRadius_Key); auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKDiscreteGaussianImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKDiscreteGaussianImage.cpp index a580c8dd2e..eac6361b3d 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKDiscreteGaussianImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKDiscreteGaussianImage.cpp @@ -125,7 +125,7 @@ IFilter::PreflightResult ITKDiscreteGaussianImage::preflightImpl(const DataStruc auto maximumError = filterArgs.value(k_MaximumError_Key); auto useImageSpacing = filterArgs.value(k_UseImageSpacing_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -139,7 +139,7 @@ Result<> ITKDiscreteGaussianImage::executeImpl(DataStructure& dataStructure, con auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto variance = filterArgs.value(k_Variance_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKDoubleThresholdImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKDoubleThresholdImage.cpp index f752bcb742..99d57fd160 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKDoubleThresholdImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKDoubleThresholdImage.cpp @@ -139,7 +139,7 @@ IFilter::PreflightResult ITKDoubleThresholdImage::preflightImpl(const DataStruct auto insideValue = filterArgs.value(k_InsideValue_Key); auto outsideValue = filterArgs.value(k_OutsideValue_Key); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -154,7 +154,7 @@ Result<> ITKDoubleThresholdImage::executeImpl(DataStructure& dataStructure, cons auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto threshold1 = filterArgs.value(k_Threshold1_Key); auto threshold2 = filterArgs.value(k_Threshold2_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKErodeObjectMorphologyImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKErodeObjectMorphologyImage.cpp index 18edd056c7..4ad9e7f427 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKErodeObjectMorphologyImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKErodeObjectMorphologyImage.cpp @@ -115,7 +115,7 @@ IFilter::PreflightResult ITKErodeObjectMorphologyImage::preflightImpl(const Data auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); auto objectValue = filterArgs.value(k_ObjectValue_Key); auto backgroundValue = filterArgs.value(k_BackgroundValue_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -129,7 +129,7 @@ Result<> ITKErodeObjectMorphologyImage::executeImpl(DataStructure& dataStructure auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto kernelRadius = filterArgs.value::ValueType>(k_KernelRadius_Key); auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKExpImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKExpImage.cpp index c0d821bc15..0bdbb90a5d 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKExpImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKExpImage.cpp @@ -92,7 +92,7 @@ IFilter::PreflightResult ITKExpImage::preflightImpl(const DataStructure& dataStr auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -106,7 +106,7 @@ Result<> ITKExpImage::executeImpl(DataStructure& dataStructure, const Arguments& auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); const cxITKExpImage::ITKExpImageFunctor itkFunctor = {}; diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKExpNegativeImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKExpNegativeImage.cpp index 82d769cc1f..43410036e8 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKExpNegativeImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKExpNegativeImage.cpp @@ -93,7 +93,7 @@ IFilter::PreflightResult ITKExpNegativeImage::preflightImpl(const DataStructure& auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -107,7 +107,7 @@ Result<> ITKExpNegativeImage::executeImpl(DataStructure& dataStructure, const Ar auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); const cxITKExpNegativeImage::ITKExpNegativeImageFunctor itkFunctor = {}; diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGradientAnisotropicDiffusionImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGradientAnisotropicDiffusionImage.cpp index 66d52be80f..692075a98d 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGradientAnisotropicDiffusionImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGradientAnisotropicDiffusionImage.cpp @@ -113,7 +113,7 @@ IFilter::PreflightResult ITKGradientAnisotropicDiffusionImage::preflightImpl(con auto conductanceParameter = filterArgs.value(k_ConductanceParameter_Key); auto conductanceScalingUpdateInterval = filterArgs.value(k_ConductanceScalingUpdateInterval_Key); auto numberOfIterations = filterArgs.value(k_NumberOfIterations_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -127,7 +127,7 @@ Result<> ITKGradientAnisotropicDiffusionImage::executeImpl(DataStructure& dataSt auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto timeStep = filterArgs.value(k_TimeStep_Key); auto conductanceParameter = filterArgs.value(k_ConductanceParameter_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGradientMagnitudeImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGradientMagnitudeImage.cpp index f71afbcefe..e716e091e6 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGradientMagnitudeImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGradientMagnitudeImage.cpp @@ -104,7 +104,7 @@ IFilter::PreflightResult ITKGradientMagnitudeImage::preflightImpl(const DataStru auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); auto useImageSpacing = filterArgs.value(k_UseImageSpacing_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -119,7 +119,7 @@ Result<> ITKGradientMagnitudeImage::executeImpl(DataStructure& dataStructure, co auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto useImageSpacing = filterArgs.value(k_UseImageSpacing_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGradientMagnitudeRecursiveGaussianImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGradientMagnitudeRecursiveGaussianImage.cpp index 1ea580ceed..1b1ba06bfa 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGradientMagnitudeRecursiveGaussianImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGradientMagnitudeRecursiveGaussianImage.cpp @@ -105,7 +105,7 @@ IFilter::PreflightResult ITKGradientMagnitudeRecursiveGaussianImage::preflightIm auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); auto sigma = filterArgs.value(k_Sigma_Key); auto normalizeAcrossScale = filterArgs.value(k_NormalizeAcrossScale_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck( dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -120,7 +120,7 @@ Result<> ITKGradientMagnitudeRecursiveGaussianImage::executeImpl(DataStructure& auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto sigma = filterArgs.value(k_Sigma_Key); auto normalizeAcrossScale = filterArgs.value(k_NormalizeAcrossScale_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGrayscaleDilateImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGrayscaleDilateImage.cpp index 13d9ec85db..775e71d2eb 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGrayscaleDilateImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGrayscaleDilateImage.cpp @@ -106,7 +106,7 @@ IFilter::PreflightResult ITKGrayscaleDilateImage::preflightImpl(const DataStruct auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); auto kernelRadius = filterArgs.value::ValueType>(k_KernelRadius_Key); auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -120,7 +120,7 @@ Result<> ITKGrayscaleDilateImage::executeImpl(DataStructure& dataStructure, cons auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto kernelRadius = filterArgs.value::ValueType>(k_KernelRadius_Key); auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGrayscaleErodeImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGrayscaleErodeImage.cpp index 86b9b1fe08..bb5f925273 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGrayscaleErodeImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGrayscaleErodeImage.cpp @@ -106,7 +106,7 @@ IFilter::PreflightResult ITKGrayscaleErodeImage::preflightImpl(const DataStructu auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); auto kernelRadius = filterArgs.value::ValueType>(k_KernelRadius_Key); auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -120,7 +120,7 @@ Result<> ITKGrayscaleErodeImage::executeImpl(DataStructure& dataStructure, const auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto kernelRadius = filterArgs.value::ValueType>(k_KernelRadius_Key); auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGrayscaleFillholeImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGrayscaleFillholeImage.cpp index b8dc4a8885..463796b196 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGrayscaleFillholeImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGrayscaleFillholeImage.cpp @@ -102,7 +102,7 @@ IFilter::PreflightResult ITKGrayscaleFillholeImage::preflightImpl(const DataStru auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -116,7 +116,7 @@ Result<> ITKGrayscaleFillholeImage::executeImpl(DataStructure& dataStructure, co auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGrayscaleGrindPeakImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGrayscaleGrindPeakImage.cpp index 574568e9de..038da4f728 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGrayscaleGrindPeakImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGrayscaleGrindPeakImage.cpp @@ -102,7 +102,7 @@ IFilter::PreflightResult ITKGrayscaleGrindPeakImage::preflightImpl(const DataStr auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -116,7 +116,7 @@ Result<> ITKGrayscaleGrindPeakImage::executeImpl(DataStructure& dataStructure, c auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGrayscaleMorphologicalClosingImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGrayscaleMorphologicalClosingImage.cpp index bcb5d194f2..137bbb38c1 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGrayscaleMorphologicalClosingImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGrayscaleMorphologicalClosingImage.cpp @@ -111,7 +111,7 @@ IFilter::PreflightResult ITKGrayscaleMorphologicalClosingImage::preflightImpl(co auto kernelRadius = filterArgs.value::ValueType>(k_KernelRadius_Key); auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); auto safeBorder = filterArgs.value(k_SafeBorder_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -125,7 +125,7 @@ Result<> ITKGrayscaleMorphologicalClosingImage::executeImpl(DataStructure& dataS auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto kernelRadius = filterArgs.value::ValueType>(k_KernelRadius_Key); auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGrayscaleMorphologicalOpeningImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGrayscaleMorphologicalOpeningImage.cpp index 459952599b..6715c7b33c 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGrayscaleMorphologicalOpeningImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKGrayscaleMorphologicalOpeningImage.cpp @@ -111,7 +111,7 @@ IFilter::PreflightResult ITKGrayscaleMorphologicalOpeningImage::preflightImpl(co auto kernelRadius = filterArgs.value::ValueType>(k_KernelRadius_Key); auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); auto safeBorder = filterArgs.value(k_SafeBorder_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -125,7 +125,7 @@ Result<> ITKGrayscaleMorphologicalOpeningImage::executeImpl(DataStructure& dataS auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto kernelRadius = filterArgs.value::ValueType>(k_KernelRadius_Key); auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKHConvexImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKHConvexImage.cpp index 4ca098f13d..d7ba38bd67 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKHConvexImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKHConvexImage.cpp @@ -110,7 +110,7 @@ IFilter::PreflightResult ITKHConvexImage::preflightImpl(const DataStructure& dat auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); auto height = filterArgs.value(k_Height_Key); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -124,7 +124,7 @@ Result<> ITKHConvexImage::executeImpl(DataStructure& dataStructure, const Argume auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto height = filterArgs.value(k_Height_Key); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKHMaximaImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKHMaximaImage.cpp index 15d8e6f66b..b95c144126 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKHMaximaImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKHMaximaImage.cpp @@ -102,7 +102,7 @@ IFilter::PreflightResult ITKHMaximaImage::preflightImpl(const DataStructure& dat auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); auto height = filterArgs.value(k_Height_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -116,7 +116,7 @@ Result<> ITKHMaximaImage::executeImpl(DataStructure& dataStructure, const Argume auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto height = filterArgs.value(k_Height_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKHMinimaImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKHMinimaImage.cpp index 9e4ac17362..73deb045d2 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKHMinimaImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKHMinimaImage.cpp @@ -110,7 +110,7 @@ IFilter::PreflightResult ITKHMinimaImage::preflightImpl(const DataStructure& dat auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); auto height = filterArgs.value(k_Height_Key); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -124,7 +124,7 @@ Result<> ITKHMinimaImage::executeImpl(DataStructure& dataStructure, const Argume auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto height = filterArgs.value(k_Height_Key); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKImportImageStack.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKImportImageStack.cpp index ee504f9f3d..c6a5aab34f 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKImportImageStack.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKImportImageStack.cpp @@ -211,7 +211,7 @@ Result<> ReadImageStack(DataStructure& dataStructure, const DataPath& imageGeomP // rename grayscale array to reflect original { - auto& gray = importedDataStructure.getDataRefAs(imageDataPath.getParent().createChildPath("gray" + imageDataPath.getTargetName())); + auto& gray = importedDataStructure.getDataRefAs(imageDataPath.replaceName("gray" + imageDataPath.getTargetName())); if(!gray.canRename(imageDataPath.getTargetName())) { return MakeErrorResult(-64543, fmt::format("Unable to rename the internal grayscale array to {}", imageDataPath.getTargetName())); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKIntensityWindowingImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKIntensityWindowingImage.cpp index 2814f965fd..90e326f30b 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKIntensityWindowingImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKIntensityWindowingImage.cpp @@ -111,7 +111,7 @@ IFilter::PreflightResult ITKIntensityWindowingImage::preflightImpl(const DataStr auto windowMaximum = filterArgs.value(k_WindowMaximum_Key); auto outputMinimum = filterArgs.value(k_OutputMinimum_Key); auto outputMaximum = filterArgs.value(k_OutputMaximum_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -125,7 +125,7 @@ Result<> ITKIntensityWindowingImage::executeImpl(DataStructure& dataStructure, c auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto windowMinimum = filterArgs.value(k_WindowMinimum_Key); auto windowMaximum = filterArgs.value(k_WindowMaximum_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKInvertIntensityImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKInvertIntensityImage.cpp index dfb6e49f5a..92890f5c92 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKInvertIntensityImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKInvertIntensityImage.cpp @@ -100,7 +100,7 @@ IFilter::PreflightResult ITKInvertIntensityImage::preflightImpl(const DataStruct auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); auto maximum = filterArgs.value(k_Maximum_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -114,7 +114,7 @@ Result<> ITKInvertIntensityImage::executeImpl(DataStructure& dataStructure, cons auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto maximum = filterArgs.value(k_Maximum_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKIsoContourDistanceImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKIsoContourDistanceImage.cpp index 2ab9f30eb8..da012c6352 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKIsoContourDistanceImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKIsoContourDistanceImage.cpp @@ -103,7 +103,7 @@ IFilter::PreflightResult ITKIsoContourDistanceImage::preflightImpl(const DataStr auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); auto levelSetValue = filterArgs.value(k_LevelSetValue_Key); auto farValue = filterArgs.value(k_FarValue_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -118,7 +118,7 @@ Result<> ITKIsoContourDistanceImage::executeImpl(DataStructure& dataStructure, c auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto levelSetValue = filterArgs.value(k_LevelSetValue_Key); auto farValue = filterArgs.value(k_FarValue_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKLabelContourImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKLabelContourImage.cpp index 45354e4308..86ac2e26d2 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKLabelContourImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKLabelContourImage.cpp @@ -108,7 +108,7 @@ IFilter::PreflightResult ITKLabelContourImage::preflightImpl(const DataStructure auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); auto backgroundValue = filterArgs.value(k_BackgroundValue_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -122,7 +122,7 @@ Result<> ITKLabelContourImage::executeImpl(DataStructure& dataStructure, const A auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); auto backgroundValue = filterArgs.value(k_BackgroundValue_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKLaplacianRecursiveGaussianImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKLaplacianRecursiveGaussianImage.cpp index 729e3a3676..d39a8e3c41 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKLaplacianRecursiveGaussianImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKLaplacianRecursiveGaussianImage.cpp @@ -105,7 +105,7 @@ IFilter::PreflightResult ITKLaplacianRecursiveGaussianImage::preflightImpl(const auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); auto sigma = filterArgs.value(k_Sigma_Key); auto normalizeAcrossScale = filterArgs.value(k_NormalizeAcrossScale_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -120,7 +120,7 @@ Result<> ITKLaplacianRecursiveGaussianImage::executeImpl(DataStructure& dataStru auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto sigma = filterArgs.value(k_Sigma_Key); auto normalizeAcrossScale = filterArgs.value(k_NormalizeAcrossScale_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKLog10Image.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKLog10Image.cpp index 02c735a2ad..dba1f9e034 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKLog10Image.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKLog10Image.cpp @@ -92,7 +92,7 @@ IFilter::PreflightResult ITKLog10Image::preflightImpl(const DataStructure& dataS auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -106,7 +106,7 @@ Result<> ITKLog10Image::executeImpl(DataStructure& dataStructure, const Argument auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); const cxITKLog10Image::ITKLog10ImageFunctor itkFunctor = {}; diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKLogImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKLogImage.cpp index c0597b5979..487b9eca78 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKLogImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKLogImage.cpp @@ -92,7 +92,7 @@ IFilter::PreflightResult ITKLogImage::preflightImpl(const DataStructure& dataStr auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -106,7 +106,7 @@ Result<> ITKLogImage::executeImpl(DataStructure& dataStructure, const Arguments& auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); const cxITKLogImage::ITKLogImageFunctor itkFunctor = {}; diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMaskImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMaskImage.cpp index 7f7344c4e3..752a0930f5 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMaskImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMaskImage.cpp @@ -174,7 +174,7 @@ IFilter::PreflightResult ITKMaskImage::preflightImpl(const DataStructure& dataSt auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto outsideValue = filterArgs.value(k_OutsideValue_Key); auto maskArrayPath = filterArgs.value(k_MaskImageDataPath_Key); @@ -197,7 +197,7 @@ Result<> ITKMaskImage::executeImpl(DataStructure& dataStructure, const Arguments auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto outsideValue = filterArgs.value(k_OutsideValue_Key); auto maskArrayPath = filterArgs.value(k_MaskImageDataPath_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMeanProjectionImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMeanProjectionImage.cpp index b6b951eccf..ecc1500f59 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMeanProjectionImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMeanProjectionImage.cpp @@ -100,7 +100,7 @@ IFilter::PreflightResult ITKMeanProjectionImage::preflightImpl(const DataStructu auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageDataPath_Key); auto projectionDimension = filterArgs.value(k_ProjectionDimension_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -115,7 +115,7 @@ Result<> ITKMeanProjectionImage::executeImpl(DataStructure& dataStructure, const auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageDataPath_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto projectionDimension = filterArgs.value(k_ProjectionDimension_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMedianImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMedianImage.cpp index 5abb20127d..84b022247d 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMedianImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMedianImage.cpp @@ -108,7 +108,7 @@ IFilter::PreflightResult ITKMedianImage::preflightImpl(const DataStructure& data auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); auto radius = filterArgs.value(k_Radius_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -122,7 +122,7 @@ Result<> ITKMedianImage::executeImpl(DataStructure& dataStructure, const Argumen auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto radius = filterArgs.value(k_Radius_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMinMaxCurvatureFlowImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMinMaxCurvatureFlowImage.cpp index 1a08d65d5c..0f1e8746cb 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMinMaxCurvatureFlowImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMinMaxCurvatureFlowImage.cpp @@ -108,7 +108,7 @@ IFilter::PreflightResult ITKMinMaxCurvatureFlowImage::preflightImpl(const DataSt auto timeStep = filterArgs.value(k_TimeStep_Key); auto numberOfIterations = filterArgs.value(k_NumberOfIterations_Key); auto stencilRadius = filterArgs.value(k_StencilRadius_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -122,7 +122,7 @@ Result<> ITKMinMaxCurvatureFlowImage::executeImpl(DataStructure& dataStructure, auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto timeStep = filterArgs.value(k_TimeStep_Key); auto numberOfIterations = filterArgs.value(k_NumberOfIterations_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMorphologicalGradientImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMorphologicalGradientImage.cpp index 22d92adea3..bc52371afa 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMorphologicalGradientImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMorphologicalGradientImage.cpp @@ -106,7 +106,7 @@ IFilter::PreflightResult ITKMorphologicalGradientImage::preflightImpl(const Data auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); auto kernelRadius = filterArgs.value::ValueType>(k_KernelRadius_Key); auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -120,7 +120,7 @@ Result<> ITKMorphologicalGradientImage::executeImpl(DataStructure& dataStructure auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto kernelRadius = filterArgs.value::ValueType>(k_KernelRadius_Key); auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMorphologicalWatershedFromMarkersImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMorphologicalWatershedFromMarkersImage.cpp index 3725890180..8fdfb8ffc3 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMorphologicalWatershedFromMarkersImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMorphologicalWatershedFromMarkersImage.cpp @@ -106,7 +106,7 @@ IFilter::PreflightResult ITKMorphologicalWatershedFromMarkersImage::preflightImp auto outputArrayName = filterArgs.value(k_OutputImageDataPath_Key); auto markWatershedLine = filterArgs.value(k_MarkWatershedLine_Key); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -120,7 +120,7 @@ Result<> ITKMorphologicalWatershedFromMarkersImage::executeImpl(DataStructure& d auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageDataPath_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto markWatershedLine = filterArgs.value(k_MarkWatershedLine_Key); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMorphologicalWatershedImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMorphologicalWatershedImage.cpp index 1e01af3216..03d7996a95 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMorphologicalWatershedImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKMorphologicalWatershedImage.cpp @@ -115,7 +115,7 @@ IFilter::PreflightResult ITKMorphologicalWatershedImage::preflightImpl(const Dat auto level = filterArgs.value(k_Level_Key); auto markWatershedLine = filterArgs.value(k_MarkWatershedLine_Key); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -130,7 +130,7 @@ Result<> ITKMorphologicalWatershedImage::executeImpl(DataStructure& dataStructur auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto level = filterArgs.value(k_Level_Key); auto markWatershedLine = filterArgs.value(k_MarkWatershedLine_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKNormalizeImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKNormalizeImage.cpp index ac1d141a98..492c083274 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKNormalizeImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKNormalizeImage.cpp @@ -95,7 +95,7 @@ IFilter::PreflightResult ITKNormalizeImage::preflightImpl(const DataStructure& d auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -110,7 +110,7 @@ Result<> ITKNormalizeImage::executeImpl(DataStructure& dataStructure, const Argu auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); const cxITKNormalizeImage::ITKNormalizeImageFunctor itkFunctor = {}; diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKNormalizeToConstantImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKNormalizeToConstantImage.cpp index 41559704d7..ab99428119 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKNormalizeToConstantImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKNormalizeToConstantImage.cpp @@ -100,7 +100,7 @@ IFilter::PreflightResult ITKNormalizeToConstantImage::preflightImpl(const DataSt auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageDataPath_Key); auto constant = filterArgs.value(k_Constant_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -115,7 +115,7 @@ Result<> ITKNormalizeToConstantImage::executeImpl(DataStructure& dataStructure, auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageDataPath_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto constant = filterArgs.value(k_Constant_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKNotImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKNotImage.cpp index 3d836bfea8..a79b5f1288 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKNotImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKNotImage.cpp @@ -91,7 +91,7 @@ IFilter::PreflightResult ITKNotImage::preflightImpl(const DataStructure& dataStr auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -105,7 +105,7 @@ Result<> ITKNotImage::executeImpl(DataStructure& dataStructure, const Arguments& auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); const cxITKNotImage::ITKNotImageFunctor itkFunctor = {}; diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKOpeningByReconstructionImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKOpeningByReconstructionImage.cpp index f1c2a97e37..a52d14d62e 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKOpeningByReconstructionImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKOpeningByReconstructionImage.cpp @@ -120,7 +120,7 @@ IFilter::PreflightResult ITKOpeningByReconstructionImage::preflightImpl(const Da auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); auto preserveIntensities = filterArgs.value(k_PreserveIntensities_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -134,7 +134,7 @@ Result<> ITKOpeningByReconstructionImage::executeImpl(DataStructure& dataStructu auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto kernelRadius = filterArgs.value::ValueType>(k_KernelRadius_Key); auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKOtsuMultipleThresholdsImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKOtsuMultipleThresholdsImage.cpp index a938e8ba4e..93af949269 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKOtsuMultipleThresholdsImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKOtsuMultipleThresholdsImage.cpp @@ -119,7 +119,7 @@ IFilter::PreflightResult ITKOtsuMultipleThresholdsImage::preflightImpl(const Dat auto numberOfHistogramBins = filterArgs.value(k_NumberOfHistogramBins_Key); auto valleyEmphasis = filterArgs.value(k_ValleyEmphasis_Key); auto returnBinMidpoint = filterArgs.value(k_ReturnBinMidpoint_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -134,7 +134,7 @@ Result<> ITKOtsuMultipleThresholdsImage::executeImpl(DataStructure& dataStructur auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto numberOfThresholds = filterArgs.value(k_NumberOfThresholds_Key); auto labelOffset = filterArgs.value(k_LabelOffset_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKRegionalMaximaImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKRegionalMaximaImage.cpp index 73cda07071..0078dae8f6 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKRegionalMaximaImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKRegionalMaximaImage.cpp @@ -117,7 +117,7 @@ IFilter::PreflightResult ITKRegionalMaximaImage::preflightImpl(const DataStructu auto foregroundValue = filterArgs.value(k_ForegroundValue_Key); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); auto flatIsMaxima = filterArgs.value(k_FlatIsMaxima_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -132,7 +132,7 @@ Result<> ITKRegionalMaximaImage::executeImpl(DataStructure& dataStructure, const auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto backgroundValue = filterArgs.value(k_BackgroundValue_Key); auto foregroundValue = filterArgs.value(k_ForegroundValue_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKRegionalMinimaImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKRegionalMinimaImage.cpp index 762284b90b..97f19dfd65 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKRegionalMinimaImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKRegionalMinimaImage.cpp @@ -117,7 +117,7 @@ IFilter::PreflightResult ITKRegionalMinimaImage::preflightImpl(const DataStructu auto foregroundValue = filterArgs.value(k_ForegroundValue_Key); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); auto flatIsMinima = filterArgs.value(k_FlatIsMinima_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -132,7 +132,7 @@ Result<> ITKRegionalMinimaImage::executeImpl(DataStructure& dataStructure, const auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto backgroundValue = filterArgs.value(k_BackgroundValue_Key); auto foregroundValue = filterArgs.value(k_ForegroundValue_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKRelabelComponentImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKRelabelComponentImage.cpp index e6239b1fd3..7fd59cf9d7 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKRelabelComponentImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKRelabelComponentImage.cpp @@ -109,7 +109,7 @@ IFilter::PreflightResult ITKRelabelComponentImage::preflightImpl(const DataStruc auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); auto minimumObjectSize = filterArgs.value(k_MinimumObjectSize_Key); auto sortByObjectSize = filterArgs.value(k_SortByObjectSize_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -123,7 +123,7 @@ Result<> ITKRelabelComponentImage::executeImpl(DataStructure& dataStructure, con auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto minimumObjectSize = filterArgs.value(k_MinimumObjectSize_Key); auto sortByObjectSize = filterArgs.value(k_SortByObjectSize_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKRescaleIntensityImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKRescaleIntensityImage.cpp index 625b7a5c9f..c0d538c631 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKRescaleIntensityImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKRescaleIntensityImage.cpp @@ -104,7 +104,7 @@ IFilter::PreflightResult ITKRescaleIntensityImage::preflightImpl(const DataStruc auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); auto outputMinimum = filterArgs.value(k_OutputMinimum_Key); auto outputMaximum = filterArgs.value(k_OutputMaximum_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -118,7 +118,7 @@ Result<> ITKRescaleIntensityImage::executeImpl(DataStructure& dataStructure, con auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto outputMinimum = filterArgs.value(k_OutputMinimum_Key); auto outputMaximum = filterArgs.value(k_OutputMaximum_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSigmoidImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSigmoidImage.cpp index 32db82c264..efc2dc8a9a 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSigmoidImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSigmoidImage.cpp @@ -111,7 +111,7 @@ IFilter::PreflightResult ITKSigmoidImage::preflightImpl(const DataStructure& dat auto beta = filterArgs.value(k_Beta_Key); auto outputMaximum = filterArgs.value(k_OutputMaximum_Key); auto outputMinimum = filterArgs.value(k_OutputMinimum_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -125,7 +125,7 @@ Result<> ITKSigmoidImage::executeImpl(DataStructure& dataStructure, const Argume auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto alpha = filterArgs.value(k_Alpha_Key); auto beta = filterArgs.value(k_Beta_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSignedDanielssonDistanceMapImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSignedDanielssonDistanceMapImage.cpp index f83a093006..ddbe26a60a 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSignedDanielssonDistanceMapImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSignedDanielssonDistanceMapImage.cpp @@ -108,7 +108,7 @@ IFilter::PreflightResult ITKSignedDanielssonDistanceMapImage::preflightImpl(cons auto insideIsPositive = filterArgs.value(k_InsideIsPositive_Key); auto squaredDistance = filterArgs.value(k_SquaredDistance_Key); auto useImageSpacing = filterArgs.value(k_UseImageSpacing_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck( dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -123,7 +123,7 @@ Result<> ITKSignedDanielssonDistanceMapImage::executeImpl(DataStructure& dataStr auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto insideIsPositive = filterArgs.value(k_InsideIsPositive_Key); auto squaredDistance = filterArgs.value(k_SquaredDistance_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSignedMaurerDistanceMapImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSignedMaurerDistanceMapImage.cpp index f4b3636288..449196384e 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSignedMaurerDistanceMapImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSignedMaurerDistanceMapImage.cpp @@ -115,7 +115,7 @@ IFilter::PreflightResult ITKSignedMaurerDistanceMapImage::preflightImpl(const Da auto squaredDistance = filterArgs.value(k_SquaredDistance_Key); auto useImageSpacing = filterArgs.value(k_UseImageSpacing_Key); auto backgroundValue = filterArgs.value(k_BackgroundValue_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -130,7 +130,7 @@ Result<> ITKSignedMaurerDistanceMapImage::executeImpl(DataStructure& dataStructu auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto insideIsPositive = filterArgs.value(k_InsideIsPositive_Key); auto squaredDistance = filterArgs.value(k_SquaredDistance_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSinImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSinImage.cpp index 6d88fd612b..4abcb7b580 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSinImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSinImage.cpp @@ -92,7 +92,7 @@ IFilter::PreflightResult ITKSinImage::preflightImpl(const DataStructure& dataStr auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -106,7 +106,7 @@ Result<> ITKSinImage::executeImpl(DataStructure& dataStructure, const Arguments& auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); const cxITKSinImage::ITKSinImageFunctor itkFunctor = {}; diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSmoothingRecursiveGaussianImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSmoothingRecursiveGaussianImage.cpp index 441aa465cc..20eeb2a0eb 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSmoothingRecursiveGaussianImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSmoothingRecursiveGaussianImage.cpp @@ -111,7 +111,7 @@ IFilter::PreflightResult ITKSmoothingRecursiveGaussianImage::preflightImpl(const auto sigma = filterArgs.value(k_Sigma_Key); auto normalizeAcrossScale = filterArgs.value(k_NormalizeAcrossScale_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -125,7 +125,7 @@ Result<> ITKSmoothingRecursiveGaussianImage::executeImpl(DataStructure& dataStru auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageDataPath_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto sigma = filterArgs.value(k_Sigma_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSqrtImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSqrtImage.cpp index bd5cdf965f..1731288df6 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSqrtImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSqrtImage.cpp @@ -92,7 +92,7 @@ IFilter::PreflightResult ITKSqrtImage::preflightImpl(const DataStructure& dataSt auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -106,7 +106,7 @@ Result<> ITKSqrtImage::executeImpl(DataStructure& dataStructure, const Arguments auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); const cxITKSqrtImage::ITKSqrtImageFunctor itkFunctor = {}; diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSquareImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSquareImage.cpp index 713505321b..6cf82389cb 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSquareImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSquareImage.cpp @@ -93,7 +93,7 @@ IFilter::PreflightResult ITKSquareImage::preflightImpl(const DataStructure& data auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -107,7 +107,7 @@ Result<> ITKSquareImage::executeImpl(DataStructure& dataStructure, const Argumen auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); const cxITKSquareImage::ITKSquareImageFunctor itkFunctor = {}; diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKStandardDeviationProjectionImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKStandardDeviationProjectionImage.cpp index b3420282d6..a2968c6b9c 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKStandardDeviationProjectionImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKStandardDeviationProjectionImage.cpp @@ -99,7 +99,7 @@ IFilter::PreflightResult ITKStandardDeviationProjectionImage::preflightImpl(cons auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageDataPath_Key); auto projectionDimension = filterArgs.value(k_ProjectionDimension_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck( dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -114,7 +114,7 @@ Result<> ITKStandardDeviationProjectionImage::executeImpl(DataStructure& dataStr auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageDataPath_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto projectionDimension = filterArgs.value(k_ProjectionDimension_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSumProjectionImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSumProjectionImage.cpp index 77f47f8684..aadb8a3e60 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSumProjectionImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKSumProjectionImage.cpp @@ -100,7 +100,7 @@ IFilter::PreflightResult ITKSumProjectionImage::preflightImpl(const DataStructur auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageDataPath_Key); auto projectionDimension = filterArgs.value(k_ProjectionDimension_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -115,7 +115,7 @@ Result<> ITKSumProjectionImage::executeImpl(DataStructure& dataStructure, const auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageDataPath_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto projectionDimension = filterArgs.value(k_ProjectionDimension_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKTanImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKTanImage.cpp index 827ddbc3db..345bfd4921 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKTanImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKTanImage.cpp @@ -92,7 +92,7 @@ IFilter::PreflightResult ITKTanImage::preflightImpl(const DataStructure& dataStr auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -106,7 +106,7 @@ Result<> ITKTanImage::executeImpl(DataStructure& dataStructure, const Arguments& auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); const cxITKTanImage::ITKTanImageFunctor itkFunctor = {}; diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKThresholdImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKThresholdImage.cpp index 45bb6dc59f..750e125c02 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKThresholdImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKThresholdImage.cpp @@ -108,7 +108,7 @@ IFilter::PreflightResult ITKThresholdImage::preflightImpl(const DataStructure& d auto lower = filterArgs.value(k_Lower_Key); auto upper = filterArgs.value(k_Upper_Key); auto outsideValue = filterArgs.value(k_OutsideValue_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -122,7 +122,7 @@ Result<> ITKThresholdImage::executeImpl(DataStructure& dataStructure, const Argu auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto lower = filterArgs.value(k_Lower_Key); auto upper = filterArgs.value(k_Upper_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKThresholdMaximumConnectedComponentsImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKThresholdMaximumConnectedComponentsImage.cpp index 2fcd6983d0..c04cf28ad0 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKThresholdMaximumConnectedComponentsImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKThresholdMaximumConnectedComponentsImage.cpp @@ -130,7 +130,7 @@ IFilter::PreflightResult ITKThresholdMaximumConnectedComponentsImage::preflightI auto upperBoundary = filterArgs.value(k_UpperBoundary_Key); auto insideValue = filterArgs.value(k_InsideValue_Key); auto outsideValue = filterArgs.value(k_OutsideValue_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck( dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -145,7 +145,7 @@ Result<> ITKThresholdMaximumConnectedComponentsImage::executeImpl(DataStructure& auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto minimumObjectSizeInPixels = filterArgs.value(k_MinimumObjectSizeInPixels_Key); auto upperBoundary = filterArgs.value(k_UpperBoundary_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKValuedRegionalMaximaImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKValuedRegionalMaximaImage.cpp index ab2c7a9e57..a797f9e97d 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKValuedRegionalMaximaImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKValuedRegionalMaximaImage.cpp @@ -102,7 +102,7 @@ IFilter::PreflightResult ITKValuedRegionalMaximaImage::preflightImpl(const DataS auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -116,7 +116,7 @@ Result<> ITKValuedRegionalMaximaImage::executeImpl(DataStructure& dataStructure, auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKValuedRegionalMinimaImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKValuedRegionalMinimaImage.cpp index e682ed7ced..2575b53e9b 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKValuedRegionalMinimaImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKValuedRegionalMinimaImage.cpp @@ -102,7 +102,7 @@ IFilter::PreflightResult ITKValuedRegionalMinimaImage::preflightImpl(const DataS auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -116,7 +116,7 @@ Result<> ITKValuedRegionalMinimaImage::executeImpl(DataStructure& dataStructure, auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto fullyConnected = filterArgs.value(k_FullyConnected_Key); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKWhiteTopHatImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKWhiteTopHatImage.cpp index 2af6f94abf..5c33847552 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKWhiteTopHatImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKWhiteTopHatImage.cpp @@ -111,7 +111,7 @@ IFilter::PreflightResult ITKWhiteTopHatImage::preflightImpl(const DataStructure& auto kernelRadius = filterArgs.value::ValueType>(k_KernelRadius_Key); auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); auto safeBorder = filterArgs.value(k_SafeBorder_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -125,7 +125,7 @@ Result<> ITKWhiteTopHatImage::executeImpl(DataStructure& dataStructure, const Ar auto imageGeomPath = filterArgs.value(k_InputImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_InputImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto kernelRadius = filterArgs.value::ValueType>(k_KernelRadius_Key); auto kernelType = static_cast(filterArgs.value(k_KernelType_Key)); diff --git a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKZeroCrossingImage.cpp b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKZeroCrossingImage.cpp index 6a84fb6597..5b3d2dbd35 100644 --- a/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKZeroCrossingImage.cpp +++ b/src/Plugins/ITKImageProcessing/src/ITKImageProcessing/Filters/ITKZeroCrossingImage.cpp @@ -103,7 +103,7 @@ IFilter::PreflightResult ITKZeroCrossingImage::preflightImpl(const DataStructure auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); auto foregroundValue = filterArgs.value(k_ForegroundValue_Key); auto backgroundValue = filterArgs.value(k_BackgroundValue_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ITK::DataCheck(dataStructure, selectedInputArray, imageGeomPath, outputArrayPath); @@ -118,7 +118,7 @@ Result<> ITKZeroCrossingImage::executeImpl(DataStructure& dataStructure, const A auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageArrayName_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); auto foregroundValue = filterArgs.value(k_ForegroundValue_Key); auto backgroundValue = filterArgs.value(k_BackgroundValue_Key); diff --git a/src/Plugins/ITKImageProcessing/tools/filter.cpp.in b/src/Plugins/ITKImageProcessing/tools/filter.cpp.in index 2d77d31065..682c257430 100644 --- a/src/Plugins/ITKImageProcessing/tools/filter.cpp.in +++ b/src/Plugins/ITKImageProcessing/tools/filter.cpp.in @@ -76,7 +76,7 @@ IFilter::PreflightResult ${FILTER_NAME}::preflightImpl(const DataStructure& data auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageDataPath_Key);${PREFLIGHT_DEFS} - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); Result resultOutputActions = ${DATA_CHECK_DECL}; @@ -90,7 +90,7 @@ Result<> ${FILTER_NAME}::executeImpl(DataStructure& dataStructure, const Argumen auto imageGeomPath = filterArgs.value(k_SelectedImageGeomPath_Key); auto selectedInputArray = filterArgs.value(k_SelectedImageDataPath_Key); auto outputArrayName = filterArgs.value(k_OutputImageDataPath_Key); - const DataPath outputArrayPath = selectedInputArray.getParent().createChildPath(outputArrayName); + const DataPath outputArrayPath = selectedInputArray.replaceName(outputArrayName); ${PREFLIGHT_DEFS} diff --git a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/Algorithms/GenerateFaceIPFColoring.cpp b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/Algorithms/GenerateFaceIPFColoring.cpp index 62c4f3a566..4b82d0d65c 100644 --- a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/Algorithms/GenerateFaceIPFColoring.cpp +++ b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/Algorithms/GenerateFaceIPFColoring.cpp @@ -179,7 +179,7 @@ Result<> GenerateFaceIPFColoring::operator()() auto& eulerAngles = m_DataStructure.getDataRefAs(m_InputValues->FeatureEulerAnglesArrayPath); auto& phases = m_DataStructure.getDataRefAs(m_InputValues->FeaturePhasesArrayPath); auto& crystalStructures = m_DataStructure.getDataRefAs(m_InputValues->CrystalStructuresArrayPath); - DataPath faceIpfColorsArrayPath = m_InputValues->SurfaceMeshFaceLabelsArrayPath.getParent().createChildPath(m_InputValues->SurfaceMeshFaceIPFColorsArrayName); + DataPath faceIpfColorsArrayPath = m_InputValues->SurfaceMeshFaceLabelsArrayPath.replaceName(m_InputValues->SurfaceMeshFaceIPFColorsArrayName); auto& faceIpfColors = m_DataStructure.getDataRefAs(faceIpfColorsArrayPath); int64 numTriangles = faceLabels.getNumberOfTuples(); diff --git a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/Algorithms/GenerateFeatureFaceMisorientation.cpp b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/Algorithms/GenerateFeatureFaceMisorientation.cpp index 463b92dc10..9806a65b77 100644 --- a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/Algorithms/GenerateFeatureFaceMisorientation.cpp +++ b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/Algorithms/GenerateFeatureFaceMisorientation.cpp @@ -128,7 +128,7 @@ Result<> GenerateFeatureFaceMisorientation::operator()() auto& avgQuats = m_DataStructure.getDataRefAs(m_InputValues->AvgQuatsArrayPath); auto& phases = m_DataStructure.getDataRefAs(m_InputValues->FeaturePhasesArrayPath); auto& crystalStructures = m_DataStructure.getDataRefAs(m_InputValues->CrystalStructuresArrayPath); - DataPath faceMisorientationColorsArrayPath = m_InputValues->SurfaceMeshFaceLabelsArrayPath.getParent().createChildPath(m_InputValues->SurfaceMeshFaceMisorientationColorsArrayName); + DataPath faceMisorientationColorsArrayPath = m_InputValues->SurfaceMeshFaceLabelsArrayPath.replaceName(m_InputValues->SurfaceMeshFaceMisorientationColorsArrayName); auto& faceMisorientationColors = m_DataStructure.getDataRefAs(faceMisorientationColorsArrayPath); int64 numTriangles = faceLabels.getNumberOfTuples(); diff --git a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/CAxisSegmentFeaturesFilter.cpp b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/CAxisSegmentFeaturesFilter.cpp index d6340702f1..47a61f9804 100644 --- a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/CAxisSegmentFeaturesFilter.cpp +++ b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/CAxisSegmentFeaturesFilter.cpp @@ -105,7 +105,7 @@ IFilter::PreflightResult CAxisSegmentFeaturesFilter::preflightImpl(const DataStr auto pCellFeatureAttributeMatrixNameValue = filterArgs.value(k_CellFeatureAttributeMatrixName_Key); auto pActiveArrayNameValue = filterArgs.value(k_ActiveArrayName_Key); - const DataPath featureIdsPath = pQuatsArrayPathValue.getParent().createChildPath(pFeatureIdsArrayNameValue); + const DataPath featureIdsPath = pQuatsArrayPathValue.replaceName(pFeatureIdsArrayNameValue); const DataPath cellFeatureAMPath = pImageGeometryPath.createChildPath(pCellFeatureAttributeMatrixNameValue); const DataPath activePath = cellFeatureAMPath.createChildPath(pActiveArrayNameValue); @@ -160,7 +160,7 @@ Result<> CAxisSegmentFeaturesFilter::executeImpl(DataStructure& dataStructure, c inputValues.CellPhasesArrayPath = filterArgs.value(k_CellPhasesArrayPath_Key); inputValues.MaskArrayPath = filterArgs.value(k_MaskArrayPath_Key); inputValues.CrystalStructuresArrayPath = filterArgs.value(k_CrystalStructuresArrayPath_Key); - inputValues.FeatureIdsArrayName = inputValues.QuatsArrayPath.getParent().createChildPath(filterArgs.value(k_FeatureIdsArrayName_Key)); + inputValues.FeatureIdsArrayName = inputValues.QuatsArrayPath.replaceName(filterArgs.value(k_FeatureIdsArrayName_Key)); inputValues.CellFeatureAttributeMatrixName = inputValues.ImageGeometryPath.createChildPath(filterArgs.value(k_CellFeatureAttributeMatrixName_Key)); inputValues.ActiveArrayName = inputValues.CellFeatureAttributeMatrixName.createChildPath(filterArgs.value(k_ActiveArrayName_Key)); diff --git a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/ConvertOrientations.cpp b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/ConvertOrientations.cpp index 0486f40323..25371f9d02 100644 --- a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/ConvertOrientations.cpp +++ b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/ConvertOrientations.cpp @@ -391,7 +391,7 @@ IFilter::PreflightResult ConvertOrientations::preflightImpl(const DataStructure& << representationElementCount[static_cast(inputType)] << " components but the selected input array has " << inputCompShape[0]; return {MakeErrorResult(::k_InputComponentCountError, message.str())}; } - auto pOutputArrayPath = pInputArrayPath.getParent().createChildPath(filterArgs.value(k_OutputOrientationArrayName_Key)); + auto pOutputArrayPath = pInputArrayPath.replaceName(filterArgs.value(k_OutputOrientationArrayName_Key)); auto numericType = static_cast(inputArray->getDataType()); std::vector componentDims = {representationElementCount[static_cast(outputType)]}; @@ -414,7 +414,7 @@ Result<> ConvertOrientations::executeImpl(DataStructure& dataStructure, const Ar auto inputType = static_cast(filterArgs.value(k_InputType_Key)); auto outputType = static_cast(filterArgs.value(k_OutputType_Key)); auto pInputOrientationArrayPathValue = filterArgs.value(k_InputOrientationArrayPath_Key); - auto pOutputOrientationArrayNameValue = pInputOrientationArrayPathValue.getParent().createChildPath(filterArgs.value(k_OutputOrientationArrayName_Key)); + auto pOutputOrientationArrayNameValue = pInputOrientationArrayPathValue.replaceName(filterArgs.value(k_OutputOrientationArrayName_Key)); // Quaternion::Order qLayout = Quaternion::Order::VectorScalar; diff --git a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/ConvertQuaternionFilter.cpp b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/ConvertQuaternionFilter.cpp index b2c84ab112..43d1e84cb9 100644 --- a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/ConvertQuaternionFilter.cpp +++ b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/ConvertQuaternionFilter.cpp @@ -86,7 +86,7 @@ IFilter::PreflightResult ConvertQuaternionFilter::preflightImpl(const DataStruct const std::atomic_bool& shouldCancel) const { auto pQuaternionDataArrayPathValue = filterArgs.value(k_CellQuatsArrayPath_Key); - auto pOutputDataArrayPathValue = pQuaternionDataArrayPathValue.getParent().createChildPath(filterArgs.value(k_OutputDataArrayName_Key)); + auto pOutputDataArrayPathValue = pQuaternionDataArrayPathValue.replaceName(filterArgs.value(k_OutputDataArrayName_Key)); nx::core::Result resultOutputActions; std::vector preflightUpdatedValues; @@ -121,7 +121,7 @@ Result<> ConvertQuaternionFilter::executeImpl(DataStructure& dataStructure, cons ConvertQuaternionInputValues inputValues; inputValues.QuaternionDataArrayPath = filterArgs.value(k_CellQuatsArrayPath_Key); - inputValues.OutputDataArrayPath = inputValues.QuaternionDataArrayPath.getParent().createChildPath(filterArgs.value(k_OutputDataArrayName_Key)); + inputValues.OutputDataArrayPath = inputValues.QuaternionDataArrayPath.replaceName(filterArgs.value(k_OutputDataArrayName_Key)); inputValues.DeleteOriginalData = filterArgs.value(k_DeleteOriginalData_Key); inputValues.ConversionType = filterArgs.value(k_ConversionType_Key); diff --git a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindBoundaryStrengthsFilter.cpp b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindBoundaryStrengthsFilter.cpp index 7069cffc68..c8dd6d24a3 100644 --- a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindBoundaryStrengthsFilter.cpp +++ b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindBoundaryStrengthsFilter.cpp @@ -102,26 +102,23 @@ IFilter::PreflightResult FindBoundaryStrengthsFilter::preflightImpl(const DataSt std::vector faceLabelsTupShape = dataStructure.getDataAs(pSurfaceMeshFaceLabelsArrayPathValue)->getTupleShape(); { - auto action = std::make_unique(DataType::float32, faceLabelsTupShape, std::vector{2}, - pSurfaceMeshFaceLabelsArrayPathValue.getParent().createChildPath(pSurfaceMeshF1sArrayNameValue)); + auto action = std::make_unique(DataType::float32, faceLabelsTupShape, std::vector{2}, pSurfaceMeshFaceLabelsArrayPathValue.replaceName(pSurfaceMeshF1sArrayNameValue)); resultOutputActions.value().appendAction(std::move(action)); } { - auto action = std::make_unique(DataType::float32, faceLabelsTupShape, std::vector{2}, - pSurfaceMeshFaceLabelsArrayPathValue.getParent().createChildPath(pSurfaceMeshF1sptsArrayNameValue)); + auto action = std::make_unique(DataType::float32, faceLabelsTupShape, std::vector{2}, pSurfaceMeshFaceLabelsArrayPathValue.replaceName(pSurfaceMeshF1sptsArrayNameValue)); resultOutputActions.value().appendAction(std::move(action)); } { - auto action = std::make_unique(DataType::float32, faceLabelsTupShape, std::vector{2}, - pSurfaceMeshFaceLabelsArrayPathValue.getParent().createChildPath(pSurfaceMeshF7sArrayNameValue)); + auto action = std::make_unique(DataType::float32, faceLabelsTupShape, std::vector{2}, pSurfaceMeshFaceLabelsArrayPathValue.replaceName(pSurfaceMeshF7sArrayNameValue)); resultOutputActions.value().appendAction(std::move(action)); } { - auto action = std::make_unique(DataType::float32, faceLabelsTupShape, std::vector{2}, - pSurfaceMeshFaceLabelsArrayPathValue.getParent().createChildPath(pSurfaceMeshmPrimesArrayNameValue)); + auto action = + std::make_unique(DataType::float32, faceLabelsTupShape, std::vector{2}, pSurfaceMeshFaceLabelsArrayPathValue.replaceName(pSurfaceMeshmPrimesArrayNameValue)); resultOutputActions.value().appendAction(std::move(action)); } diff --git a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindCAxisLocationsFilter.cpp b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindCAxisLocationsFilter.cpp index 2371f9acc6..2a919e1fa5 100644 --- a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindCAxisLocationsFilter.cpp +++ b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindCAxisLocationsFilter.cpp @@ -90,7 +90,7 @@ IFilter::PreflightResult FindCAxisLocationsFilter::preflightImpl(const DataStruc } { - const DataPath pCAxisLocationsPathValue = pQuatsArrayPathValue.getParent().createChildPath(filterArgs.value(k_CAxisLocationsArrayName_Key)); + const DataPath pCAxisLocationsPathValue = pQuatsArrayPathValue.replaceName(filterArgs.value(k_CAxisLocationsArrayName_Key)); const std::vector tupleShape = dataStructure.getDataRefAs(pQuatsArrayPathValue).getTupleShape(); auto createArrayAction = std::make_unique(DataType::float32, tupleShape, std::vector{3}, pCAxisLocationsPathValue); resultOutputActions.value().appendAction(std::move(createArrayAction)); @@ -111,7 +111,7 @@ Result<> FindCAxisLocationsFilter::executeImpl(DataStructure& dataStructure, con inputValues.QuatsArrayPath = filterArgs.value(k_QuatsArrayPath_Key); inputValues.CellPhasesArrayPath = filterArgs.value(k_CellPhasesArrayPath_Key); inputValues.CrystalStructuresArrayPath = filterArgs.value(k_CrystalStructuresArrayPath_Key); - inputValues.CAxisLocationsArrayName = inputValues.QuatsArrayPath.getParent().createChildPath(filterArgs.value(k_CAxisLocationsArrayName_Key)); + inputValues.CAxisLocationsArrayName = inputValues.QuatsArrayPath.replaceName(filterArgs.value(k_CAxisLocationsArrayName_Key)); return FindCAxisLocations(dataStructure, messageHandler, shouldCancel, &inputValues)(); } diff --git a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindFeatureNeighborCAxisMisalignmentsFilter.cpp b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindFeatureNeighborCAxisMisalignmentsFilter.cpp index 57ff9e14de..a371fcf424 100644 --- a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindFeatureNeighborCAxisMisalignmentsFilter.cpp +++ b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindFeatureNeighborCAxisMisalignmentsFilter.cpp @@ -107,15 +107,15 @@ IFilter::PreflightResult FindFeatureNeighborCAxisMisalignmentsFilter::preflightI const auto& featurePhases = dataStructure.getDataRefAs(pFeaturePhasesArrayPathValue); { - auto createArrayAction = std::make_unique(DataType::float32, featurePhases.getNumberOfTuples(), - pFeaturePhasesArrayPathValue.getParent().createChildPath(pCAxisMisalignmentListArrayNameValue)); + auto createArrayAction = + std::make_unique(DataType::float32, featurePhases.getNumberOfTuples(), pFeaturePhasesArrayPathValue.replaceName(pCAxisMisalignmentListArrayNameValue)); resultOutputActions.value().appendAction(std::move(createArrayAction)); } if(pFindAvgMisalsValue) { auto pAvgCAxisMisalignmentsArrayNameValue = filterArgs.value(k_AvgCAxisMisalignmentsArrayName_Key); - auto createArrayAction = std::make_unique(DataType::float32, featurePhases.getTupleShape(), std::vector{1}, - pFeaturePhasesArrayPathValue.getParent().createChildPath(pAvgCAxisMisalignmentsArrayNameValue)); + auto createArrayAction = + std::make_unique(DataType::float32, featurePhases.getTupleShape(), std::vector{1}, pFeaturePhasesArrayPathValue.replaceName(pAvgCAxisMisalignmentsArrayNameValue)); resultOutputActions.value().appendAction(std::move(createArrayAction)); } @@ -136,8 +136,8 @@ Result<> FindFeatureNeighborCAxisMisalignmentsFilter::executeImpl(DataStructure& inputValues.AvgQuatsArrayPath = filterArgs.value(k_AvgQuatsArrayPath_Key); inputValues.FeaturePhasesArrayPath = filterArgs.value(k_FeaturePhasesArrayPath_Key); inputValues.CrystalStructuresArrayPath = filterArgs.value(k_CrystalStructuresArrayPath_Key); - inputValues.CAxisMisalignmentListArrayName = inputValues.FeaturePhasesArrayPath.getParent().createChildPath(filterArgs.value(k_CAxisMisalignmentListArrayName_Key)); - inputValues.AvgCAxisMisalignmentsArrayName = inputValues.FeaturePhasesArrayPath.getParent().createChildPath(filterArgs.value(k_AvgCAxisMisalignmentsArrayName_Key)); + inputValues.CAxisMisalignmentListArrayName = inputValues.FeaturePhasesArrayPath.replaceName(filterArgs.value(k_CAxisMisalignmentListArrayName_Key)); + inputValues.AvgCAxisMisalignmentsArrayName = inputValues.FeaturePhasesArrayPath.replaceName(filterArgs.value(k_AvgCAxisMisalignmentsArrayName_Key)); return FindFeatureNeighborCAxisMisalignments(dataStructure, messageHandler, shouldCancel, &inputValues)(); } diff --git a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindFeatureReferenceCAxisMisorientationsFilter.cpp b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindFeatureReferenceCAxisMisorientationsFilter.cpp index acafc85af8..da07cd7d76 100644 --- a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindFeatureReferenceCAxisMisorientationsFilter.cpp +++ b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindFeatureReferenceCAxisMisorientationsFilter.cpp @@ -109,19 +109,19 @@ IFilter::PreflightResult FindFeatureReferenceCAxisMisorientationsFilter::preflig std::vector tupleShape = dataStructure.getDataRefAs(pFeatureIdsArrayPathValue).getTupleShape(); { - auto createArrayAction = std::make_unique(DataType::float32, tupleShape, std::vector{1}, - pFeatureIdsArrayPathValue.getParent().createChildPath(pFeatureReferenceCAxisMisorientationsArrayNameValue)); + auto createArrayAction = + std::make_unique(DataType::float32, tupleShape, std::vector{1}, pFeatureIdsArrayPathValue.replaceName(pFeatureReferenceCAxisMisorientationsArrayNameValue)); resultOutputActions.value().appendAction(std::move(createArrayAction)); } tupleShape = dataStructure.getDataRefAs(pAvgCAxesArrayPathValue).getTupleShape(); { auto createArrayAction = - std::make_unique(DataType::float32, tupleShape, std::vector{1}, pAvgCAxesArrayPathValue.getParent().createChildPath(pFeatureAvgCAxisMisorientationsArrayNameValue)); + std::make_unique(DataType::float32, tupleShape, std::vector{1}, pAvgCAxesArrayPathValue.replaceName(pFeatureAvgCAxisMisorientationsArrayNameValue)); resultOutputActions.value().appendAction(std::move(createArrayAction)); } { auto createArrayAction = - std::make_unique(DataType::float32, tupleShape, std::vector{1}, pAvgCAxesArrayPathValue.getParent().createChildPath(pFeatureStDevCAxisMisorientationsArrayNameValue)); + std::make_unique(DataType::float32, tupleShape, std::vector{1}, pAvgCAxesArrayPathValue.replaceName(pFeatureStDevCAxisMisorientationsArrayNameValue)); resultOutputActions.value().appendAction(std::move(createArrayAction)); } @@ -143,10 +143,9 @@ Result<> FindFeatureReferenceCAxisMisorientationsFilter::executeImpl(DataStructu inputValues.QuatsArrayPath = filterArgs.value(k_QuatsArrayPath_Key); inputValues.AvgCAxesArrayPath = filterArgs.value(k_AvgCAxesArrayPath_Key); inputValues.CrystalStructuresArrayPath = filterArgs.value(k_CrystalStructuresArrayPath_Key); - inputValues.FeatureAvgCAxisMisorientationsArrayName = inputValues.AvgCAxesArrayPath.getParent().createChildPath(filterArgs.value(k_FeatureAvgCAxisMisorientationsArrayName_Key)); - inputValues.FeatureStdevCAxisMisorientationsArrayName = inputValues.AvgCAxesArrayPath.getParent().createChildPath(filterArgs.value(k_FeatureStdevCAxisMisorientationsArrayName_Key)); - inputValues.FeatureReferenceCAxisMisorientationsArrayName = - inputValues.FeatureIdsArrayPath.getParent().createChildPath(filterArgs.value(k_FeatureReferenceCAxisMisorientationsArrayName_Key)); + inputValues.FeatureAvgCAxisMisorientationsArrayName = inputValues.AvgCAxesArrayPath.replaceName(filterArgs.value(k_FeatureAvgCAxisMisorientationsArrayName_Key)); + inputValues.FeatureStdevCAxisMisorientationsArrayName = inputValues.AvgCAxesArrayPath.replaceName(filterArgs.value(k_FeatureStdevCAxisMisorientationsArrayName_Key)); + inputValues.FeatureReferenceCAxisMisorientationsArrayName = inputValues.FeatureIdsArrayPath.replaceName(filterArgs.value(k_FeatureReferenceCAxisMisorientationsArrayName_Key)); return FindFeatureReferenceCAxisMisorientations(dataStructure, messageHandler, shouldCancel, &inputValues)(); } diff --git a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindFeatureReferenceMisorientationsFilter.cpp b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindFeatureReferenceMisorientationsFilter.cpp index 7eb5c28e11..a94590c27f 100644 --- a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindFeatureReferenceMisorientationsFilter.cpp +++ b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindFeatureReferenceMisorientationsFilter.cpp @@ -118,7 +118,7 @@ IFilter::PreflightResult FindFeatureReferenceMisorientationsFilter::preflightImp auto pAvgQuatsArrayPathValue = filterArgs.value(k_AvgQuatsArrayPath_Key); auto pCrystalStructuresArrayPathValue = filterArgs.value(k_CrystalStructuresArrayPath_Key); auto pCellFeatAttributeMatrixArrayPathValue = filterArgs.value(k_CellFeatureAttributeMatrixPath_Key); - auto pFeatureReferenceMisorientationsArrayPathValue = pFeatureIdsArrayPathValue.getParent().createChildPath(filterArgs.value(k_FeatureReferenceMisorientationsArrayName_Key)); + auto pFeatureReferenceMisorientationsArrayPathValue = pFeatureIdsArrayPathValue.replaceName(filterArgs.value(k_FeatureReferenceMisorientationsArrayName_Key)); auto pFeatureAvgMisorientationsArrayNameValue = filterArgs.value(k_FeatureAvgMisorientationsArrayName_Key); PreflightResult preflightResult; @@ -188,11 +188,11 @@ Result<> FindFeatureReferenceMisorientationsFilter::executeImpl(DataStructure& d inputValues.GBEuclideanDistancesArrayPath = filterArgs.value(k_GBEuclideanDistancesArrayPath_Key); inputValues.AvgQuatsArrayPath = filterArgs.value(k_AvgQuatsArrayPath_Key); inputValues.CrystalStructuresArrayPath = filterArgs.value(k_CrystalStructuresArrayPath_Key); - inputValues.FeatureReferenceMisorientationsArrayName = inputValues.FeatureIdsArrayPath.getParent().createChildPath(filterArgs.value(k_FeatureReferenceMisorientationsArrayName_Key)); + inputValues.FeatureReferenceMisorientationsArrayName = inputValues.FeatureIdsArrayPath.replaceName(filterArgs.value(k_FeatureReferenceMisorientationsArrayName_Key)); auto pCellFeatAttributeMatrixArrayPathValue = filterArgs.value(k_CellFeatureAttributeMatrixPath_Key); auto featAvgMisorientationName = filterArgs.value(k_FeatureAvgMisorientationsArrayName_Key); - inputValues.FeatureAvgMisorientationsArrayName = inputValues.ReferenceOrientation == 0 ? inputValues.AvgQuatsArrayPath.getParent().createChildPath(featAvgMisorientationName) : - pCellFeatAttributeMatrixArrayPathValue.createChildPath(featAvgMisorientationName); + inputValues.FeatureAvgMisorientationsArrayName = + inputValues.ReferenceOrientation == 0 ? inputValues.AvgQuatsArrayPath.replaceName(featAvgMisorientationName) : pCellFeatAttributeMatrixArrayPathValue.createChildPath(featAvgMisorientationName); return FindFeatureReferenceMisorientations(dataStructure, messageHandler, shouldCancel, &inputValues)(); } diff --git a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindKernelAvgMisorientationsFilter.cpp b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindKernelAvgMisorientationsFilter.cpp index 883177c0c3..0196bfb391 100644 --- a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindKernelAvgMisorientationsFilter.cpp +++ b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindKernelAvgMisorientationsFilter.cpp @@ -91,7 +91,7 @@ IFilter::PreflightResult FindKernelAvgMisorientationsFilter::preflightImpl(const auto pCellPhasesArrayPathValue = filterArgs.value(k_CellPhasesArrayPath_Key); auto pQuatsArrayPathValue = filterArgs.value(k_QuatsArrayPath_Key); auto pCrystalStructuresArrayPathValue = filterArgs.value(k_CrystalStructuresArrayPath_Key); - auto pKernelAverageMisorientationsArrayNameValue = pCellPhasesArrayPathValue.getParent().createChildPath(filterArgs.value(k_KernelAverageMisorientationsArrayName_Key)); + auto pKernelAverageMisorientationsArrayNameValue = pCellPhasesArrayPathValue.replaceName(filterArgs.value(k_KernelAverageMisorientationsArrayName_Key)); auto inputImageGeometry = filterArgs.value(k_SelectedImageGeometryPath_Key); PreflightResult preflightResult; @@ -123,7 +123,7 @@ Result<> FindKernelAvgMisorientationsFilter::executeImpl(DataStructure& dataStru inputValues.CellPhasesArrayPath = filterArgs.value(k_CellPhasesArrayPath_Key); inputValues.QuatsArrayPath = filterArgs.value(k_QuatsArrayPath_Key); inputValues.CrystalStructuresArrayPath = filterArgs.value(k_CrystalStructuresArrayPath_Key); - inputValues.KernelAverageMisorientationsArrayName = inputValues.CellPhasesArrayPath.getParent().createChildPath(filterArgs.value(k_KernelAverageMisorientationsArrayName_Key)); + inputValues.KernelAverageMisorientationsArrayName = inputValues.CellPhasesArrayPath.replaceName(filterArgs.value(k_KernelAverageMisorientationsArrayName_Key)); inputValues.InputImageGeometry = filterArgs.value(k_SelectedImageGeometryPath_Key); return FindKernelAvgMisorientations(dataStructure, messageHandler, shouldCancel, &inputValues)(); diff --git a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindSlipTransmissionMetricsFilter.cpp b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindSlipTransmissionMetricsFilter.cpp index 4434c2e1c4..38dec71618 100644 --- a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindSlipTransmissionMetricsFilter.cpp +++ b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/FindSlipTransmissionMetricsFilter.cpp @@ -100,22 +100,22 @@ IFilter::PreflightResult FindSlipTransmissionMetricsFilter::preflightImpl(const usize tupShape = dataStructure.getDataAs(pNeighborListPathValue)->getNumberOfTuples(); { - auto action = std::make_unique(DataType::float32, tupShape, pNeighborListPathValue.getParent().createChildPath(pF1ListNameValue)); + auto action = std::make_unique(DataType::float32, tupShape, pNeighborListPathValue.replaceName(pF1ListNameValue)); resultOutputActions.value().appendAction(std::move(action)); } { - auto action = std::make_unique(DataType::float32, tupShape, pNeighborListPathValue.getParent().createChildPath(pF1sptListNameValue)); + auto action = std::make_unique(DataType::float32, tupShape, pNeighborListPathValue.replaceName(pF1sptListNameValue)); resultOutputActions.value().appendAction(std::move(action)); } { - auto action = std::make_unique(DataType::float32, tupShape, pNeighborListPathValue.getParent().createChildPath(pF7ListNameValue)); + auto action = std::make_unique(DataType::float32, tupShape, pNeighborListPathValue.replaceName(pF7ListNameValue)); resultOutputActions.value().appendAction(std::move(action)); } { - auto action = std::make_unique(DataType::float32, tupShape, pNeighborListPathValue.getParent().createChildPath(pmPrimeListNameValue)); + auto action = std::make_unique(DataType::float32, tupShape, pNeighborListPathValue.replaceName(pmPrimeListNameValue)); resultOutputActions.value().appendAction(std::move(action)); } @@ -133,10 +133,10 @@ Result<> FindSlipTransmissionMetricsFilter::executeImpl(DataStructure& dataStruc inputValues.AvgQuatsArrayPath = filterArgs.value(k_AvgQuatsArrayPath_Key); inputValues.FeaturePhasesArrayPath = filterArgs.value(k_FeaturePhasesArrayPath_Key); inputValues.CrystalStructuresArrayPath = filterArgs.value(k_CrystalStructuresArrayPath_Key); - inputValues.F1ListArrayName = inputValues.NeighborListArrayPath.getParent().createChildPath(filterArgs.value(k_F1ListArrayName_Key)); - inputValues.F1sptListArrayName = inputValues.NeighborListArrayPath.getParent().createChildPath(filterArgs.value(k_F1sptListArrayName_Key)); - inputValues.F7ListArrayName = inputValues.NeighborListArrayPath.getParent().createChildPath(filterArgs.value(k_F7ListArrayName_Key)); - inputValues.mPrimeListArrayName = inputValues.NeighborListArrayPath.getParent().createChildPath(filterArgs.value(k_mPrimeListArrayName_Key)); + inputValues.F1ListArrayName = inputValues.NeighborListArrayPath.replaceName(filterArgs.value(k_F1ListArrayName_Key)); + inputValues.F1sptListArrayName = inputValues.NeighborListArrayPath.replaceName(filterArgs.value(k_F1sptListArrayName_Key)); + inputValues.F7ListArrayName = inputValues.NeighborListArrayPath.replaceName(filterArgs.value(k_F7ListArrayName_Key)); + inputValues.mPrimeListArrayName = inputValues.NeighborListArrayPath.replaceName(filterArgs.value(k_mPrimeListArrayName_Key)); return FindSlipTransmissionMetrics(dataStructure, messageHandler, shouldCancel, &inputValues)(); } diff --git a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/GenerateFZQuaternions.cpp b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/GenerateFZQuaternions.cpp index 9b51caf76d..9985da7bd7 100644 --- a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/GenerateFZQuaternions.cpp +++ b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/GenerateFZQuaternions.cpp @@ -189,7 +189,7 @@ IFilter::PreflightResult GenerateFZQuaternions::preflightImpl(const DataStructur auto pCellPhasesArrayPathValue = filterArgs.value(k_CellPhasesArrayPath_Key); auto pGoodVoxelsArrayPathValue = filterArgs.value(k_MaskArrayPath_Key); auto pCrystalStructuresArrayPathValue = filterArgs.value(k_CrystalStructuresArrayPath_Key); - auto pFZQuatsArrayPathValue = pQuatsArrayPathValue.getParent().createChildPath(filterArgs.value(k_FZQuatsArrayName_Key)); + auto pFZQuatsArrayPathValue = pQuatsArrayPathValue.replaceName(filterArgs.value(k_FZQuatsArrayName_Key)); const Int32Array& phaseData = dataStructure.getDataRefAs(pCellPhasesArrayPathValue); @@ -256,7 +256,7 @@ Result<> GenerateFZQuaternions::executeImpl(DataStructure& dataStructure, const auto pCellPhasesArrayPathValue = filterArgs.value(k_CellPhasesArrayPath_Key); auto pGoodVoxelsArrayPathValue = filterArgs.value(k_MaskArrayPath_Key); auto pCrystalStructuresArrayPathValue = filterArgs.value(k_CrystalStructuresArrayPath_Key); - auto pFZQuatsArrayPathValue = pQuatsArrayPathValue.getParent().createChildPath(filterArgs.value(k_FZQuatsArrayName_Key)); + auto pFZQuatsArrayPathValue = pQuatsArrayPathValue.replaceName(filterArgs.value(k_FZQuatsArrayName_Key)); Int32Array& phaseArray = dataStructure.getDataRefAs(pCellPhasesArrayPathValue); Float32Array& quatArray = dataStructure.getDataRefAs(pQuatsArrayPathValue); diff --git a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/GenerateFaceIPFColoringFilter.cpp b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/GenerateFaceIPFColoringFilter.cpp index ec170b59c1..1977489493 100644 --- a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/GenerateFaceIPFColoringFilter.cpp +++ b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/GenerateFaceIPFColoringFilter.cpp @@ -114,7 +114,7 @@ IFilter::PreflightResult GenerateFaceIPFColoringFilter::preflightImpl(const Data return {MakeErrorResult(-2432, fmt::format("The following DataArrays all must have equal number of tuples but this was not satisfied.\n{}", tupleValidityCheck.error()))}; } - DataPath faceIpfColorsArrayPath = pSurfaceMeshFaceLabelsArrayPathValue.getParent().createChildPath(pSurfaceMeshFaceIPFColorsArrayNameValue); + DataPath faceIpfColorsArrayPath = pSurfaceMeshFaceLabelsArrayPathValue.replaceName(pSurfaceMeshFaceIPFColorsArrayNameValue); auto action = std::make_unique(DataType::uint8, faceLabels->getTupleShape(), std::vector{6}, faceIpfColorsArrayPath); resultOutputActions.value().appendAction(std::move(action)); diff --git a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/GenerateFeatureFaceMisorientationFilter.cpp b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/GenerateFeatureFaceMisorientationFilter.cpp index 75d9bb8d1d..dd717df34a 100644 --- a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/GenerateFeatureFaceMisorientationFilter.cpp +++ b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/GenerateFeatureFaceMisorientationFilter.cpp @@ -103,7 +103,7 @@ IFilter::PreflightResult GenerateFeatureFaceMisorientationFilter::preflightImpl( return MakePreflightErrorResult(-98411, fmt::format("Could not find the face labels data array at path '{}'", pSurfaceMeshFaceLabelsArrayPathValue.toString())); } - DataPath faceMisorientationColorsArrayPath = pSurfaceMeshFaceLabelsArrayPathValue.getParent().createChildPath(pSurfaceMeshFaceMisorientationColorsArrayNameValue); + DataPath faceMisorientationColorsArrayPath = pSurfaceMeshFaceLabelsArrayPathValue.replaceName(pSurfaceMeshFaceMisorientationColorsArrayNameValue); auto action = std::make_unique(DataType::float32, faceLabels->getTupleShape(), std::vector{3}, faceMisorientationColorsArrayPath); resultOutputActions.value().appendAction(std::move(action)); diff --git a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/GenerateIPFColorsFilter.cpp b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/GenerateIPFColorsFilter.cpp index d89dc5a3fa..d0266d853f 100644 --- a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/GenerateIPFColorsFilter.cpp +++ b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/GenerateIPFColorsFilter.cpp @@ -108,7 +108,7 @@ IFilter::PreflightResult GenerateIPFColorsFilter::preflightImpl(const DataStruct auto pCellPhasesArrayPathValue = filterArgs.value(k_CellPhasesArrayPath_Key); auto pGoodVoxelsArrayPathValue = filterArgs.value(k_MaskArrayPath_Key); auto pCrystalStructuresArrayPathValue = filterArgs.value(k_CrystalStructuresArrayPath_Key); - auto pCellIPFColorsArrayNameValue = pCellEulerAnglesArrayPathValue.getParent().createChildPath(filterArgs.value(k_CellIPFColorsArrayName_Key)); + auto pCellIPFColorsArrayNameValue = pCellEulerAnglesArrayPathValue.replaceName(filterArgs.value(k_CellIPFColorsArrayName_Key)); // Validate the Crystal Structures array const UInt32Array& crystalStructures = dataStructure.getDataRefAs(pCrystalStructuresArrayPathValue); @@ -185,7 +185,7 @@ Result<> GenerateIPFColorsFilter::executeImpl(DataStructure& dataStructure, cons inputValues.cellPhasesArrayPath = filterArgs.value(k_CellPhasesArrayPath_Key); inputValues.goodVoxelsArrayPath = filterArgs.value(k_MaskArrayPath_Key); inputValues.crystalStructuresArrayPath = filterArgs.value(k_CrystalStructuresArrayPath_Key); - inputValues.cellIpfColorsArrayPath = inputValues.cellEulerAnglesArrayPath.getParent().createChildPath(filterArgs.value(k_CellIPFColorsArrayName_Key)); + inputValues.cellIpfColorsArrayPath = inputValues.cellEulerAnglesArrayPath.replaceName(filterArgs.value(k_CellIPFColorsArrayName_Key)); // Let the Algorithm instance do the work return GenerateIPFColors(dataStructure, messageHandler, shouldCancel, &inputValues)(); diff --git a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/GenerateQuaternionConjugateFilter.cpp b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/GenerateQuaternionConjugateFilter.cpp index 83984bd7cd..c4c076d140 100644 --- a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/GenerateQuaternionConjugateFilter.cpp +++ b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/GenerateQuaternionConjugateFilter.cpp @@ -81,7 +81,7 @@ IFilter::PreflightResult GenerateQuaternionConjugateFilter::preflightImpl(const const std::atomic_bool& shouldCancel) const { auto pQuaternionDataArrayPathValue = filterArgs.value(k_CellQuatsArrayPath_Key); - auto pOutputDataArrayPathValue = pQuaternionDataArrayPathValue.getParent().createChildPath(filterArgs.value(k_OutputDataArrayName_Key)); + auto pOutputDataArrayPathValue = pQuaternionDataArrayPathValue.replaceName(filterArgs.value(k_OutputDataArrayName_Key)); nx::core::Result resultOutputActions; std::vector preflightUpdatedValues; @@ -116,7 +116,7 @@ Result<> GenerateQuaternionConjugateFilter::executeImpl(DataStructure& dataStruc GenerateQuaternionConjugateInputValues inputValues; inputValues.QuaternionDataArrayPath = filterArgs.value(k_CellQuatsArrayPath_Key); - inputValues.OutputDataArrayPath = inputValues.QuaternionDataArrayPath.getParent().createChildPath(filterArgs.value(k_OutputDataArrayName_Key)); + inputValues.OutputDataArrayPath = inputValues.QuaternionDataArrayPath.replaceName(filterArgs.value(k_OutputDataArrayName_Key)); inputValues.DeleteOriginalData = filterArgs.value(k_DeleteOriginalData_Key); return GenerateQuaternionConjugate(dataStructure, messageHandler, shouldCancel, &inputValues)(); diff --git a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/MergeTwinsFilter.cpp b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/MergeTwinsFilter.cpp index 67ce4c9abb..e8e1b1c361 100644 --- a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/MergeTwinsFilter.cpp +++ b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/MergeTwinsFilter.cpp @@ -130,8 +130,8 @@ IFilter::PreflightResult MergeTwinsFilter::preflightImpl(const DataStructure& da auto pFeatureIdsArrayPathValue = filterArgs.value(k_CellFeatureIdsArrayPath_Key); auto pCrystalStructuresArrayPathValue = filterArgs.value(k_CrystalStructuresArrayPath_Key); DataPath cellFeatureDataPath = pFeaturePhasesArrayPathValue.getParent(); - auto pCellParentIdsArrayNameValue = pFeatureIdsArrayPathValue.getParent().createChildPath(filterArgs.value(k_CellParentIdsArrayName_Key)); - auto pNewCellFeatureAttributeMatrixNameValue = cellFeatureDataPath.getParent().createChildPath(filterArgs.value(k_CreatedFeatureAttributeMatrixName_Key)); + auto pCellParentIdsArrayNameValue = pFeatureIdsArrayPathValue.replaceName(filterArgs.value(k_CellParentIdsArrayName_Key)); + auto pNewCellFeatureAttributeMatrixNameValue = cellFeatureDataPath.replaceName(filterArgs.value(k_CreatedFeatureAttributeMatrixName_Key)); auto pFeatureParentIdsArrayNameValue = cellFeatureDataPath.createChildPath(filterArgs.value(k_FeatureParentIdsArrayName_Key)); auto pActiveArrayNameValue = pNewCellFeatureAttributeMatrixNameValue.createChildPath(filterArgs.value(k_ActiveArrayName_Key)); auto pSeedArrayNameValue = filterArgs.value(k_SeedArrayName_Key); @@ -238,8 +238,8 @@ Result<> MergeTwinsFilter::executeImpl(DataStructure& dataStructure, const Argum inputValues.FeatureIdsArrayPath = filterArgs.value(k_CellFeatureIdsArrayPath_Key); inputValues.CrystalStructuresArrayPath = filterArgs.value(k_CrystalStructuresArrayPath_Key); DataPath cellFeatureDataPath = inputValues.FeaturePhasesArrayPath.getParent(); - inputValues.CellParentIdsArrayName = inputValues.FeatureIdsArrayPath.getParent().createChildPath(filterArgs.value(k_CellParentIdsArrayName_Key)); - inputValues.NewCellFeatureAttributeMatrixName = cellFeatureDataPath.getParent().createChildPath(filterArgs.value(k_CreatedFeatureAttributeMatrixName_Key)); + inputValues.CellParentIdsArrayName = inputValues.FeatureIdsArrayPath.replaceName(filterArgs.value(k_CellParentIdsArrayName_Key)); + inputValues.NewCellFeatureAttributeMatrixName = cellFeatureDataPath.replaceName(filterArgs.value(k_CreatedFeatureAttributeMatrixName_Key)); inputValues.FeatureParentIdsArrayName = cellFeatureDataPath.createChildPath(filterArgs.value(k_FeatureParentIdsArrayName_Key)); inputValues.ActiveArrayName = inputValues.NewCellFeatureAttributeMatrixName.createChildPath(filterArgs.value(k_ActiveArrayName_Key)); inputValues.Seed = seed; diff --git a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/RodriguesConvertorFilter.cpp b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/RodriguesConvertorFilter.cpp index 21fe8c23e5..3b3c92a503 100644 --- a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/RodriguesConvertorFilter.cpp +++ b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/RodriguesConvertorFilter.cpp @@ -81,7 +81,7 @@ IFilter::PreflightResult RodriguesConvertorFilter::preflightImpl(const DataStruc const std::atomic_bool& shouldCancel) const { auto pRodriguesDataArrayPathValue = filterArgs.value(k_RodriguesDataArrayPath_Key); - auto pOutputDataArrayPathValue = pRodriguesDataArrayPathValue.getParent().createChildPath(filterArgs.value(k_OutputDataArrayName_Key)); + auto pOutputDataArrayPathValue = pRodriguesDataArrayPathValue.replaceName(filterArgs.value(k_OutputDataArrayName_Key)); nx::core::Result resultOutputActions; std::vector preflightUpdatedValues; @@ -116,7 +116,7 @@ Result<> RodriguesConvertorFilter::executeImpl(DataStructure& dataStructure, con RodriguesConvertorInputValues inputValues; inputValues.RodriguesDataArrayPath = filterArgs.value(k_RodriguesDataArrayPath_Key); - inputValues.OutputDataArrayPath = inputValues.RodriguesDataArrayPath.getParent().createChildPath(filterArgs.value(k_OutputDataArrayName_Key)); + inputValues.OutputDataArrayPath = inputValues.RodriguesDataArrayPath.replaceName(filterArgs.value(k_OutputDataArrayName_Key)); inputValues.DeleteOriginalData = filterArgs.value(k_DeleteOriginalData_Key); return RodriguesConvertor(dataStructure, messageHandler, shouldCancel, &inputValues)(); diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/SplitAttributeArray.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/SplitAttributeArray.cpp index 5d6f6d9134..c8ad3c06b4 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/SplitAttributeArray.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/SplitAttributeArray.cpp @@ -19,7 +19,7 @@ struct SplitArraysFunctor for(const auto& j : inputValues->ExtractComponents) { std::string arrayName = inputValues->InputArrayPath.getTargetName() + inputValues->SplitArraysSuffix + StringUtilities::number(j); - DataPath splitArrayPath = inputValues->InputArrayPath.getParent().createChildPath(arrayName); + DataPath splitArrayPath = inputValues->InputArrayPath.replaceName(arrayName); auto& splitArray = dataStructure.getDataRefAs>(splitArrayPath); for(usize i = 0; i < numTuples; i++) diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/CombineAttributeArraysFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/CombineAttributeArraysFilter.cpp index b3975b234b..dbb06172c2 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/CombineAttributeArraysFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/CombineAttributeArraysFilter.cpp @@ -122,8 +122,7 @@ IFilter::PreflightResult CombineAttributeArraysFilter::preflightImpl(const DataS { const auto* dataArray = dataStructure.getDataAs(selectedDataArrayPathsValue[0]); auto tupleShape = dataArray->getTupleShape(); - auto action = - std::make_unique(dataArray->getDataType(), tupleShape, std::vector{numComps}, selectedDataArrayPathsValue[0].getParent().createChildPath(stackedDataArrayName)); + auto action = std::make_unique(dataArray->getDataType(), tupleShape, std::vector{numComps}, selectedDataArrayPathsValue[0].replaceName(stackedDataArrayName)); resultOutputActions.value().appendAction(std::move(action)); } @@ -151,7 +150,7 @@ Result<> CombineAttributeArraysFilter::executeImpl(DataStructure& dataStructure, inputValues.NormalizeData = filterArgs.value(k_NormalizeData_Key); inputValues.SelectedDataArrayPaths = filterArgs.value(k_SelectedDataArrayPaths_Key); - inputValues.StackedDataArrayPath = inputValues.SelectedDataArrayPaths[0].getParent().createChildPath(filterArgs.value(k_StackedDataArrayName_Key)); + inputValues.StackedDataArrayPath = inputValues.SelectedDataArrayPaths[0].replaceName(filterArgs.value(k_StackedDataArrayName_Key)); return CombineAttributeArrays(dataStructure, messageHandler, shouldCancel, &inputValues)(); } diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ConvertDataFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ConvertDataFilter.cpp index edb107b497..12d211c74b 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ConvertDataFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ConvertDataFilter.cpp @@ -80,7 +80,7 @@ IFilter::PreflightResult ConvertDataFilter::preflightImpl(const DataStructure& d auto pConvertedArrayName = filterArgs.value(k_ConvertedArrayName_Key); auto pRemoveOriginal = filterArgs.value(k_DeleteOriginal_Key); - DataPath const convertedArrayPath = pInputArrayPath.getParent().createChildPath(pConvertedArrayName); + DataPath const convertedArrayPath = pInputArrayPath.replaceName(pConvertedArrayName); DataType const pScalarType = StringToDataType(GetAllDataTypesAsStrings()[pScalarTypeIndex]); @@ -116,7 +116,7 @@ Result<> ConvertDataFilter::executeImpl(DataStructure& dataStructure, const Argu inputValues.ScalarType = StringToDataType(GetAllDataTypesAsStrings()[scalarTypeIndex]); inputValues.SelectedArrayPath = filterArgs.value(k_ArrayToConvertPath_Key); auto pConvertedArrayName = filterArgs.value(k_ConvertedArrayName_Key); - inputValues.OutputArrayName = inputValues.SelectedArrayPath.getParent().createChildPath(pConvertedArrayName); + inputValues.OutputArrayName = inputValues.SelectedArrayPath.replaceName(pConvertedArrayName); return ConvertData(dataStructure, messageHandler, shouldCancel, &inputValues)(); } diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/CopyFeatureArrayToElementArray.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/CopyFeatureArrayToElementArray.cpp index 86e29849f3..3c31292dd3 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/CopyFeatureArrayToElementArray.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/CopyFeatureArrayToElementArray.cpp @@ -157,7 +157,7 @@ IFilter::PreflightResult CopyFeatureArrayToElementArray::preflightImpl(const Dat for(const auto& selectedFeatureArrayPath : pSelectedFeatureArrayPathsValue) { - DataPath createdArrayPath = pFeatureIdsArrayPathValue.getParent().createChildPath(selectedFeatureArrayPath.getTargetName() + createdArraySuffix); + DataPath createdArrayPath = pFeatureIdsArrayPathValue.replaceName(selectedFeatureArrayPath.getTargetName() + createdArraySuffix); const auto& selectedFeatureArray = dataStructure.getDataRefAs(selectedFeatureArrayPath); DataType dataType = selectedFeatureArray.getDataType(); auto createArrayAction = std::make_unique(dataType, tDims, selectedFeatureArray.getComponentShape(), createdArrayPath); @@ -178,7 +178,7 @@ Result<> CopyFeatureArrayToElementArray::executeImpl(DataStructure& dataStructur const Int32Array& featureIds = dataStructure.getDataRefAs(pFeatureIdsArrayPathValue); for(const auto& selectedFeatureArrayPath : pSelectedFeatureArrayPathsValue) { - DataPath createdArrayPath = pFeatureIdsArrayPathValue.getParent().createChildPath(selectedFeatureArrayPath.getTargetName() + createdArraySuffix); + DataPath createdArrayPath = pFeatureIdsArrayPathValue.replaceName(selectedFeatureArrayPath.getTargetName() + createdArraySuffix); const IDataArray& selectedFeatureArray = dataStructure.getDataRefAs(selectedFeatureArrayPath); messageHandler(IFilter::ProgressMessage{IFilter::ProgressMessage::Type::Info, fmt::format("Validating number of featureIds in input array '{}'...", selectedFeatureArrayPath.toString())}); diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ExtractComponentAsArrayFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ExtractComponentAsArrayFilter.cpp index 651d113909..73b0ee097e 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ExtractComponentAsArrayFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ExtractComponentAsArrayFilter.cpp @@ -88,7 +88,7 @@ IFilter::PreflightResult ExtractComponentAsArrayFilter::preflightImpl(const Data auto pRemoveComponentsFromArrayValue = filterArgs.value(k_RemoveComponentsFromArray_Key); auto pCompNumberValue = filterArgs.value(k_CompNumber_Key); auto pSelectedArrayPathValue = filterArgs.value(k_SelectedArrayPath_Key); - auto pNewArrayPathValue = pSelectedArrayPathValue.getParent().createChildPath(filterArgs.value(k_NewArrayName_Key)); + auto pNewArrayPathValue = pSelectedArrayPathValue.replaceName(filterArgs.value(k_NewArrayName_Key)); PreflightResult preflightResult; nx::core::Result resultOutputActions; @@ -154,7 +154,7 @@ Result<> ExtractComponentAsArrayFilter::executeImpl(DataStructure& dataStructure // This is the array on the original array path whether its removed or not inputValues.BaseArrayPath = filterArgs.value(k_SelectedArrayPath_Key); // If move components to new array is true this is a valid path - inputValues.NewArrayPath = inputValues.BaseArrayPath.getParent().createChildPath(filterArgs.value(k_NewArrayName_Key)); + inputValues.NewArrayPath = inputValues.BaseArrayPath.replaceName(filterArgs.value(k_NewArrayName_Key)); return ExtractComponentAsArray(dataStructure, messageHandler, shouldCancel, &inputValues)(); } diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindArrayStatisticsFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindArrayStatisticsFilter.cpp index 9f91474fed..1ad14f0400 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindArrayStatisticsFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindArrayStatisticsFilter.cpp @@ -136,8 +136,7 @@ OutputActions CreateCompatibleArrays(const DataStructure& data, const Arguments& if(standardizeDataValue) { auto arrayPath = args.value(FindArrayStatisticsFilter::k_StandardizedArrayName_Key); - auto action = - std::make_unique(DataType::float32, std::vector{inputArray->getNumberOfTuples()}, std::vector{1}, inputArrayPath.getParent().createChildPath(arrayPath)); + auto action = std::make_unique(DataType::float32, std::vector{inputArray->getNumberOfTuples()}, std::vector{1}, inputArrayPath.replaceName(arrayPath)); actions.appendAction(std::move(action)); } if(pFindNumUniqueValuesValue) @@ -453,7 +452,7 @@ Result<> FindArrayStatisticsFilter::executeImpl(DataStructure& dataStructure, co inputValues.ModeArrayName = inputValues.DestinationAttributeMatrix.createChildPath(filterArgs.value(k_ModeArrayName_Key)); inputValues.StdDeviationArrayName = inputValues.DestinationAttributeMatrix.createChildPath(filterArgs.value(k_StdDeviationArrayName_Key)); inputValues.SummationArrayName = inputValues.DestinationAttributeMatrix.createChildPath(filterArgs.value(k_SummationArrayName_Key)); - inputValues.StandardizedArrayName = inputValues.SelectedArrayPath.getParent().createChildPath(filterArgs.value(k_StandardizedArrayName_Key)); + inputValues.StandardizedArrayName = inputValues.SelectedArrayPath.replaceName(filterArgs.value(k_StandardizedArrayName_Key)); inputValues.NumUniqueValuesName = inputValues.DestinationAttributeMatrix.createChildPath(filterArgs.value(k_NumUniqueValuesName_Key)); return FindArrayStatistics(dataStructure, messageHandler, shouldCancel, &inputValues)(); diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindBiasedFeaturesFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindBiasedFeaturesFilter.cpp index ac13671e8f..c89705f59c 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindBiasedFeaturesFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindBiasedFeaturesFilter.cpp @@ -105,7 +105,7 @@ IFilter::PreflightResult FindBiasedFeaturesFilter::preflightImpl(const DataStruc }; auto action = std::make_unique(DataType::boolean, dataStructure.getDataRefAs(pSurfaceFeaturesArrayPathValue).getTupleShape(), std::vector{1}, - pCentroidsArrayPathValue.getParent().createChildPath(pBiasedFeaturesArrayNameValue)); + pCentroidsArrayPathValue.replaceName(pBiasedFeaturesArrayNameValue)); resultOutputActions.value().appendAction(std::move(action)); return {std::move(resultOutputActions), std::move(preflightUpdatedValues)}; @@ -122,7 +122,7 @@ Result<> FindBiasedFeaturesFilter::executeImpl(DataStructure& dataStructure, con inputValues.CentroidsArrayPath = filterArgs.value(k_CentroidsArrayPath_Key); inputValues.SurfaceFeaturesArrayPath = filterArgs.value(k_SurfaceFeaturesArrayPath_Key); inputValues.PhasesArrayPath = filterArgs.value(k_PhasesArrayPath_Key); - inputValues.BiasedFeaturesArrayName = inputValues.CentroidsArrayPath.getParent().createChildPath(filterArgs.value(k_BiasedFeaturesArrayName_Key)); + inputValues.BiasedFeaturesArrayName = inputValues.CentroidsArrayPath.replaceName(filterArgs.value(k_BiasedFeaturesArrayName_Key)); return FindBiasedFeatures(dataStructure, messageHandler, shouldCancel, &inputValues)(); } diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindBoundaryCellsFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindBoundaryCellsFilter.cpp index c8f9dc8a23..3cab864560 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindBoundaryCellsFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindBoundaryCellsFilter.cpp @@ -84,7 +84,7 @@ IFilter::PreflightResult FindBoundaryCellsFilter::preflightImpl(const DataStruct auto pFeatureIdsArrayPathValue = filterArgs.value(k_FeatureIdsArrayPath_Key); auto pBoundaryCellsArrayNameValue = filterArgs.value(k_BoundaryCellsArrayName_Key); - const DataPath boundaryCellsArrayPath = pFeatureIdsArrayPathValue.getParent().createChildPath(pBoundaryCellsArrayNameValue); + const DataPath boundaryCellsArrayPath = pFeatureIdsArrayPathValue.replaceName(pBoundaryCellsArrayNameValue); PreflightResult preflightResult; nx::core::Result resultOutputActions; @@ -117,7 +117,7 @@ Result<> FindBoundaryCellsFilter::executeImpl(DataStructure& dataStructure, cons inputValues.IncludeVolumeBoundary = filterArgs.value(k_IncludeVolumeBoundary_Key); inputValues.ImageGeometryPath = filterArgs.value(k_GeometryPath_Key); inputValues.FeatureIdsArrayPath = filterArgs.value(k_FeatureIdsArrayPath_Key); - inputValues.BoundaryCellsArrayName = inputValues.FeatureIdsArrayPath.getParent().createChildPath(filterArgs.value(k_BoundaryCellsArrayName_Key)); + inputValues.BoundaryCellsArrayName = inputValues.FeatureIdsArrayPath.replaceName(filterArgs.value(k_BoundaryCellsArrayName_Key)); return FindBoundaryCells(dataStructure, messageHandler, shouldCancel, &inputValues)(); } diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindFeatureClusteringFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindFeatureClusteringFilter.cpp index e32cc00792..164a40b9b8 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindFeatureClusteringFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindFeatureClusteringFilter.cpp @@ -118,7 +118,7 @@ IFilter::PreflightResult FindFeatureClusteringFilter::preflightImpl(const DataSt auto pMaxMinArrayNameValue = filterArgs.value(k_MaxMinArrayName_Key); auto pSeedArrayNameValue = filterArgs.value(k_SeedArrayName_Key); - const DataPath clusteringListPath = pFeaturePhasesArrayPathValue.getParent().createChildPath(pClusteringListArrayNameValue); + const DataPath clusteringListPath = pFeaturePhasesArrayPathValue.replaceName(pClusteringListArrayNameValue); PreflightResult preflightResult; nx::core::Result resultOutputActions; @@ -187,7 +187,7 @@ Result<> FindFeatureClusteringFilter::executeImpl(DataStructure& dataStructure, inputValues.CentroidsArrayPath = filterArgs.value(k_CentroidsArrayPath_Key); inputValues.BiasedFeaturesArrayPath = filterArgs.value(k_BiasedFeaturesArrayPath_Key); inputValues.CellEnsembleAttributeMatrixName = filterArgs.value(k_CellEnsembleAttributeMatrixPath_Key); - inputValues.ClusteringListArrayName = inputValues.FeaturePhasesArrayPath.getParent().createChildPath(filterArgs.value(k_ClusteringListArrayName_Key)); + inputValues.ClusteringListArrayName = inputValues.FeaturePhasesArrayPath.replaceName(filterArgs.value(k_ClusteringListArrayName_Key)); inputValues.RDFArrayName = inputValues.CellEnsembleAttributeMatrixName.createChildPath(filterArgs.value(k_RDFArrayName_Key)); inputValues.MaxMinArrayName = inputValues.CellEnsembleAttributeMatrixName.createChildPath(filterArgs.value(k_MaxMinArrayName_Key)); diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindNeighborhoodsFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindNeighborhoodsFilter.cpp index 69d25419f0..66852ea0e2 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindNeighborhoodsFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindNeighborhoodsFilter.cpp @@ -121,14 +121,12 @@ IFilter::PreflightResult FindNeighborhoodsFilter::preflightImpl(const DataStruct // Create the Neighborhoods Array in the Feature Attribute Matrix { - auto action = std::make_unique(DataType::int32, cellFeatureData->getShape(), std::vector{1ULL}, - pFeaturePhasesArrayPathValue.getParent().createChildPath(pNeighborhoodsArrayNameValue)); + auto action = std::make_unique(DataType::int32, cellFeatureData->getShape(), std::vector{1ULL}, pFeaturePhasesArrayPathValue.replaceName(pNeighborhoodsArrayNameValue)); resultOutputActions.value().appendAction(std::move(action)); } // Create the NeighborList Output NeighborList in the Feature Attribute Matrix { - auto action = - std::make_unique(DataType::int32, cellFeatureData->getNumTuples(), pFeaturePhasesArrayPathValue.getParent().createChildPath(pNeighborhoodListArrayNameValue)); + auto action = std::make_unique(DataType::int32, cellFeatureData->getNumTuples(), pFeaturePhasesArrayPathValue.replaceName(pNeighborhoodListArrayNameValue)); resultOutputActions.value().appendAction(std::move(action)); } @@ -148,8 +146,8 @@ Result<> FindNeighborhoodsFilter::executeImpl(DataStructure& dataStructure, cons inputValues.EquivalentDiametersArrayPath = filterArgs.value(k_EquivalentDiametersArrayPath_Key); inputValues.FeaturePhasesArrayPath = filterArgs.value(k_FeaturePhasesArrayPath_Key); inputValues.CentroidsArrayPath = filterArgs.value(k_CentroidsArrayPath_Key); - inputValues.NeighborhoodsArrayName = inputValues.FeaturePhasesArrayPath.getParent().createChildPath(filterArgs.value(k_NeighborhoodsArrayName_Key)); - inputValues.NeighborhoodListArrayName = inputValues.FeaturePhasesArrayPath.getParent().createChildPath(filterArgs.value(k_NeighborhoodListArrayName_Key)); + inputValues.NeighborhoodsArrayName = inputValues.FeaturePhasesArrayPath.replaceName(filterArgs.value(k_NeighborhoodsArrayName_Key)); + inputValues.NeighborhoodListArrayName = inputValues.FeaturePhasesArrayPath.replaceName(filterArgs.value(k_NeighborhoodListArrayName_Key)); inputValues.InputImageGeometry = filterArgs.value(k_SelectedImageGeometryPath_Key); return FindNeighborhoods(dataStructure, messageHandler, shouldCancel, &inputValues)(); diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindNeighbors.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindNeighbors.cpp index 72610bc0a6..7417548f16 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindNeighbors.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindNeighbors.cpp @@ -107,7 +107,7 @@ IFilter::PreflightResult FindNeighbors::preflightImpl(const DataStructure& data, auto surfaceFeaturesName = args.value(k_SurfaceFeaturesName_Key); auto featureAttrMatrixPath = args.value(k_CellFeaturesPath_Key); - DataPath boundaryCellsPath = featureIdsPath.getParent().createChildPath(boundaryCellsName); + DataPath boundaryCellsPath = featureIdsPath.replaceName(boundaryCellsName); DataPath numNeighborsPath = featureAttrMatrixPath.createChildPath(numNeighborsName); DataPath neighborListPath = featureAttrMatrixPath.createChildPath(neighborListName); DataPath sharedSurfaceAreaPath = featureAttrMatrixPath.createChildPath(sharedSurfaceAreaName); @@ -177,7 +177,7 @@ Result<> FindNeighbors::executeImpl(DataStructure& data, const Arguments& args, auto surfaceFeaturesName = args.value(k_SurfaceFeaturesName_Key); auto featureAttrMatrixPath = args.value(k_CellFeaturesPath_Key); - DataPath boundaryCellsPath = featureIdsPath.getParent().createChildPath(boundaryCellsName); + DataPath boundaryCellsPath = featureIdsPath.replaceName(boundaryCellsName); DataPath numNeighborsPath = featureAttrMatrixPath.createChildPath(numNeighborsName); DataPath neighborListPath = featureAttrMatrixPath.createChildPath(neighborListName); DataPath sharedSurfaceAreaPath = featureAttrMatrixPath.createChildPath(sharedSurfaceAreaName); diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindSurfaceAreaToVolumeFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindSurfaceAreaToVolumeFilter.cpp index 7297581939..a14b5c9ab4 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindSurfaceAreaToVolumeFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindSurfaceAreaToVolumeFilter.cpp @@ -110,14 +110,14 @@ IFilter::PreflightResult FindSurfaceAreaToVolumeFilter::preflightImpl(const Data IDataStore::ShapeType tupleShape = cellFeatureData->getShape(); // Create the SurfaceAreaVolumeRatio { - auto arrayPath = pNumCellsArrayPathValue.getParent().createChildPath(filterArgs.value(k_SurfaceAreaVolumeRatioArrayName_Key)); + auto arrayPath = pNumCellsArrayPathValue.replaceName(filterArgs.value(k_SurfaceAreaVolumeRatioArrayName_Key)); auto action = std::make_unique(DataType::float32, tupleShape, std::vector{1ULL}, arrayPath); resultOutputActions.value().appendAction(std::move(action)); } // Create the SphericityArray if(pCalculateSphericityValue) { - auto arrayPath = pNumCellsArrayPathValue.getParent().createChildPath(filterArgs.value(k_SphericityArrayName_Key)); + auto arrayPath = pNumCellsArrayPathValue.replaceName(filterArgs.value(k_SphericityArrayName_Key)); auto action = std::make_unique(DataType::float32, tupleShape, std::vector{1ULL}, arrayPath); resultOutputActions.value().appendAction(std::move(action)); } @@ -136,9 +136,9 @@ Result<> FindSurfaceAreaToVolumeFilter::executeImpl(DataStructure& dataStructure inputValues.FeatureIdsArrayPath = filterArgs.value(k_CellFeatureIdsArrayPath_Key); inputValues.NumCellsArrayPath = filterArgs.value(k_NumCellsArrayPath_Key); - inputValues.SurfaceAreaVolumeRatioArrayName = inputValues.NumCellsArrayPath.getParent().createChildPath(filterArgs.value(k_SurfaceAreaVolumeRatioArrayName_Key)); + inputValues.SurfaceAreaVolumeRatioArrayName = inputValues.NumCellsArrayPath.replaceName(filterArgs.value(k_SurfaceAreaVolumeRatioArrayName_Key)); inputValues.CalculateSphericity = filterArgs.value(k_CalculateSphericity_Key); - inputValues.SphericityArrayName = inputValues.NumCellsArrayPath.getParent().createChildPath(filterArgs.value(k_SphericityArrayName_Key)); + inputValues.SphericityArrayName = inputValues.NumCellsArrayPath.replaceName(filterArgs.value(k_SphericityArrayName_Key)); inputValues.InputImageGeometry = filterArgs.value(k_SelectedImageGeometryPath_Key); return FindSurfaceAreaToVolume(dataStructure, messageHandler, shouldCancel, &inputValues)(); diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/GenerateColorTableFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/GenerateColorTableFilter.cpp index 4a7c0ea876..c60a632828 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/GenerateColorTableFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/GenerateColorTableFilter.cpp @@ -102,7 +102,7 @@ IFilter::PreflightResult GenerateColorTableFilter::preflightImpl(const DataStruc const std::atomic_bool& shouldCancel) const { auto pSelectedDataArrayPathValue = filterArgs.value(k_SelectedDataArrayPath_Key); - auto pRgbArrayPathValue = pSelectedDataArrayPathValue.getParent().createChildPath(filterArgs.value(k_RgbArrayPath_Key)); + auto pRgbArrayPathValue = pSelectedDataArrayPathValue.replaceName(filterArgs.value(k_RgbArrayPath_Key)); auto pUseGoodVoxelsValue = filterArgs.value(k_UseMask_Key); auto pGoodVoxelsArrayPathValue = filterArgs.value(k_MaskArrayPath_Key); @@ -154,7 +154,7 @@ Result<> GenerateColorTableFilter::executeImpl(DataStructure& dataStructure, con inputValues.PresetName = filterArgs.value(k_SelectedPreset_Key); inputValues.SelectedDataArrayPath = filterArgs.value(k_SelectedDataArrayPath_Key); - inputValues.RgbArrayPath = inputValues.SelectedDataArrayPath.getParent().createChildPath(filterArgs.value(k_RgbArrayPath_Key)); + inputValues.RgbArrayPath = inputValues.SelectedDataArrayPath.replaceName(filterArgs.value(k_RgbArrayPath_Key)); inputValues.UseMask = filterArgs.value(k_UseMask_Key); inputValues.MaskArrayPath = filterArgs.value(k_MaskArrayPath_Key); inputValues.InvalidColor = filterArgs.value>(k_InvalidColorValue_Key); diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/GenerateVectorColorsFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/GenerateVectorColorsFilter.cpp index 2fb5bc1985..aa21d2ec12 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/GenerateVectorColorsFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/GenerateVectorColorsFilter.cpp @@ -97,7 +97,7 @@ IFilter::PreflightResult GenerateVectorColorsFilter::preflightImpl(const DataStr std::vector vectorsTupShape = dataStructure.getDataAs(pVectorsArrayPathValue)->getTupleShape(); { - auto action = std::make_unique(DataType::uint8, vectorsTupShape, std::vector{3}, pVectorsArrayPathValue.getParent().createChildPath(pCellVectorColorsArrayNameValue)); + auto action = std::make_unique(DataType::uint8, vectorsTupShape, std::vector{3}, pVectorsArrayPathValue.replaceName(pCellVectorColorsArrayNameValue)); resultOutputActions.value().appendAction(std::move(action)); } @@ -128,7 +128,7 @@ Result<> GenerateVectorColorsFilter::executeImpl(DataStructure& dataStructure, c { inputValues.MaskArrayPath = filterArgs.value(k_MaskArrayPath_Key); } - inputValues.CellVectorColorsArrayPath = inputValues.VectorsArrayPath.getParent().createChildPath(filterArgs.value(k_CellVectorColorsArrayName_Key)); + inputValues.CellVectorColorsArrayPath = inputValues.VectorsArrayPath.replaceName(filterArgs.value(k_CellVectorColorsArrayName_Key)); return GenerateVectorColors(dataStructure, messageHandler, shouldCancel, &inputValues)(); } diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/KMeansFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/KMeansFilter.cpp index 27ffd24071..fe3398a414 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/KMeansFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/KMeansFilter.cpp @@ -126,8 +126,7 @@ IFilter::PreflightResult KMeansFilter::preflightImpl(const DataStructure& dataSt } { - auto createAction = - std::make_unique(DataType::int32, clusterArray->getTupleShape(), std::vector{1}, pSelectedArrayPathValue.getParent().createChildPath(pFeatureIdsArrayNameValue)); + auto createAction = std::make_unique(DataType::int32, clusterArray->getTupleShape(), std::vector{1}, pSelectedArrayPathValue.replaceName(pFeatureIdsArrayNameValue)); resultOutputActions.value().appendAction(std::move(createAction)); } @@ -190,7 +189,7 @@ Result<> KMeansFilter::executeImpl(DataStructure& dataStructure, const Arguments inputValues.Seed = seed; inputValues.ClusteringArrayPath = filterArgs.value(k_SelectedArrayPath_Key); - auto fIdsPath = inputValues.ClusteringArrayPath.getParent().createChildPath(filterArgs.value(k_FeatureIdsArrayName_Key)); + auto fIdsPath = inputValues.ClusteringArrayPath.replaceName(filterArgs.value(k_FeatureIdsArrayName_Key)); dataStructure.getDataAs(fIdsPath)->fill(0); inputValues.FeatureIdsArrayPath = fIdsPath; diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/KMedoidsFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/KMedoidsFilter.cpp index db3340e5c0..dbe94930be 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/KMedoidsFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/KMedoidsFilter.cpp @@ -126,8 +126,7 @@ IFilter::PreflightResult KMedoidsFilter::preflightImpl(const DataStructure& data } { - auto createAction = - std::make_unique(DataType::int32, clusterArray->getTupleShape(), std::vector{1}, pSelectedArrayPathValue.getParent().createChildPath(pFeatureIdsArrayNameValue)); + auto createAction = std::make_unique(DataType::int32, clusterArray->getTupleShape(), std::vector{1}, pSelectedArrayPathValue.replaceName(pFeatureIdsArrayNameValue)); resultOutputActions.value().appendAction(std::move(createAction)); } @@ -190,7 +189,7 @@ Result<> KMedoidsFilter::executeImpl(DataStructure& dataStructure, const Argumen inputValues.Seed = seed; inputValues.ClusteringArrayPath = filterArgs.value(k_SelectedArrayPath_Key); - auto fIdsPath = inputValues.ClusteringArrayPath.getParent().createChildPath(filterArgs.value(k_FeatureIdsArrayName_Key)); + auto fIdsPath = inputValues.ClusteringArrayPath.replaceName(filterArgs.value(k_FeatureIdsArrayName_Key)); dataStructure.getDataAs(fIdsPath)->fill(0); inputValues.FeatureIdsArrayPath = fIdsPath; diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/MultiThresholdObjects.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/MultiThresholdObjects.cpp index 9db79e1b2a..60e6c8feaa 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/MultiThresholdObjects.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/MultiThresholdObjects.cpp @@ -518,8 +518,8 @@ IFilter::PreflightResult MultiThresholdObjects::preflightImpl(const DataStructur } // Create the output boolean array - auto action = std::make_unique(maskArrayType, dataArray->getIDataStore()->getTupleShape(), std::vector{1}, firstDataPath.getParent().createChildPath(maskArrayName), - dataArray->getDataFormat()); + auto action = + std::make_unique(maskArrayType, dataArray->getIDataStore()->getTupleShape(), std::vector{1}, firstDataPath.replaceName(maskArrayName), dataArray->getDataFormat()); OutputActions actions; actions.appendAction(std::move(action)); @@ -543,7 +543,7 @@ Result<> MultiThresholdObjects::executeImpl(DataStructure& dataStructure, const float64 falseValue = useCustomFalseValue ? customFalseValue : 0.0; bool firstValueFound = false; - DataPath maskArrayPath = (*thresholdsObject.getRequiredPaths().begin()).getParent().createChildPath(maskArrayName); + DataPath maskArrayPath = (*thresholdsObject.getRequiredPaths().begin()).replaceName(maskArrayName); int32_t err = 0; ArrayThresholdSet::CollectionType thresholdSet = thresholdsObject.getArrayThresholds(); for(const std::shared_ptr& threshold : thresholdSet) diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RemoveFlaggedFeaturesFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RemoveFlaggedFeaturesFilter.cpp index 40d6f96110..17786220ce 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RemoveFlaggedFeaturesFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RemoveFlaggedFeaturesFilter.cpp @@ -155,7 +155,7 @@ IFilter::PreflightResult RemoveFlaggedFeaturesFilter::preflightImpl(const DataSt auto pFunctionality = filterArgs.value(k_Functionality_Key); if(pFunctionality != to_underlying(Functionality::Remove)) { - DataPath const tempPath = pFlaggedFeaturesArrayPathValue.getParent().createChildPath(k_boundsName); + DataPath const tempPath = pFlaggedFeaturesArrayPathValue.replaceName(k_boundsName); auto action = std::make_unique(DataType::uint32, std::vector{featureIdsPtr->getNumberOfTuples()}, std::vector{featureIdsPtr->getNumberOfComponents() * 6}, tempPath); @@ -189,7 +189,7 @@ Result<> RemoveFlaggedFeaturesFilter::executeImpl(DataStructure& dataStructure, inputValues.IgnoredDataArrayPaths = filterArgs.value(k_IgnoredDataArrayPaths_Key); inputValues.ImageGeometryPath = filterArgs.value(k_SelectedImageGeometryPath_Key); inputValues.CreatedImageGeometryPrefix = filterArgs.value(k_CreatedImageGeometryPrefix_Key); - inputValues.TempBoundsPath = inputValues.FlaggedFeaturesArrayPath.getParent().createChildPath(k_boundsName); + inputValues.TempBoundsPath = inputValues.FlaggedFeaturesArrayPath.replaceName(k_boundsName); return RemoveFlaggedFeatures(dataStructure, messageHandler, shouldCancel, &inputValues)(); } diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RobustAutomaticThreshold.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RobustAutomaticThreshold.cpp index 0a1060fe66..f814fbcf84 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RobustAutomaticThreshold.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RobustAutomaticThreshold.cpp @@ -151,7 +151,7 @@ IFilter::PreflightResult RobustAutomaticThreshold::preflightImpl(const DataStruc auto gradientArrayPath = args.value(k_GradientMagnitudePath_Key); auto createdMaskName = args.value(k_ArrayCreationName_Key); - const DataPath createdMaskPath = inputArrayPath.getParent().createChildPath(createdMaskName); + const DataPath createdMaskPath = inputArrayPath.replaceName(createdMaskName); std::vector dataPaths; @@ -199,7 +199,7 @@ Result<> RobustAutomaticThreshold::executeImpl(DataStructure& data, const Argume const auto& inputArray = data.getDataRefAs(inputArrayPath); const auto& gradientArray = data.getDataRefAs(gradientArrayPath); - auto& maskArray = data.getDataRefAs(inputArrayPath.getParent().createChildPath(createdMaskName)); + auto& maskArray = data.getDataRefAs(inputArrayPath.replaceName(createdMaskName)); FindThreshold(inputArray, gradientArray, maskArray); diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ScalarSegmentFeaturesFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ScalarSegmentFeaturesFilter.cpp index 21dfc3030c..16129f5fe4 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ScalarSegmentFeaturesFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ScalarSegmentFeaturesFilter.cpp @@ -104,7 +104,7 @@ IFilter::PreflightResult ScalarSegmentFeaturesFilter::preflightImpl(const DataSt auto featureIdsName = args.value(k_FeatureIdsName_Key); auto cellFeaturesName = args.value(k_CellFeatureName_Key); auto activeArrayName = args.value(k_ActiveArrayName_Key); - DataPath featureIdsPath = inputDataPath.getParent().createChildPath(featureIdsName); + DataPath featureIdsPath = inputDataPath.replaceName(featureIdsName); bool useGoodVoxels = args.value(k_UseMask_Key); DataPath goodVoxelsPath; @@ -195,7 +195,7 @@ Result<> ScalarSegmentFeaturesFilter::executeImpl(DataStructure& data, const Arg inputValues.pInputDataPath = args.value(k_InputArrayPathKey); inputValues.pScalarTolerance = args.value(k_ScalarToleranceKey); inputValues.pShouldRandomizeFeatureIds = args.value(k_RandomizeFeatures_Key); - inputValues.pFeatureIdsPath = inputValues.pInputDataPath.getParent().createChildPath(args.value(k_FeatureIdsName_Key)); + inputValues.pFeatureIdsPath = inputValues.pInputDataPath.replaceName(args.value(k_FeatureIdsName_Key)); inputValues.pUseGoodVoxels = args.value(k_UseMask_Key); inputValues.pGoodVoxelsPath = args.value(k_MaskArrayPath_Key); inputValues.pGridGeomPath = args.value(k_GridGeomPath_Key); diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/SplitAttributeArrayFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/SplitAttributeArrayFilter.cpp index f93841cc8d..5a36606f5c 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/SplitAttributeArrayFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/SplitAttributeArrayFilter.cpp @@ -116,7 +116,7 @@ IFilter::PreflightResult SplitAttributeArrayFilter::preflightImpl(const DataStru comp, pInputArrayPath.toString(), numComponents, numComponents - 1)}})}; } std::string arrayName = pInputArrayPath.getTargetName() + pPostfix + StringUtilities::number(compIndex); - DataPath newArrayPath = pInputArrayPath.getParent().createChildPath(arrayName); + DataPath newArrayPath = pInputArrayPath.replaceName(arrayName); resultOutputActions.value().appendAction(std::make_unique(inputArray->getDataType(), tdims, cdims, newArrayPath)); } } @@ -125,7 +125,7 @@ IFilter::PreflightResult SplitAttributeArrayFilter::preflightImpl(const DataStru for(usize i = 0; i < numComponents; i++) { std::string arrayName = pInputArrayPath.getTargetName() + pPostfix + StringUtilities::number(i); - DataPath newArrayPath = pInputArrayPath.getParent().createChildPath(arrayName); + DataPath newArrayPath = pInputArrayPath.replaceName(arrayName); resultOutputActions.value().appendAction(std::make_unique(inputArray->getDataType(), tdims, cdims, newArrayPath)); } } diff --git a/src/Plugins/SimplnxCore/test/FindArrayStatisticsTest.cpp b/src/Plugins/SimplnxCore/test/FindArrayStatisticsTest.cpp index 060bf67029..2dbdd1b630 100644 --- a/src/Plugins/SimplnxCore/test/FindArrayStatisticsTest.cpp +++ b/src/Plugins/SimplnxCore/test/FindArrayStatisticsTest.cpp @@ -139,7 +139,7 @@ TEST_CASE("SimplnxCore::FindArrayStatisticsFilter: Test Algorithm", "[SimplnxCor REQUIRE(stdArray != nullptr); auto* sumArray = dataStructure.getDataAs(statsDataPath.createChildPath(sum)); REQUIRE(sumArray != nullptr); - auto* standardizeArray = dataStructure.getDataAs(inputArrayPath.getParent().createChildPath(standardization)); + auto* standardizeArray = dataStructure.getDataAs(inputArrayPath.replaceName(standardization)); REQUIRE(standardizeArray != nullptr); REQUIRE(standardizeArray->getNumberOfTuples() == 11); auto* histArray = dataStructure.getDataAs(statsDataPath.createChildPath(histogram)); @@ -352,7 +352,7 @@ TEST_CASE("SimplnxCore::FindArrayStatisticsFilter: Test Algorithm By Index", "[S auto* sumArray = dataStructure.getDataAs(statsDataPath.createChildPath(sum)); REQUIRE(sumArray != nullptr); REQUIRE(sumArray->getNumberOfTuples() == 3); - auto* standardizeArray = dataStructure.getDataAs(inputArrayPath.getParent().createChildPath(standardization)); + auto* standardizeArray = dataStructure.getDataAs(inputArrayPath.replaceName(standardization)); REQUIRE(standardizeArray != nullptr); REQUIRE(standardizeArray->getNumberOfTuples() == 12); auto* histArray = dataStructure.getDataAs(statsDataPath.createChildPath(histogram));