No progress reporting in ITK5

ITK5 is great for many reasons but users started to complain that 3D Slicer hangs because all they see that image processing filters are stuck at 0% (e.g., https://discourse.slicer.org/t/bilateral-filter-not-working/9797/9). It is really hard to use a filter if you don’t know that you have to wait seconds, minutes, or hours for it to complete.

I understand that progress reporting is harder since the new threading model is implemented in ITK but in interactive use cases progress reporting is essential. What would be the best way to get progress reporting working again?

I’ve found some posts related to a new “itkProgressTransformer” class, but it seems to be only used in a few classes and it is not clear how it can be applied to others. For example, I wanted to try it on itkMedianImageFilter, but there is no GenerateData method in this class. Is there any solution for such classes?

2 Likes

Thanks for bringing this up @lassoan. I’ve recently been working on some multi-threaded processing that takes a long time and I’d like to echo that the current situation is frustrating. With the default behaviour, progress sits at 0% until just before the end when all the threads finish, and then the 25%/50%/75% messages often show up simultaneously.

It would be great if this could be improved.

2 Likes

itk::ProgressTransformer maps progress from one scale to another, and is meant for use in mini-pipelines where filter has a pipeline of other files inside it.

One of the limitations is that progress reporting is only allowed from the “main” thread, to make sure it works well on all operating systems. And reporting at the end comes from here:


Combined with the desire to avoid overhead associated with splitting image into more regions than necessary, it can end up with uselessly small number of progress updates.

Part of the reason to have multi-threaders report progress instead of filters, is that many filter authors did not bother with progress reporting. This came at the expense of important filters, which had their progress reporting frequency reduced with the use of default multi-threader.

Using TBBMultiThreader increases the frequency of progress updates, due to use of greater number of work units.

Reintroducing a per-pixel reporting would require redesigning ProgressReporter class in conjunction with ProcessObject, possibly relying on atomics. And then reinstating the use of ProgressReporter in filters of interest. A list of files which had it in ITKv4 is below. Good news is that per-filter effort would be small, because only a few filters had significant internal refactoring.

Search "ProgressReporter" (242 hits in 200 files)
  C:\Libs\InsightToolkit-4.13.1\Modules\Compatibility\Deprecated\include\itkReflectImageFilter.hxx (1 hit)
	Line 62:   ProgressReporter progress( this, 0,  inputPtr->GetRequestedRegion().GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Compatibility\Deprecated\include\itkScalarToArrayCastImageFilter.hxx (1 hit)
	Line 68:   ProgressReporter progress( this,
  C:\Libs\InsightToolkit-4.13.1\Modules\Compatibility\Deprecated\include\itkShiftScaleInPlaceImageFilter.hxx (1 hit)
	Line 91:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Compatibility\Deprecated\include\itkTransformToDisplacementFieldSource.hxx (2 hits)
	Line 228:   ProgressReporter progress( this, threadId,
	Line 282:   ProgressReporter progress( this, threadId,
  C:\Libs\InsightToolkit-4.13.1\Modules\Compatibility\Deprecated\include\itkTwoOutputExampleImageFilter.hxx (1 hit)
	Line 148:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Compatibility\V3Compatibility\include\itkDeformationFieldSource.hxx (1 hit)
	Line 166:   ProgressReporter progress(this, 0, region.GetNumberOfPixels(), 10);
  C:\Libs\InsightToolkit-4.13.1\Modules\Compatibility\V3Compatibility\include\itkExponentialDeformationFieldImageFilter.hxx (1 hit)
	Line 136:   ProgressReporter progress(this, 0, numiter + 1, numiter + 1);
  C:\Libs\InsightToolkit-4.13.1\Modules\Compatibility\V3Compatibility\include\itkInverseDeformationFieldImageFilter.hxx (1 hit)
	Line 246:   ProgressReporter progress(this, 0, region.GetNumberOfPixels(), 10);
  C:\Libs\InsightToolkit-4.13.1\Modules\Compatibility\V3Compatibility\include\itkIterativeInverseDeformationFieldImageFilter.hxx (1 hit)
	Line 114:     ProgressReporter progress( this, 0,
  C:\Libs\InsightToolkit-4.13.1\Modules\Compatibility\V3Compatibility\include\itkTransformToDeformationFieldSource.hxx (2 hits)
	Line 228:   ProgressReporter progress( this, threadId,
	Line 282:   ProgressReporter progress( this, threadId,
  C:\Libs\InsightToolkit-4.13.1\Modules\Core\Common\include\itkExtractImageFilter.hxx (1 hit)
	Line 317:   ProgressReporter progress( this, threadId, 1 );
  C:\Libs\InsightToolkit-4.13.1\Modules\Core\Common\include\itkProgressReporter.h (6 hits)
	Line 26: /** \class ProgressReporter
	Line 41:  *   ProgressReporter progress(this, threadId,
	Line 60: class ITKCommon_EXPORT ProgressReporter
	Line 64:   ProgressReporter(ProcessObject *filter, ThreadIdType threadId,
	Line 71:   ~ProgressReporter();
	Line 110:   ProgressReporter() ITK_DELETED_FUNCTION;
  C:\Libs\InsightToolkit-4.13.1\Modules\Core\Common\include\itkUnaryFunctorImageFilter.hxx (1 hit)
	Line 103:   ProgressReporter progress( this, threadId, numberOfLinesToProcess );
  C:\Libs\InsightToolkit-4.13.1\Modules\Core\Common\src\itkProgressReporter.cxx (4 hits)
	Line 23: ProgressReporter::ProgressReporter(ProcessObject *filter, ThreadIdType threadId,
	Line 23: ProgressReporter::ProgressReporter(ProcessObject *filter, ThreadIdType threadId,
	Line 55: ProgressReporter::~ProgressReporter()
	Line 55: ProgressReporter::~ProgressReporter()
  C:\Libs\InsightToolkit-4.13.1\Modules\Core\ImageFunction\include\itkBSplineDecompositionImageFilter.hxx (1 hit)
	Line 262:   ProgressReporter progress(this, 0, count, 10);
  C:\Libs\InsightToolkit-4.13.1\Modules\Core\Mesh\include\itkImageToParametricSpaceFilter.hxx (1 hit)
	Line 116:   ProgressReporter progress(this, 0, numberOfPixels);
  C:\Libs\InsightToolkit-4.13.1\Modules\Core\Mesh\include\itkInteriorExteriorMeshFilter.hxx (1 hit)
	Line 108:   ProgressReporter progress( this, 0, inPoints->Size() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Core\Mesh\include\itkParametricSpaceToImageSpaceMeshFilter.hxx (1 hit)
	Line 112:   ProgressReporter progress( this, 0, inPoints->Size() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Core\SpatialObjects\include\itkSpatialObjectToImageFilter.hxx (1 hit)
	Line 372:   ProgressReporter
  C:\Libs\InsightToolkit-4.13.1\Modules\Core\TestKernel\include\itkRandomImageSource.hxx (1 hit)
	Line 247:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Core\TestKernel\include\itkTestingComparisonImageFilter.hxx (1 hit)
	Line 155:   ProgressReporter progress( this, threadId, threadRegion.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Core\TestKernel\include\itkTestingExtractSliceImageFilter.hxx (1 hit)
	Line 266:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Core\TestKernel\include\itkTestingStretchIntensityImageFilter.hxx (1 hit)
	Line 127:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\BinaryMathematicalMorphology\include\itkBinaryDilateImageFilter.hxx (1 hit)
	Line 86:   ProgressReporter progress( this, 0,
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\BinaryMathematicalMorphology\include\itkBinaryErodeImageFilter.hxx (1 hit)
	Line 86:   ProgressReporter progress( this, 0,
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\BinaryMathematicalMorphology\include\itkBinaryMorphologicalClosingImageFilter.hxx (1 hit)
	Line 152:   ProgressReporter progress2(this, 0, this->GetOutput()->GetRequestedRegion().GetNumberOfPixels(), 20, 0.9, 0.1);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\BinaryMathematicalMorphology\include\itkObjectMorphologyImageFilter.hxx (1 hit)
	Line 150:   ProgressReporter progress( this, threadId,
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\Colormap\include\itkScalarToRGBColormapImageFilter.hxx (1 hit)
	Line 120:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\Convolution\include\itkNormalizedCorrelationImageFilter.hxx (1 hit)
	Line 159:   ProgressReporter progress( this, threadId,
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\Denoising\include\itkPatchBasedDenoisingImageFilter.hxx (1 hit)
	Line 2085:   ProgressReporter progress(this, threadId, regionToProcess.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\DiffusionTensorImage\include\itkDiffusionTensor3DReconstructionImageFilter.hxx (2 hits)
	Line 240:     ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
	Line 355:     ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\DisplacementField\include\itkDisplacementFieldJacobianDeterminantFilter.hxx (1 hit)
	Line 197:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\DisplacementField\include\itkExponentialDisplacementFieldImageFilter.hxx (1 hit)
	Line 135:   ProgressReporter progress(this, 0, numiter + 1, numiter + 1);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\DisplacementField\include\itkInverseDisplacementFieldImageFilter.hxx (1 hit)
	Line 250:   ProgressReporter progress(this, 0, region.GetNumberOfPixels(), 10);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\DisplacementField\include\itkIterativeInverseDisplacementFieldImageFilter.hxx (1 hit)
	Line 115:     ProgressReporter progress( this, 0,
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\DisplacementField\include\itkLandmarkDisplacementFieldSource.hxx (1 hit)
	Line 167:   ProgressReporter progress(this, 0, region.GetNumberOfPixels(), 10);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\DisplacementField\include\itkTransformToDisplacementFieldFilter.hxx (2 hits)
	Line 201:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
	Line 249:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\DistanceMap\include\itkContourDirectedMeanDistanceImageFilter.hxx (1 hit)
	Line 207:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\DistanceMap\include\itkDirectedHausdorffDistanceImageFilter.hxx (1 hit)
	Line 200:   ProgressReporter progress( this, threadId, regionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\DistanceMap\include\itkSignedMaurerDistanceMapImageFilter.hxx (3 hits)
	Line 217:   ProgressReporter *progress =
	Line 218:       new ProgressReporter(this,
	Line 280:     ProgressReporter progress2(this, threadId,
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\FastMarching\include\itkFastMarchingBase.hxx (1 hit)
	Line 138:   ProgressReporter progress( this, 0, this->GetTotalNumberOfNodes() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\FFT\include\itkFFTWComplexToComplexFFTImageFilter.hxx (1 hit)
	Line 65:   ProgressReporter progress(this, 0, 1);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\FFT\include\itkFFTWForwardFFTImageFilter.hxx (1 hit)
	Line 60:   ProgressReporter progress(this, 0, 1);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\FFT\include\itkFFTWHalfHermitianToRealInverseFFTImageFilter.hxx (1 hit)
	Line 52:   ProgressReporter progress( this, 0, 1 );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\FFT\include\itkFFTWInverseFFTImageFilter.hxx (1 hit)
	Line 54:   ProgressReporter progress( this, 0, 1 );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\FFT\include\itkFFTWRealToHalfHermitianForwardFFTImageFilter.hxx (1 hit)
	Line 55:   ProgressReporter progress(this, 0, 1);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\FFT\include\itkFullToHalfHermitianImageFilter.hxx (1 hit)
	Line 109:   ProgressReporter progress(this, threadId, 1);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\FFT\include\itkHalfToFullHermitianImageFilter.hxx (2 hits)
	Line 126:   // Set up the ProgressReporter.
	Line 127:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels(),
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\FFT\include\itkVnlForwardFFTImageFilter.hxx (1 hit)
	Line 46:   ProgressReporter progress( this, 0, 1 );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\FFT\include\itkVnlHalfHermitianToRealInverseFFTImageFilter.hxx (1 hit)
	Line 45:   ProgressReporter progress( this, 0, 1 );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\FFT\include\itkVnlInverseFFTImageFilter.hxx (1 hit)
	Line 45:   ProgressReporter progress( this, 0, 1 );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\FFT\include\itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx (1 hit)
	Line 45:   ProgressReporter progress( this, 0, 1 );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\GPUImageFilterBase\include\itkGPUNeighborhoodOperatorImageFilter.hxx (1 hit)
	Line 256:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageCompare\include\itkCheckerBoardImageFilter.hxx (1 hit)
	Line 78:   ProgressReporter progress( this, threadId,
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageCompare\include\itkSimilarityIndexImageFilter.hxx (1 hit)
	Line 164:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageCompose\include\itkComposeImageFilter.hxx (1 hit)
	Line 120:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageCompose\include\itkJoinSeriesImageFilter.hxx (1 hit)
	Line 237:   ProgressReporter progress( this, threadId, outputRegionForThread.GetSize(InputImageDimension) );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageCompose\test\itkJoinSeriesImageFilterTest.cxx (1 hit)
	Line 133:   // Test the ProgressReporter
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageFeature\include\itkBilateralImageFilter.hxx (1 hit)
	Line 290:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageFeature\include\itkCannyEdgeDetectionImageFilter.hxx (2 hits)
	Line 135:   ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels(), 100, 0.0f, 0.5f);
	Line 468:   ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels(), 100, 0.5f, 0.5f);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageFeature\include\itkHessianToObjectnessMeasureImageFilter.hxx (1 hit)
	Line 67:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels(), 1000 / this->GetNumberOfThreads() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageFeature\include\itkSimpleContourExtractorImageFilter.hxx (1 hit)
	Line 66:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageFeature\include\itkZeroCrossingImageFilter.hxx (1 hit)
	Line 113:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageFilterBase\include\itkBinaryFunctorImageFilter.hxx (3 hits)
	Line 213:     ProgressReporter progress( this, threadId, static_cast<SizeValueType>( numberOfLinesToProcess ) );
	Line 237:     ProgressReporter progress( this, threadId, static_cast<SizeValueType>( numberOfLinesToProcess ) );
	Line 258:     ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageFilterBase\include\itkCastImageFilter.hxx (2 hits)
	Line 47:     ProgressReporter progress(this, 0, 1);
	Line 103:   ProgressReporter progress(this, threadId, 1);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageFilterBase\include\itkMaskNeighborhoodOperatorImageFilter.hxx (1 hit)
	Line 128:   ProgressReporter progress( this, threadId,
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageFilterBase\include\itkMovingHistogramImageFilter.hxx (1 hit)
	Line 87:   ProgressReporter progress(this, threadId,
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageFilterBase\include\itkNeighborhoodOperatorImageFilter.hxx (1 hit)
	Line 112:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() , 10);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageFilterBase\include\itkNoiseImageFilter.hxx (1 hit)
	Line 61:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageFilterBase\include\itkRecursiveSeparableImageFilter.hxx (1 hit)
	Line 292:     ProgressReporter   progress(this, threadId, numberOfLinesToProcess, 10);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageFilterBase\include\itkTernaryFunctorImageFilter.hxx (1 hit)
	Line 135:   ProgressReporter progress( this, threadId, static_cast<SizeValueType>( numberOfLinesToProcess ) );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageFilterBase\include\itkVectorNeighborhoodOperatorImageFilter.hxx (1 hit)
	Line 106:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGradient\include\itkDifferenceOfGaussiansGradientImageFilter.hxx (1 hit)
	Line 67:   ProgressReporter progress( this, 0, outputPtr->GetRequestedRegion().GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGradient\include\itkGradientImageFilter.hxx (1 hit)
	Line 176:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGradient\include\itkGradientMagnitudeImageFilter.hxx (1 hit)
	Line 156:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGradient\include\itkVectorGradientMagnitudeImageFilter.hxx (1 hit)
	Line 235:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGrid\include\itkBinShrinkImageFilter.hxx (1 hit)
	Line 165:     ProgressReporter progress(this, threadId, numberOfLinesToProcess );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGrid\include\itkBSplineCenteredResampleImageFilterBase.h (2 hits)
	Line 94:     ProgressReporter & progress
	Line 101:     ProgressReporter & progress
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGrid\include\itkBSplineCenteredResampleImageFilterBase.hxx (2 hits)
	Line 240:                 unsigned int inTraverseSize, ProgressReporter & progress)
	Line 304:                 unsigned int inTraverseSize, ProgressReporter & progress)
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGrid\include\itkBSplineResampleImageFilterBase.h (2 hits)
	Line 149:     ProgressReporter & progress
	Line 157:     ProgressReporter & progress
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGrid\include\itkBSplineResampleImageFilterBase.hxx (4 hits)
	Line 196:                 unsigned int inTraverseSize, ProgressReporter & progress)
	Line 277:                 unsigned int inTraverseSize, ProgressReporter & progress)
	Line 394:   ProgressReporter progress(this, 0, count, 10);
	Line 514:   ProgressReporter progress(this, 0, count, 10);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGrid\include\itkCyclicShiftImageFilter.hxx (1 hit)
	Line 60:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGrid\include\itkExpandImageFilter.hxx (1 hit)
	Line 141:   ProgressReporter progress( this, threadId, static_cast<SizeValueType>( numberOfLinesToProcess ) );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGrid\include\itkFlipImageFilter.hxx (1 hit)
	Line 174:   ProgressReporter progress( this, threadId, static_cast<SizeValueType>( numberOfLinesToProcess ) );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGrid\include\itkInterpolateImageFilter.hxx (1 hit)
	Line 198:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGrid\include\itkInterpolateImagePointsFilter.hxx (1 hit)
	Line 116:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGrid\include\itkMirrorPadImageFilter.hxx (1 hit)
	Line 745:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGrid\include\itkPadImageFilterBase.hxx (2 hits)
	Line 104:     ProgressReporter progress( this, threadId, numberOfPixels );
	Line 122:     ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGrid\include\itkPasteImageFilter.hxx (1 hit)
	Line 116:   ProgressReporter progress( this, threadId, 1 );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGrid\include\itkPermuteAxesImageFilter.hxx (1 hit)
	Line 244:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGrid\include\itkRegionOfInterestImageFilter.hxx (1 hit)
	Line 116:   ProgressReporter progress( this, threadId, 1 );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGrid\include\itkResampleImageFilter.hxx (2 hits)
	Line 285:   ProgressReporter progress( this,
	Line 381:   ProgressReporter progress( this,
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGrid\include\itkShrinkImageFilter.hxx (1 hit)
	Line 166:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGrid\include\itkSliceBySliceImageFilter.hxx (1 hit)
	Line 205:   ProgressReporter progress(this, 0, requestedSize[m_Dimension]);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGrid\include\itkSliceImageFilter.hxx (1 hit)
	Line 133:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGrid\include\itkVectorResampleImageFilter.hxx (1 hit)
	Line 132:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGrid\include\itkWarpImageFilter.hxx (1 hit)
	Line 319:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageGrid\include\itkWarpVectorImageFilter.hxx (1 hit)
	Line 174:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageIntensity\include\itkClampImageFilter.hxx (1 hit)
	Line 136:     ProgressReporter progress(this, 0, 1);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageIntensity\include\itkNaryFunctorImageFilter.hxx (1 hit)
	Line 75:   ProgressReporter progress( this, threadId, static_cast<SizeValueType>( numberOfLinesToProcess ) );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageIntensity\include\itkShiftScaleImageFilter.hxx (1 hit)
	Line 93:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageIntensity\include\itkVectorExpandImageFilter.hxx (1 hit)
	Line 180:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageLabel\include\itkBinaryContourImageFilter.hxx (1 hit)
	Line 148:   ProgressReporter progress(this, threadId, linecountForThread * 2);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageLabel\include\itkLabelContourImageFilter.hxx (1 hit)
	Line 133:   ProgressReporter progress(this, threadId, linecountForThread * 2);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageNoise\include\itkAdditiveGaussianNoiseImageFilter.hxx (1 hit)
	Line 62:   ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageNoise\include\itkSaltAndPepperNoiseImageFilter.hxx (1 hit)
	Line 60:   ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageNoise\include\itkShotNoiseImageFilter.hxx (1 hit)
	Line 63:   ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageNoise\include\itkSpeckleNoiseImageFilter.hxx (1 hit)
	Line 61:   ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageSources\include\itkGaborImageSource.hxx (1 hit)
	Line 68:   ProgressReporter progress( this, 0,
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageSources\include\itkGaussianImageSource.hxx (1 hit)
	Line 111:   ProgressReporter progress( this, 0,
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageSources\include\itkGridImageSource.hxx (1 hit)
	Line 98:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageSources\include\itkPhysicalPointImageSource.hxx (1 hit)
	Line 55:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageStatistics\include\itkLabelOverlapMeasuresImageFilter.hxx (1 hit)
	Line 125:   ProgressReporter progress( this, threadId,
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageStatistics\include\itkLabelStatisticsImageFilter.hxx (1 hit)
	Line 246:   ProgressReporter progress( this, threadId, static_cast<SizeValueType>( numberOfLinesToProcess ) );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageStatistics\include\itkMinimumMaximumImageFilter.hxx (1 hit)
	Line 199:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels()/2 );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageStatistics\include\itkProjectionImageFilter.hxx (1 hit)
	Line 237:   ProgressReporter progress( this, threadId,
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\ImageStatistics\include\itkStatisticsImageFilter.hxx (1 hit)
	Line 325:   ProgressReporter progress( this, threadId, static_cast<itk::SizeValueType>( numberOfLinesToProcess ) );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\LabelMap\include\itkAggregateLabelMapFilter.hxx (1 hit)
	Line 36:   ProgressReporter progress( this, 0, output->GetNumberOfLabelObjects() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\LabelMap\include\itkAttributeKeepNObjectsLabelMapFilter.hxx (1 hit)
	Line 53:   ProgressReporter progress( this, 0, 2 * output->GetNumberOfLabelObjects() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\LabelMap\include\itkAttributeOpeningLabelMapFilter.hxx (1 hit)
	Line 55:   ProgressReporter progress( this, 0, output->GetNumberOfLabelObjects() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\LabelMap\include\itkAttributeRelabelLabelMapFilter.hxx (1 hit)
	Line 47:   ProgressReporter progress( this, 0, 2 * output->GetNumberOfLabelObjects() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\LabelMap\include\itkAttributeSelectionLabelMapFilter.hxx (1 hit)
	Line 54:   ProgressReporter progress( this, 0, output->GetNumberOfLabelObjects() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\LabelMap\include\itkAttributeUniqueLabelMapFilter.hxx (1 hit)
	Line 48:   ProgressReporter progress(this, 0, 1);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\LabelMap\include\itkBinaryImageToLabelMapFilter.h (1 hit)
	Line 233:                   ProgressReporter & progress);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\LabelMap\include\itkBinaryImageToLabelMapFilter.hxx (2 hits)
	Line 135:   ProgressReporter progress(this, threadId, linecountForThread, 75, 0.0f, 0.75f);
	Line 349:   ProgressReporter  progress(this, 0, linecount, 25, 0.75f, 0.25f);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\LabelMap\include\itkChangeLabelLabelMapFilter.hxx (1 hit)
	Line 90:   ProgressReporter progress(this, 0, static_cast<SizeValueType>( m_MapOfLabelToBeReplaced.size() ) * 2);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\LabelMap\include\itkChangeRegionLabelMapFilter.hxx (1 hit)
	Line 85:     ProgressReporter progress(this, 0, 1);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\LabelMap\include\itkConvertLabelMapFilter.hxx (1 hit)
	Line 40:   ProgressReporter progress( this, 0, inputImage->GetNumberOfLabelObjects() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\LabelMap\include\itkLabelImageToLabelMapFilter.hxx (1 hit)
	Line 91:   ProgressReporter progress( this, threadId, regionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\LabelMap\include\itkLabelMapMaskImageFilter.hxx (1 hit)
	Line 271:   ProgressReporter progress( this, threadId, 1 );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\LabelMap\include\itkLabelMapToAttributeImageFilter.hxx (1 hit)
	Line 70:   ProgressReporter progress( this, 0, output->GetRequestedRegion().GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\LabelMap\include\itkMergeLabelMapFilter.hxx (4 hits)
	Line 81:   ProgressReporter progress(this, 0, 1);
	Line 126:   ProgressReporter progress(this, 0, 1);
	Line 174:   ProgressReporter progress(this, 0, 1);
	Line 221:   ProgressReporter progress(this, 0, 1);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\LabelMap\include\itkObjectByObjectLabelMapFilter.hxx (1 hit)
	Line 175:   ProgressReporter progress( this, 0, this->GetLabelMap()->GetNumberOfLabelObjects() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\LabelMap\include\itkShapeKeepNObjectsLabelMapFilter.h (1 hit)
	Line 133:     ProgressReporter progress( this, 0, 2 * output->GetNumberOfLabelObjects() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\LabelMap\include\itkShapeOpeningLabelMapFilter.h (1 hit)
	Line 137:     ProgressReporter progress( this, 0, output->GetNumberOfLabelObjects() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\LabelMap\include\itkShapeRelabelLabelMapFilter.h (1 hit)
	Line 122:     ProgressReporter progress( this, 0, 2 * output->GetNumberOfLabelObjects() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\LabelMap\include\itkShapeUniqueLabelMapFilter.h (1 hit)
	Line 123:     ProgressReporter progress(this, 0, 1);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\LabelMap\include\itkShiftScaleLabelMapFilter.hxx (1 hit)
	Line 48:   ProgressReporter progress( this, 0, static_cast<SizeValueType>( labelObjects.size() ) );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\MathematicalMorphology\include\itkAnchorErodeDilateImageFilter.hxx (1 hit)
	Line 57:   ProgressReporter progress(this, threadId, static_cast<SizeValueType>( this->GetKernel().GetLines().size() )+ 1);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\MathematicalMorphology\include\itkAnchorOpenCloseImageFilter.hxx (1 hit)
	Line 62:   ProgressReporter progress(this, threadId, static_cast<SizeValueType>( this->GetKernel().GetLines().size() )* 2 + 1);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\MathematicalMorphology\include\itkGrayscaleGeodesicDilateImageFilter.hxx (1 hit)
	Line 290:   ProgressReporter progress(this, threadId,
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\MathematicalMorphology\include\itkGrayscaleGeodesicErodeImageFilter.hxx (1 hit)
	Line 289:   ProgressReporter progress(this, threadId,
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\MathematicalMorphology\include\itkMaskedMovingHistogramImageFilter.hxx (1 hit)
	Line 184:   ProgressReporter progress(this, threadId,
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\MathematicalMorphology\include\itkMorphologyImageFilter.hxx (1 hit)
	Line 56:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\MathematicalMorphology\include\itkReconstructionImageFilter.hxx (1 hit)
	Line 114:   ProgressReporter progress(this, 0, this->GetOutput()->GetRequestedRegion().GetNumberOfPixels() * 3);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\MathematicalMorphology\include\itkRegionalMaximaImageFilter.hxx (1 hit)
	Line 96:     ProgressReporter progress2(this, 0,
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\MathematicalMorphology\include\itkRegionalMinimaImageFilter.hxx (1 hit)
	Line 97:     ProgressReporter progress2(
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\MathematicalMorphology\include\itkValuedRegionalExtremaImageFilter.hxx (1 hit)
	Line 91:   ProgressReporter progress(this, 0,
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\MathematicalMorphology\include\itkVanHerkGilWermanErodeDilateImageFilter.hxx (1 hit)
	Line 56:   ProgressReporter progress(this, threadId, static_cast<SizeValueType>( this->GetKernel().GetLines().size() ) + 1);
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\Path\include\itkExtractOrthogonalSwath2DImageFilter.hxx (1 hit)
	Line 177:   ProgressReporter progress( this, 0,  outputRegion.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\QuadEdgeMeshFiltering\include\itkSmoothingQuadEdgeMeshFilter.hxx (1 hit)
	Line 57:   ProgressReporter progress( this, 0, m_NumberOfIterations * ( numberOfPoints + 1 ), 100 );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\Smoothing\include\itkBinomialBlurImageFilter.hxx (1 hit)
	Line 138:   ProgressReporter progress(this, 0,
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\Smoothing\include\itkBoxMeanImageFilter.hxx (1 hit)
	Line 64:   ProgressReporter progress( this, threadId, 2 * accumRegion.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\Smoothing\include\itkBoxSigmaImageFilter.hxx (1 hit)
	Line 66:   ProgressReporter progress( this, threadId, 2 * accumRegion.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\Smoothing\include\itkBoxUtilities.h (4 hits)
	Line 104:                       ProgressReporter & progress)
	Line 207:                           ProgressReporter & progress)
	Line 389:                            ProgressReporter & progress)
	Line 578:                             ProgressReporter & progress)
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\Smoothing\include\itkMeanImageFilter.hxx (1 hit)
	Line 61:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\Smoothing\include\itkMedianImageFilter.hxx (1 hit)
	Line 55:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\Thresholding\include\itkHuangThresholdCalculator.hxx (1 hit)
	Line 43:   ProgressReporter progress( this, 0, m_Size );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\Thresholding\include\itkIntermodesThresholdCalculator.hxx (1 hit)
	Line 63:   ProgressReporter progress(this, 0, size );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\Thresholding\include\itkIsoDataThresholdCalculator.hxx (1 hit)
	Line 41:   ProgressReporter progress(this, 0, size );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\Thresholding\include\itkKittlerIllingworthThresholdCalculator.hxx (1 hit)
	Line 115:   ProgressReporter progress(this, 0, size );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\Thresholding\include\itkLiThresholdCalculator.hxx (1 hit)
	Line 40:   ProgressReporter progress(this, 0, histogram->GetSize(0) );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\Thresholding\include\itkMaximumEntropyThresholdCalculator.hxx (1 hit)
	Line 40:   ProgressReporter progress(this, 0, histogram->GetSize(0) );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\Thresholding\include\itkMomentsThresholdCalculator.hxx (1 hit)
	Line 40:   ProgressReporter progress(this, 0, histogram->GetSize(0) );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\Thresholding\include\itkRenyiEntropyThresholdCalculator.hxx (1 hit)
	Line 42:   ProgressReporter progress( this, 0, m_Size );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\Thresholding\include\itkShanbhagThresholdCalculator.hxx (1 hit)
	Line 40:   ProgressReporter progress(this, 0, histogram->GetSize(0) );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\Thresholding\include\itkThresholdImageFilter.hxx (1 hit)
	Line 124:   ProgressReporter progress( this, threadId, static_cast<SizeValueType>(  numberOfLinesToProcess ) );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\Thresholding\include\itkTriangleThresholdCalculator.hxx (1 hit)
	Line 41:   ProgressReporter progress(this, 0, histogram->GetSize(0) );
  C:\Libs\InsightToolkit-4.13.1\Modules\Filtering\Thresholding\include\itkYenThresholdCalculator.hxx (1 hit)
	Line 40:   ProgressReporter progress(this, 0, histogram->GetSize(0) );
  C:\Libs\InsightToolkit-4.13.1\Modules\IO\GDCM\src\itkGDCMSeriesFileNames.cxx (1 hit)
	Line 155:     ProgressReporter progress(this, 0,
  C:\Libs\InsightToolkit-4.13.1\Modules\IO\ImageBase\include\itkImageSeriesReader.hxx (1 hit)
	Line 300:   ProgressReporter progress(this, 0,
  C:\Libs\InsightToolkit-4.13.1\Modules\IO\ImageBase\include\itkImageSeriesWriter.hxx (1 hit)
	Line 274:   ProgressReporter progress(this, 0,
  C:\Libs\InsightToolkit-4.13.1\Modules\Nonunit\Review\include\itkAttributeMorphologyBaseImageFilter.hxx (1 hit)
	Line 101:   ProgressReporter progress(this, 0, buffsize * 4);  // pretend we have 4 steps
  C:\Libs\InsightToolkit-4.13.1\Modules\Nonunit\Review\include\itkContourExtractor2DImageFilter.hxx (1 hit)
	Line 73:   ProgressReporter progress( this, 0, shrunkRegion.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Nonunit\Review\include\itkDirectFourierReconstructionImageToImageFilter.hxx (1 hit)
	Line 270:   ProgressReporter progress( this, 0, outputImage->GetRequestedRegion().GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Nonunit\Review\include\itkStochasticFractalDimensionImageFilter.hxx (1 hit)
	Line 78:   ProgressReporter progress(this, 0, region.GetNumberOfPixels(), 100);
  C:\Libs\InsightToolkit-4.13.1\Modules\Numerics\Eigen\include\itkEigenAnalysis2DImageFilter.hxx (1 hit)
	Line 198:   ProgressReporter progress( this, 0, region.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Numerics\Statistics\include\itkHistogramToImageFilter.hxx (1 hit)
	Line 147:   ProgressReporter progress( this, 0,
  C:\Libs\InsightToolkit-4.13.1\Modules\Numerics\Statistics\include\itkImageToHistogramFilter.h (2 hits)
	Line 134:   virtual void ThreadedComputeMinimumAndMaximum( const RegionType & inputRegionForThread, ThreadIdType threadId, ProgressReporter & progress );
	Line 135:   virtual void ThreadedComputeHistogram( const RegionType & inputRegionForThread, ThreadIdType threadId, ProgressReporter & progress );
  C:\Libs\InsightToolkit-4.13.1\Modules\Numerics\Statistics\include\itkImageToHistogramFilter.hxx (3 hits)
	Line 137:   ProgressReporter progress( this, threadId, nbOfPixels );
	Line 264: ::ThreadedComputeMinimumAndMaximum(const RegionType & inputRegionForThread, ThreadIdType threadId, ProgressReporter & progress )
	Line 295: ::ThreadedComputeHistogram(const RegionType & inputRegionForThread, ThreadIdType threadId, ProgressReporter & progress )
  C:\Libs\InsightToolkit-4.13.1\Modules\Numerics\Statistics\include\itkMaskedImageToHistogramFilter.h (2 hits)
	Line 86:   virtual void ThreadedComputeMinimumAndMaximum( const RegionType & inputRegionForThread, ThreadIdType threadId, ProgressReporter & progress ) ITK_OVERRIDE;
	Line 87:   virtual void ThreadedComputeHistogram( const RegionType & inputRegionForThread, ThreadIdType threadId, ProgressReporter & progress ) ITK_OVERRIDE;
  C:\Libs\InsightToolkit-4.13.1\Modules\Numerics\Statistics\include\itkMaskedImageToHistogramFilter.hxx (2 hits)
	Line 40: ::ThreadedComputeMinimumAndMaximum( const RegionType & inputRegionForThread, ThreadIdType threadId, ProgressReporter & progress )
	Line 79: ::ThreadedComputeHistogram(const RegionType & inputRegionForThread, ThreadIdType threadId, ProgressReporter & progress )
  C:\Libs\InsightToolkit-4.13.1\Modules\Segmentation\ConnectedComponents\include\itkConnectedComponentFunctorImageFilter.hxx (1 hit)
	Line 109:   ProgressReporter progress( this, 0, 2 * output->GetRequestedRegion().GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Segmentation\ConnectedComponents\include\itkConnectedComponentImageFilter.h (1 hit)
	Line 249:                   ProgressReporter & progress);
  C:\Libs\InsightToolkit-4.13.1\Modules\Segmentation\ConnectedComponents\include\itkConnectedComponentImageFilter.hxx (1 hit)
	Line 133:   ProgressReporter    progress(this, threadId, linecountForThread * 2);
  C:\Libs\InsightToolkit-4.13.1\Modules\Segmentation\ConnectedComponents\include\itkHardConnectedComponentImageFilter.hxx (1 hit)
	Line 65:   ProgressReporter progress( this, 0, output->GetRequestedRegion().GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Segmentation\ConnectedComponents\include\itkRelabelComponentImageFilter.hxx (1 hit)
	Line 68:   ProgressReporter progress( this, 0,
  C:\Libs\InsightToolkit-4.13.1\Modules\Segmentation\LabelVoting\include\itkBinaryMedianImageFilter.hxx (1 hit)
	Line 115:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Segmentation\LabelVoting\include\itkLabelVotingImageFilter.hxx (1 hit)
	Line 99:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Segmentation\LabelVoting\include\itkVotingBinaryHoleFillingImageFilter.hxx (1 hit)
	Line 97:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Segmentation\LabelVoting\include\itkVotingBinaryImageFilter.hxx (1 hit)
	Line 115:   ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Segmentation\LabelVoting\include\itkVotingBinaryIterativeHoleFillingImageFilter.hxx (1 hit)
	Line 67:   ProgressReporter progress(this, 0, m_MaximumNumberOfIterations);
  C:\Libs\InsightToolkit-4.13.1\Modules\Segmentation\LevelSets\include\itkBinaryMaskToNarrowBandPointSetFilter.hxx (1 hit)
	Line 122:   ProgressReporter progress(this, 0, static_cast<SizeValueType>( numberOfPixels ));
  C:\Libs\InsightToolkit-4.13.1\Modules\Segmentation\RegionGrowing\include\itkConfidenceConnectedImageFilter.hxx (1 hit)
	Line 320:   ProgressReporter progress(this, 0, region.GetNumberOfPixels() * m_NumberOfIterations);
  C:\Libs\InsightToolkit-4.13.1\Modules\Segmentation\RegionGrowing\include\itkConnectedThresholdImageFilter.hxx (1 hit)
	Line 268:   ProgressReporter progress( this, 0, region.GetNumberOfPixels() );
  C:\Libs\InsightToolkit-4.13.1\Modules\Segmentation\RegionGrowing\include\itkIsolatedConnectedImageFilter.hxx (3 hits)
	Line 253:       ProgressReporter progress(this, 0, region.GetNumberOfPixels(), 100, cumulatedProgress, progressWeight);
	Line 320:       ProgressReporter progress(this, 0, region.GetNumberOfPixels(), 100, cumulatedProgress, progressWeight);
	Line 371:   ProgressReporter progress(this, 0, region.GetNumberOfPixels(), 100, cumulatedProgress, progressWeight);
  C:\Libs\InsightToolkit-4.13.1\Modules\Segmentation\RegionGrowing\include\itkNeighborhoodConnectedImageFilter.hxx (1 hit)
	Line 137:   ProgressReporter progress( this, 0,
  C:\Libs\InsightToolkit-4.13.1\Modules\Segmentation\RegionGrowing\include\itkVectorConfidenceConnectedImageFilter.hxx (1 hit)
	Line 268:   ProgressReporter progress(this, 0, region.GetNumberOfPixels() * m_NumberOfIterations);
  C:\Libs\InsightToolkit-4.13.1\Modules\Segmentation\Watersheds\include\itkIsolatedWatershedImageFilter.hxx (2 hits)
	Line 129:     ProgressReporter progress(this, 0, region.GetNumberOfPixels(), 100, cumulatedProgress, progressWeight);
	Line 157:   ProgressReporter progress(this, 0, region.GetNumberOfPixels(), 100, cumulatedProgress, progressWeight);
  C:\Libs\InsightToolkit-4.13.1\Modules\Segmentation\Watersheds\include\itkMorphologicalWatershedFromMarkersImageFilter.hxx (1 hit)
	Line 117:   ProgressReporter progress(this, 0, markerImage->GetRequestedRegion().GetNumberOfPixels() * 2);

It would probably take me a day or two of sustained effort to do this, including reintroducing per-pixel reporting in a few filters to serve as examples of how to do it. In calendar time though, I should finish this before the beginning of February.

I guess this thread served as a good reminder for this, and while thinking about it I realized it would not be that hard.

Thanks a lot, this sounds good. Ideally, progress would be reported at regular time intervals (about once per second) and not regular percentage completion.

1 Like

A couple items to thing about:

  • Consider just creating a new ProgressReporter class the old one is still in use with the old threading model.
  • Clearly if every thread is simultaneously updating the atomic progress, performance would suffer. Likely the progress reporter should update the atomic progress every so often, similar to when events occurred in the prior implementation.
  • One of the oddities of the previous implementation was even though each thread computed progress, only the “calling/main” thread’s progress was reported, the others were ignored. I’m not sure if the new design should consider all threads progress, but if it does, the progress math will need to be changed.
  • Computing progress on a per pixel basis was excessive, and some time a significant performance bottle neck for trivial filters. When converting filters to use the ScanlineIterator the progress was reported more sensible on a per scan line basis.

Just to clarify the requirement, the previous behavior was that all events were emit-ed by the thread originally executing the code not sub working threads. This needs to be clarified for cases when the user is executing multiple filters simultaneously, or when the ITK processing is already occurring in a “worker” thread.

An example of the later is the 3D Slicer filter “SimpleFilters” module where the execution occurs in a worker thread. Events received from ITK are placed on a queue for the main GUI thread to process.

This requirement is the trickle one, I’m curious what you plan for it.

3 Likes

That is a good idea and should not be hard, given that invoking the clock is not too slow:

Time to call steady_clock::now() 1 times : 1e-07 s
Time to call steady_clock::now() 100 times : 4.6e-06 s
Time to call steady_clock::now() 10000 times : 0.0004583 s
Time to call steady_clock::now() 1000000 times : 0.0448254 s
Time to call steady_clock::now() 100000000 times : 4.42698 s

Computed using:

#include <iostream>
#include <chrono>

std::chrono::steady_clock::time_point lastTime = std::chrono::steady_clock::now();

int
main()
{
  for (auto times = 1ull; times < 1000000000ull; times *= 100)
  {
    auto start = std::chrono::system_clock::now(); // record start time
    for (unsigned i = 0; i < times; i++)
    {
      lastTime = std::chrono::steady_clock::now();
    }
    auto end = std::chrono::system_clock::now(); // record end time

    std::chrono::duration<double> diff = end - start;
    std::cout << "Time to call steady_clock::now() " << times << " times : " << diff.count() << " s\n";
  }
}

I think that the ProgressReporter class can be updated in place, and kept being used with the old threading model.

I had the same thought.

I was planning to. Yes, math will need to be changed.

I plan to record the invoking thread’s ID, similar to here, so I will only report progress from that thread.

1 Like

I have a first stab at this in my fork. Master is currently at f24aacd. This compiles, but I haven’t tested it yet.

I plan to merge ExplicitProgressReporter into ProgressReporter via a different constructor. The existing constructor needs to be kept, because of allowing custom start point and progress weight. The new constructor would be made the default via overloading.

A pull request is ready for review now.

Here a second stab at adding the restoring the progress reporting:

@lassoan Is this a hard requirement? Will just getting the old progress reporting be good enough? In thinking about this further, it makes more since for the application to poll the progress of the filter/pipeline than try to shoe horn in some pseudo time event queue into multiple location of ITK. With the new updates all threads will be constituting to the progress, so the progress will change even when the invoking thread is doing another task. Hence the application polling recommendation.

This is not a hard requirement at all. As long as we can get updates frequently enough (about up to 1-2 updates per second), it is good.

I mentioned the time-based reporting because this is what end-users ultimately need. Getting status updates at fixed percentage increments may result in unnecessarily frequent updates and may slow things down (if we run some quick processing 30 times per second then we might get thousands of status updates per second); or, if the total processing time is long, users may not get updates frequently enough.

2 Likes

There are certainly multiple solutions to these problems. And many of them are dependent on how an application is interacting with ITK and the events.

An alternative solution here on the application side is to suppress action for events if they are occurring too fast. The question that rises from this alternative approach is: Is the “slow down” occurring because ITK is slow at generating the events or is the application slow at executing an event?

I think the most robust solution for an application is to run ITK processing in a background worker thread, and have the application poll the process/pipeline for progress. ( I can easily update the SimpleFilters Slicer module to do this. )

Does VTK have this concept of “timed progress events”?

The ideal way to truly get time progress event emitted from ITK is to have an additional thread monitoring the progress and waiting for the time out to occur. This is clearly a more complex solution and not required for many usage of ITK, only certain applications.

Alternative implantation, can easily suppress too many events, but to effectively emit event at the requested interval there would be too much additional cost associated with checking the time elapsed frequently for slow processes.

It would simplify the application if ITK provided just the right amount of status updates, but I agree that things can be addressed at application level, that’s why it is not a hard requirement.

I don’t think VTK progress updates are time-based, but since VTK processings are typically for visualization, they ususally complete in a fraction of a second, so we rarely need progress updates at all.

Hello,
what’s the status of this? I see that https://github.com/InsightSoftwareConsortium/ITK/pull/1575 was merged. If I update to ITK 5.1rc3 do I magically get better progress reporting, or do I need to tweak some code? Have the examples/documentation been updated?
Thanks for working on this!

Yes, if you just use ITK (and don’t create your own ITK filters) then progress reporting now should work much better, without changing anything in your code.

2 Likes

Hello Tobias,

Upgrading to ITK 5.1rc3 will improve the progress reporting for ITK filters without you having to do anything.

The use of the TotalProgressReporter still needs be documented with perhaps some examples.

The progress reporting does improve all cases, however with the default configuration is has the least progress reporting. The default ITK configuration is with the PoolMultiThreader, and NumberOfWorkUnits = NumberOfThreads*4. The updated progress reporting works wonderful with the TBB threader, the PlatformMultiThreader and the PoolMultiThreader (when NumberOfWorkUnits == NumberOfThreads). There are a complicated number of options and behaviors here, but the current implementation has good performance, a clean API, and usage of the TotalProgressReporter easier than the prior ProgressReporter.

The PoolMultiThreader has ( what was to me ) surprising behavior with how the main or invoking thread only participates for one work unit, then stalls. There is still some work to do here.

3 Likes

Hello @blowekamp,

Sadly, I am that user, the one who is doing everything non-standard.

I have my own filter that overrides both GenerateData and DynamicThreadedGenerateData. Code is here: https://github.com/spinicist/QUIT/blob/mupa-mt/Source/Core/ModelFitFilter.h#L433 with the TotalProgressReporter on line 510 below.

I have tried as best I can to shoe-horn in the new progress reporting by looking at how you did it for other filters, but it’s not working yet. My current attempt prints:

Allocating output image memory
21:13:25 Processing...
21:13:25 Progress: 1% complete
21:13:25 Progress: 2% complete
21:13:25 Progress: 3% complete
21:13:25 Progress: 4% complete
21:13:25 Progress: 5% complete
21:13:25 Progress: 6% complete
21:13:25 Progress: 7% complete
21:13:25 Progress: 8% complete
21:13:25 Progress: 9% complete
21:13:25 Progress: 10% complete
21:13:25 Progress: 11% complete
21:13:25 Progress: 12% complete
21:13:25 Progress: 13% complete
21:13:25 Progress: 16% complete
21:13:25 Progress: 16% complete
21:13:34 Finished processing.

As far as I can tell, one thread is reporting the progress correctly, and the others are not reporting any progress. This particular problem is very unbalanced - that one thread is “processing” masked voxels and hence has nothing to do, so gets to 16% and finishes very quickly, while the others take a long time to finish and don’t report anything. Can you give me a couple of pointers?

I have also noticed the odd behaviour with PoolMultiThreader. Is this the place to discuss that or should we move that to another thread? I have resorted to calling my programs with (Number of Cores + 1) threads set as the maximum, otherwise I only utilise (Number of Cores - 1). That’s not ideal.

What is the output if you set the env variable ITK_GLOBAL_DEFAULT_THREADER=platform?

You could set number of work units to be equal to number of cores in your filter’s constructor, build ITK with TBB, or explicitly request platform multi threader (also in the filter’s constructor).

We could also fix pool multi-threader. One possibility is to create and expose ExecuteOneWorkUnit as a public method, which would be normally used by ThreadPool::ThreadExecute's loop. And when needed, also by PoolMultiThreader::SingleMethodExecute.

Hmmmm. This is a bit strange.

I have 6 real cores in my CPU (no hyper-threading).

ITK_GLOBAL_DEFAULT_THREADER=platform gives similar output before, but gets to Progress: 38% complete, for both 6 & 7 threads.

ITK_GLOBAL_DEFAULT_THREADER=pool gets to Progress: 38% complete, for both 6 threads, but only Progress: 16% complete for 7 threads.

I hope that’s clear, even if it makes little sense to me!?

Thanks for your help.