MCPcopy Create free account
hub / github.com/MITK/MITK / DoMaskedCollecting

Function DoMaskedCollecting

Modules/ModelFit/cmdapps/PixelDump.cpp:223–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221
222template < typename TPixel, unsigned int VImageDimension >
223void DoMaskedCollecting(
224 const itk::Image< TPixel, VImageDimension > *image)
225{
226 typedef itk::Image< TPixel, VImageDimension > ImageType;
227
228 itk::ImageRegionConstIteratorWithIndex<ImageType> it(image, relevantRegion);
229
230 it.GoToBegin();
231
232 while (!it.IsAtEnd())
233 {
234 if (mask.IsNull() || it.Get() > 0)
235 {
236 DumpedValuesType values;
237
238 const auto index = it.GetIndex();
239
240 for (auto& imagePos : internalImages)
241 {
242 double value = imagePos.second->GetPixel(index);
243 values.push_back(value);
244 }
245
246 dumpedPixels.insert(std::make_pair(index, values));
247 }
248 ++it;
249 }
250}
251
252InternalImageMapType ConvertImageTimeSteps(mitk::Image* image)
253{

Callers

nothing calls this directly

Calls 4

GoToBeginMethod · 0.45
IsNullMethod · 0.45
GetMethod · 0.45
GetIndexMethod · 0.45

Tested by

no test coverage detected