ITK  5.4.0
Insight Toolkit
itkBoxUtilities.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * https://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkBoxUtilities_h
19 #define itkBoxUtilities_h
20 
21 #include "itkProgressReporter.h"
23 #include "itkImageRegionIterator.h"
26 #include "itkImageRegionIterator.h"
27 #include "itkOffset.h"
30 #include <algorithm> // For min.
31 
32 /*
33  *
34  * This code was contributed in the Insight Journal paper:
35  * "Efficient implementation of kernel filtering"
36  * by Beare R., Lehmann G
37  * https://www.insight-journal.org/browse/publication/160
38  *
39  */
40 
42 {
43 
44 template <typename TIterator>
45 inline TIterator *
46 setConnectivityEarlyBox(TIterator * it, bool fullyConnected = false)
47 {
48  // activate the "previous" neighbours
49  typename TIterator::OffsetType offset;
50  it->ClearActiveList();
51  if (!fullyConnected)
52  {
53  // only activate the neighbors that are face connected
54  // to the current pixel. do not include the center pixel
55  offset.Fill(0);
56  for (unsigned int d = 0; d < TIterator::Dimension; ++d)
57  {
58  offset[d] = -1;
59  it->ActivateOffset(offset);
60  offset[d] = 0;
61  }
62  }
63  else
64  {
65  // activate all neighbors that are face+edge+vertex
66  // connected to the current pixel. do not include the center pixel
67  unsigned int centerIndex = it->GetCenterNeighborhoodIndex();
68  for (unsigned int d = 0; d < centerIndex; ++d)
69  {
70  offset = it->GetOffset(d);
71  // check for positives in any dimension
72  bool keep = true;
73  for (unsigned int i = 0; i < TIterator::Dimension; ++i)
74  {
75  if (offset[i] > 0)
76  {
77  keep = false;
78  break;
79  }
80  }
81  if (keep)
82  {
83  it->ActivateOffset(offset);
84  }
85  }
86  offset.Fill(0);
87  it->DeactivateOffset(offset);
88  }
89  return it;
90 }
91 
92 } // namespace itk_impl_details
93 
94 namespace itk
95 {
96 
97 template <typename TInputImage, typename TOutputImage>
98 void
99 BoxAccumulateFunction(const TInputImage * inputImage,
100  const TOutputImage * outputImage,
101  typename TInputImage::RegionType inputRegion,
102  typename TOutputImage::RegionType outputRegion
103 #if defined(ITKV4_COMPATIBILITY)
104  ,
105  ProgressReporter & progress)
106 #else
107 )
108 #endif
109 {
110  // type alias
111  using InputImageType = TInputImage;
112  using OffsetType = typename TInputImage::OffsetType;
113  using OutputImageType = TOutputImage;
114  using OutputPixelType = typename TOutputImage::PixelType;
115 
116  using InputIterator = ImageRegionConstIterator<TInputImage>;
117 
118  using NOutputIterator = ShapedNeighborhoodIterator<TOutputImage>;
119  InputIterator inIt(inputImage, inputRegion);
120  typename TInputImage::SizeType kernelRadius;
121  kernelRadius.Fill(1);
122 
123  NOutputIterator noutIt(kernelRadius, outputImage, outputRegion);
124  // this iterator is fully connected
126 
128  oBC.SetConstant(OutputPixelType{});
129  noutIt.OverrideBoundaryCondition(&oBC);
130  // This uses several iterators. An alternative and probably better
131  // approach would be to copy the input to the output and convolve
132  // with the following weights (in 2D)
133  // -(dim - 1) 1
134  // 1 1
135  // The result of each convolution needs to get written back to the
136  // image being convolved so that the accumulation propagates
137  // This should be implementable with neighborhood operators.
138 
139  std::vector<int> weights;
140  typename NOutputIterator::ConstIterator sIt;
141  for (auto idxIt = noutIt.GetActiveIndexList().begin(); idxIt != noutIt.GetActiveIndexList().end(); ++idxIt)
142  {
143  OffsetType offset = noutIt.GetOffset(*idxIt);
144  int w = -1;
145  for (unsigned int k = 0; k < InputImageType::ImageDimension; ++k)
146  {
147  if (offset[k] != 0)
148  {
149  w *= offset[k];
150  }
151  }
152  // std::cout << offset << " " << w << std::endl;
153  weights.push_back(w);
154  }
155 
156  for (inIt.GoToBegin(), noutIt.GoToBegin(); !noutIt.IsAtEnd(); ++inIt, ++noutIt)
157  {
158  OutputPixelType sum = 0;
159  int k;
160  for (k = 0, sIt = noutIt.Begin(); !sIt.IsAtEnd(); ++sIt, ++k)
161  {
162  sum += sIt.Get() * weights[k];
163  }
164  noutIt.SetCenterPixel(sum + inIt.Get());
165 #if defined(ITKV4_COMPATIBILITY)
166  progress.CompletedPixel();
167 #endif
168  }
169 }
170 
171 // a function to generate corners of arbitrary dimension box
172 template <typename TImage>
173 std::vector<typename TImage::OffsetType>
174 CornerOffsets(const TImage * im)
175 {
176  using NIterator = ShapedNeighborhoodIterator<TImage>;
177  typename TImage::SizeType unitradius;
178  unitradius.Fill(1);
179  NIterator n1(unitradius, im, im->GetRequestedRegion());
180  unsigned int centerIndex = n1.GetCenterNeighborhoodIndex();
181  typename NIterator::OffsetType offset;
182  std::vector<typename TImage::OffsetType> result;
183  for (unsigned int d = 0; d < centerIndex * 2 + 1; ++d)
184  {
185  offset = n1.GetOffset(d);
186  // check whether this is a corner - corners have no zeros
187  bool corner = true;
188  for (unsigned int k = 0; k < TImage::ImageDimension; ++k)
189  {
190  if (offset[k] == 0)
191  {
192  corner = false;
193  break;
194  }
195  }
196  if (corner)
197  {
198  result.push_back(offset);
199  }
200  }
201  return (result);
202 }
203 
204 template <typename TInputImage, typename TOutputImage>
205 void
206 BoxMeanCalculatorFunction(const TInputImage * accImage,
207  TOutputImage * outputImage,
208  typename TInputImage::RegionType inputRegion,
209  typename TOutputImage::RegionType outputRegion,
210  typename TInputImage::SizeType radius
211 #if defined(ITKV4_COMPATIBILITY)
212  ,
213  ProgressReporter & progress)
214 #else
215 )
216 #endif
217 {
218  // type alias
219  using InputImageType = TInputImage;
220  using RegionType = typename TInputImage::RegionType;
221  using SizeType = typename TInputImage::SizeType;
222  using IndexType = typename TInputImage::IndexType;
223  using OffsetType = typename TInputImage::OffsetType;
224  using OutputImageType = TOutputImage;
225  using OutputPixelType = typename TOutputImage::PixelType;
226  // use the face generator for speed
228  using FaceListType = typename FaceCalculatorType::FaceListType;
229  FaceCalculatorType faceCalculator;
230 
232 
233  // this process is actually slightly asymmetric because we need to
234  // subtract rectangles that are next to our kernel, not overlapping it
235  SizeType kernelSize;
236  SizeType internalRadius;
237  SizeType regionLimit;
238 
239  IndexType regionStart = inputRegion.GetIndex();
240  for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i)
241  {
242  kernelSize[i] = radius[i] * 2 + 1;
243  internalRadius[i] = radius[i] + 1;
244  regionLimit[i] = inputRegion.GetSize()[i] + regionStart[i] - 1;
245  }
246 
247  using AccPixType = typename NumericTraits<OutputPixelType>::RealType;
248  // get a set of offsets to corners for a unit hypercube in this image
249  std::vector<OffsetType> unitCorners = CornerOffsets<TInputImage>(accImage);
250  std::vector<OffsetType> realCorners;
251  std::vector<AccPixType> weights;
252  // now compute the weights
253  for (unsigned int k = 0; k < unitCorners.size(); ++k)
254  {
255  int prod = 1;
256  OffsetType thisCorner;
257  for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i)
258  {
259  prod *= unitCorners[k][i];
260  if (unitCorners[k][i] > 0)
261  {
262  thisCorner[i] = radius[i];
263  }
264  else
265  {
266  thisCorner[i] = -(static_cast<OffsetValueType>(radius[i]) + 1);
267  }
268  }
269  weights.push_back((AccPixType)prod);
270  realCorners.push_back(thisCorner);
271  }
272 
273  FaceListType faceList = faceCalculator(accImage, outputRegion, internalRadius);
274  // start with the body region
275  for (const auto & face : faceList)
276  {
277  if (&face == &faceList.front())
278  {
279  // this is the body region. This is meant to be an optimized
280  // version that doesn't use neighborhood regions
281  // compute the various offsets
282  AccPixType pixelscount = 1;
283  for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i)
284  {
285  pixelscount *= (AccPixType)(2 * radius[i] + 1);
286  }
287 
288  using OutputIteratorType = ImageRegionIterator<OutputImageType>;
289  using InputIteratorType = ImageRegionConstIterator<InputImageType>;
290 
291  using CornerItVecType = std::vector<InputIteratorType>;
292  CornerItVecType cornerItVec;
293  // set up the iterators for each corner
294  for (unsigned int k = 0; k < realCorners.size(); ++k)
295  {
296  typename InputImageType::RegionType tReg = face;
297  tReg.SetIndex(tReg.GetIndex() + realCorners[k]);
298  InputIteratorType tempIt(accImage, tReg);
299  tempIt.GoToBegin();
300  cornerItVec.push_back(tempIt);
301  }
302  // set up the output iterator
303  OutputIteratorType oIt(outputImage, face);
304  // now do the work
305  for (oIt.GoToBegin(); !oIt.IsAtEnd(); ++oIt)
306  {
307  AccPixType sum = 0;
308  // check each corner
309  for (unsigned int k = 0; k < cornerItVec.size(); ++k)
310  {
311  sum += weights[k] * cornerItVec[k].Get();
312  // increment each corner iterator
313  ++(cornerItVec[k]);
314  }
315  oIt.Set(static_cast<OutputPixelType>(sum / pixelscount));
316 #if defined(ITKV4_COMPATIBILITY)
317  progress.CompletedPixel();
318 #endif
319  }
320  }
321  else
322  {
323  // now we need to deal with the border regions
324  using OutputIteratorType = ImageRegionIteratorWithIndex<OutputImageType>;
325  OutputIteratorType oIt(outputImage, face);
326  // now do the work
327  for (oIt.GoToBegin(); !oIt.IsAtEnd(); ++oIt)
328  {
329  // figure out the number of pixels in the box by creating an
330  // equivalent region and cropping - this could probably be
331  // included in the loop below.
332  RegionType currentKernelRegion;
333  currentKernelRegion.SetSize(kernelSize);
334  // compute the region's index
335  IndexType kernelRegionIdx = oIt.GetIndex();
336  IndexType centIndex = kernelRegionIdx;
337  for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i)
338  {
339  kernelRegionIdx[i] -= radius[i];
340  }
341  currentKernelRegion.SetIndex(kernelRegionIdx);
342  currentKernelRegion.Crop(inputRegion);
343  OffsetValueType edgepixelscount = currentKernelRegion.GetNumberOfPixels();
344  AccPixType sum = 0;
345  // rules are : for each corner,
346  // for each dimension
347  // if dimension offset is positive -> this is
348  // a leading edge. Crop if outside the input
349  // region
350  // if dimension offset is negative -> this is
351  // a trailing edge. Ignore if it is outside
352  // image region
353  for (unsigned int k = 0; k < realCorners.size(); ++k)
354  {
355  IndexType thisCorner = centIndex + realCorners[k];
356  bool includeCorner = true;
357  for (unsigned int j = 0; j < TInputImage::ImageDimension; ++j)
358  {
359  if (unitCorners[k][j] > 0)
360  {
361  // leading edge - crop it
362  thisCorner[j] = std::min(thisCorner[j], static_cast<OffsetValueType>(regionLimit[j]));
363  }
364  else
365  {
366  // trailing edge - check bounds
367  if (thisCorner[j] < regionStart[j])
368  {
369  includeCorner = false;
370  break;
371  }
372  }
373  }
374  if (includeCorner)
375  {
376  sum += accImage->GetPixel(thisCorner) * weights[k];
377  }
378  }
379 
380  oIt.Set(static_cast<OutputPixelType>(sum / (AccPixType)edgepixelscount));
381 #if defined(ITKV4_COMPATIBILITY)
382  progress.CompletedPixel();
383 #endif
384  }
385  }
386  }
387 }
388 
389 template <typename TInputImage, typename TOutputImage>
390 void
391 BoxSigmaCalculatorFunction(const TInputImage * accImage,
392  TOutputImage * outputImage,
393  typename TInputImage::RegionType inputRegion,
394  typename TOutputImage::RegionType outputRegion,
395  typename TInputImage::SizeType radius
396 #if defined(ITKV4_COMPATIBILITY)
397  ,
398  ProgressReporter & progress)
399 #else
400 )
401 #endif
402 {
403  // type alias
404  using InputImageType = TInputImage;
405  using RegionType = typename TInputImage::RegionType;
406  using SizeType = typename TInputImage::SizeType;
407  using IndexType = typename TInputImage::IndexType;
408  using OffsetType = typename TInputImage::OffsetType;
409  using OutputImageType = TOutputImage;
410  using OutputPixelType = typename TOutputImage::PixelType;
411  using InputPixelType = typename TInputImage::PixelType;
412  // use the face generator for speed
414  using FaceListType = typename FaceCalculatorType::FaceListType;
415  FaceCalculatorType faceCalculator;
416 
418 
419  // this process is actually slightly asymmetric because we need to
420  // subtract rectangles that are next to our kernel, not overlapping it
421  SizeType kernelSize;
422  SizeType internalRadius;
423  SizeType regionLimit;
424  IndexType regionStart = inputRegion.GetIndex();
425  for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i)
426  {
427  kernelSize[i] = radius[i] * 2 + 1;
428  internalRadius[i] = radius[i] + 1;
429  regionLimit[i] = inputRegion.GetSize()[i] + regionStart[i] - 1;
430  }
431 
432  using AccPixType = typename NumericTraits<OutputPixelType>::RealType;
433  // get a set of offsets to corners for a unit hypercube in this image
434  std::vector<OffsetType> unitCorners = CornerOffsets<TInputImage>(accImage);
435  std::vector<OffsetType> realCorners;
436  std::vector<AccPixType> weights;
437  // now compute the weights
438  for (unsigned int k = 0; k < unitCorners.size(); ++k)
439  {
440  int prod = 1;
441  OffsetType thisCorner;
442  for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i)
443  {
444  prod *= unitCorners[k][i];
445  if (unitCorners[k][i] > 0)
446  {
447  thisCorner[i] = radius[i];
448  }
449  else
450  {
451  thisCorner[i] = -(static_cast<OffsetValueType>(radius[i]) + 1);
452  }
453  }
454  weights.push_back((AccPixType)prod);
455  realCorners.push_back(thisCorner);
456  }
457 
458  FaceListType faceList = faceCalculator(accImage, outputRegion, internalRadius);
459  // start with the body region
460  for (const auto & face : faceList)
461  {
462  if (&face == &faceList.front())
463  {
464  // this is the body region. This is meant to be an optimized
465  // version that doesn't use neighborhood regions
466  // compute the various offsets
467  AccPixType pixelscount = 1;
468  for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i)
469  {
470  pixelscount *= (AccPixType)(2 * radius[i] + 1);
471  }
472 
473  using OutputIteratorType = ImageRegionIterator<OutputImageType>;
474  using InputIteratorType = ImageRegionConstIterator<InputImageType>;
475 
476  using CornerItVecType = std::vector<InputIteratorType>;
477  CornerItVecType cornerItVec;
478  // set up the iterators for each corner
479  for (unsigned int k = 0; k < realCorners.size(); ++k)
480  {
481  typename InputImageType::RegionType tReg = face;
482  tReg.SetIndex(tReg.GetIndex() + realCorners[k]);
483  InputIteratorType tempIt(accImage, tReg);
484  tempIt.GoToBegin();
485  cornerItVec.push_back(tempIt);
486  }
487  // set up the output iterator
488  OutputIteratorType oIt(outputImage, face);
489  // now do the work
490  for (oIt.GoToBegin(); !oIt.IsAtEnd(); ++oIt)
491  {
492  AccPixType sum = 0;
493  AccPixType squareSum = 0;
494  // check each corner
495  for (unsigned int k = 0; k < cornerItVec.size(); ++k)
496  {
497  const InputPixelType & i = cornerItVec[k].Get();
498  sum += weights[k] * i[0];
499  squareSum += weights[k] * i[1];
500  // increment each corner iterator
501  ++(cornerItVec[k]);
502  }
503 
504  oIt.Set(static_cast<OutputPixelType>(std::sqrt((squareSum - sum * sum / pixelscount) / (pixelscount - 1))));
505 #if defined(ITKV4_COMPATIBILITY)
506  progress.CompletedPixel();
507 #endif
508  }
509  }
510  else
511  {
512  // now we need to deal with the border regions
513  using OutputIteratorType = ImageRegionIteratorWithIndex<OutputImageType>;
514  OutputIteratorType oIt(outputImage, face);
515  // now do the work
516  for (oIt.GoToBegin(); !oIt.IsAtEnd(); ++oIt)
517  {
518  // figure out the number of pixels in the box by creating an
519  // equivalent region and cropping - this could probably be
520  // included in the loop below.
521  RegionType currentKernelRegion;
522  currentKernelRegion.SetSize(kernelSize);
523  // compute the region's index
524  IndexType kernelRegionIdx = oIt.GetIndex();
525  IndexType centIndex = kernelRegionIdx;
526  for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i)
527  {
528  kernelRegionIdx[i] -= radius[i];
529  }
530  currentKernelRegion.SetIndex(kernelRegionIdx);
531  currentKernelRegion.Crop(inputRegion);
532  SizeValueType edgepixelscount = currentKernelRegion.GetNumberOfPixels();
533  AccPixType sum = 0;
534  AccPixType squareSum = 0;
535  // rules are : for each corner,
536  // for each dimension
537  // if dimension offset is positive -> this is
538  // a leading edge. Crop if outside the input
539  // region
540  // if dimension offset is negative -> this is
541  // a trailing edge. Ignore if it is outside
542  // image region
543  for (unsigned int k = 0; k < realCorners.size(); ++k)
544  {
545  IndexType thisCorner = centIndex + realCorners[k];
546  bool includeCorner = true;
547  for (unsigned int j = 0; j < TInputImage::ImageDimension; ++j)
548  {
549  if (unitCorners[k][j] > 0)
550  {
551  // leading edge - crop it
552  thisCorner[j] = std::min(thisCorner[j], static_cast<OffsetValueType>(regionLimit[j]));
553  }
554  else
555  {
556  // trailing edge - check bounds
557  if (thisCorner[j] < regionStart[j])
558  {
559  includeCorner = false;
560  break;
561  }
562  }
563  }
564  if (includeCorner)
565  {
566  const InputPixelType & i = accImage->GetPixel(thisCorner);
567  sum += weights[k] * i[0];
568  squareSum += weights[k] * i[1];
569  }
570  }
571 
572  oIt.Set(
573  static_cast<OutputPixelType>(std::sqrt((squareSum - sum * sum / edgepixelscount) / (edgepixelscount - 1))));
574 #if defined(ITKV4_COMPATIBILITY)
575  progress.CompletedPixel();
576 #endif
577  }
578  }
579  }
580 }
581 
582 template <typename TInputImage, typename TOutputImage>
583 void
584 BoxSquareAccumulateFunction(const TInputImage * inputImage,
585  TOutputImage * outputImage,
586  typename TInputImage::RegionType inputRegion,
587  typename TOutputImage::RegionType outputRegion
588 #if defined(ITKV4_COMPATIBILITY)
589  ,
590  ProgressReporter & progress)
591 #else
592 )
593 #endif
594 {
595  // type alias
596  using InputImageType = TInputImage;
597  using OffsetType = typename TInputImage::OffsetType;
598  using OutputImageType = TOutputImage;
599  using OutputPixelType = typename TOutputImage::PixelType;
600  using ValueType = typename OutputPixelType::ValueType;
601  using InputPixelType = typename TInputImage::PixelType;
602 
603  using InputIterator = ImageRegionConstIterator<TInputImage>;
604 
605  using NOutputIterator = ShapedNeighborhoodIterator<TOutputImage>;
606  InputIterator inIt(inputImage, inputRegion);
607  typename TInputImage::SizeType kernelRadius;
608  kernelRadius.Fill(1);
609 
610  NOutputIterator noutIt(kernelRadius, outputImage, outputRegion);
611  // this iterator is fully connected
613 
615  oBC.SetConstant(OutputPixelType{});
616  noutIt.OverrideBoundaryCondition(&oBC);
617  // This uses several iterators. An alternative and probably better
618  // approach would be to copy the input to the output and convolve
619  // with the following weights (in 2D)
620  // -(dim - 1) 1
621  // 1 1
622  // The result of each convolution needs to get written back to the
623  // image being convolved so that the accumulation propagates
624  // This should be implementable with neighborhood operators.
625 
626  std::vector<int> weights;
627  typename NOutputIterator::ConstIterator sIt;
628  for (auto idxIt = noutIt.GetActiveIndexList().begin(); idxIt != noutIt.GetActiveIndexList().end(); ++idxIt)
629  {
630  OffsetType offset = noutIt.GetOffset(*idxIt);
631  int w = -1;
632  for (unsigned int k = 0; k < InputImageType::ImageDimension; ++k)
633  {
634  if (offset[k] != 0)
635  {
636  w *= offset[k];
637  }
638  }
639  weights.push_back(w);
640  }
641 
642  for (inIt.GoToBegin(), noutIt.GoToBegin(); !noutIt.IsAtEnd(); ++inIt, ++noutIt)
643  {
644  ValueType sum = 0;
645  ValueType squareSum = 0;
646  int k;
647  for (k = 0, sIt = noutIt.Begin(); !sIt.IsAtEnd(); ++sIt, ++k)
648  {
649  const OutputPixelType & v = sIt.Get();
650  sum += v[0] * weights[k];
651  squareSum += v[1] * weights[k];
652  }
653  OutputPixelType o;
654  const InputPixelType & i = inIt.Get();
655  o[0] = sum + i;
656  o[1] = squareSum + i * i;
657  noutIt.SetCenterPixel(o);
658 #if defined(ITKV4_COMPATIBILITY)
659  progress.CompletedPixel();
660 #endif
661  }
662 }
663 } // namespace itk
664 
665 #endif
itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator
Splits an image into a main region and several "face" regions which are used to handle computations o...
Definition: itkNeighborhoodAlgorithm.h:63
itkNeighborhoodAlgorithm.h
itk::BoxMeanCalculatorFunction
void BoxMeanCalculatorFunction(const TInputImage *accImage, TOutputImage *outputImage, typename TInputImage::RegionType inputRegion, typename TOutputImage::RegionType outputRegion, typename TInputImage::SizeType radius)
Definition: itkBoxUtilities.h:206
itkOffset.h
itk::BoxSigmaCalculatorFunction
void BoxSigmaCalculatorFunction(const TInputImage *accImage, TOutputImage *outputImage, typename TInputImage::RegionType inputRegion, typename TOutputImage::RegionType outputRegion, typename TInputImage::SizeType radius)
Definition: itkBoxUtilities.h:391
itkProgressReporter.h
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::Index::SetIndex
void SetIndex(const IndexValueType val[VDimension])
Definition: itkIndex.h:242
itk_impl_details::setConnectivityEarlyBox
TIterator * setConnectivityEarlyBox(TIterator *it, bool fullyConnected=false)
Definition: itkBoxUtilities.h:46
itk_impl_details
Definition: itkBoxUtilities.h:41
itkImageRegionIterator.h
itkImageRegionIteratorWithIndex.h
itk::ShapedNeighborhoodIterator
A neighborhood iterator which can take on an arbitrary shape.
Definition: itkShapedNeighborhoodIterator.h:150
itk::ProgressReporter::CompletedPixel
void CompletedPixel()
Definition: itkProgressReporter.h:96
itk::Size::Fill
void Fill(SizeValueType value)
Definition: itkSize.h:213
itkConstantBoundaryCondition.h
itk::BoxSquareAccumulateFunction
void BoxSquareAccumulateFunction(const TInputImage *inputImage, TOutputImage *outputImage, typename TInputImage::RegionType inputRegion, typename TOutputImage::RegionType outputRegion)
Definition: itkBoxUtilities.h:584
itk::BoxAccumulateFunction
void BoxAccumulateFunction(const TInputImage *inputImage, const TOutputImage *outputImage, typename TInputImage::RegionType inputRegion, typename TOutputImage::RegionType outputRegion)
Definition: itkBoxUtilities.h:99
itk::ImageRegionIterator
A multi-dimensional iterator templated over image type that walks a region of pixels.
Definition: itkImageRegionIterator.h:80
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::ConstantBoundaryCondition
This boundary condition returns a constant value for out-of-bounds image pixels.
Definition: itkConstantBoundaryCondition.h:68
itk::Index::GetIndex
const IndexValueType * GetIndex() const
Definition: itkIndex.h:232
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::CornerOffsets
std::vector< typename TImage::OffsetType > CornerOffsets(const TImage *im)
Definition: itkBoxUtilities.h:174
itk::OffsetValueType
long OffsetValueType
Definition: itkIntTypes.h:94
itk::ConstantBoundaryCondition::SetConstant
void SetConstant(const OutputPixelType &c)
itk::ImageRegionIteratorWithIndex
A multi-dimensional iterator templated over image type that walks pixels within a region and is speci...
Definition: itkImageRegionIteratorWithIndex.h:73
itk::NumericTraits
Define additional traits for native types such as int or float.
Definition: itkNumericTraits.h:59
itkShapedNeighborhoodIterator.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ImageRegion::SetIndex
void SetIndex(const IndexType &index)
Definition: itkImageRegion.h:181
itk::ImageRegionConstIterator
A multi-dimensional iterator templated over image type that walks a region of pixels.
Definition: itkImageRegionConstIterator.h:109
itk::ZeroFluxNeumannBoundaryCondition< TInputImage >
itk::ImageRegion::SetSize
void SetSize(const SizeType &size)
Definition: itkImageRegion.h:202
itk::ProgressReporter
Implements progress tracking for a filter.
Definition: itkProgressReporter.h:60
itk::GTest::TypedefsAndConstructors::Dimension2::Dimension
constexpr unsigned int Dimension
Definition: itkGTestTypedefsAndConstructors.h:44
itkZeroFluxNeumannBoundaryCondition.h
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83