| 221 | |
| 222 | template < typename TPixel, unsigned int VImageDimension > |
| 223 | void 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 | |
| 252 | InternalImageMapType ConvertImageTimeSteps(mitk::Image* image) |
| 253 | { |