| 1993 | } |
| 1994 | |
| 1995 | void mitk::TransferLabelContent( |
| 1996 | const Image* sourceImage, Image* destinationImage, const mitk::ConstLabelVector& destinationLabels, mitk::Label::PixelType sourceBackground, |
| 1997 | mitk::Label::PixelType destinationBackground, bool destinationBackgroundLocked, LabelValueMappingVector labelMapping, |
| 1998 | MultiLabelSegmentation::MergeStyle mergeStyle, MultiLabelSegmentation::OverwriteStyle overwriteStlye) |
| 1999 | { |
| 2000 | if (nullptr == sourceImage) |
| 2001 | { |
| 2002 | mitkThrow() << "Invalid call of TransferLabelContent; sourceImage must not be null."; |
| 2003 | } |
| 2004 | if (nullptr == destinationImage) |
| 2005 | { |
| 2006 | mitkThrow() << "Invalid call of TransferLabelContent; destinationImage must not be null."; |
| 2007 | } |
| 2008 | |
| 2009 | const auto sourceTimeStepCount = sourceImage->GetTimeGeometry()->CountTimeSteps(); |
| 2010 | if (sourceTimeStepCount != destinationImage->GetTimeGeometry()->CountTimeSteps()) |
| 2011 | { |
| 2012 | mitkThrow() << "Invalid call of TransferLabelContent; mismatch between images in number of time steps."; |
| 2013 | } |
| 2014 | |
| 2015 | for (mitk::TimeStepType i = 0; i < sourceTimeStepCount; ++i) |
| 2016 | { |
| 2017 | TransferLabelContentAtTimeStep(sourceImage, destinationImage, destinationLabels, i, sourceBackground, |
| 2018 | destinationBackground, destinationBackgroundLocked, labelMapping, mergeStyle, overwriteStlye); |
| 2019 | } |
| 2020 | } |
| 2021 | |
| 2022 | void mitk::TransferLabelContentAtTimeStep( |
| 2023 | const MultiLabelSegmentation* sourceImage, MultiLabelSegmentation* destinationImage, const TimeStepType timeStep, |
nothing calls this directly
no test coverage detected