@@ -42,22 +42,24 @@ template< typename TInputImage >
4242void DistortionCorrectionImageFilter < TInputImage >
4343::GenerateData ()
4444{
45- // Call a method that can be overridden by a subclass to allocate
46- // memory for the filter's outputs
47- this ->AllocateOutputs ();
48-
49- // Call a method that can be overridden by a subclass to perform
50- // some calculations prior to splitting the main computations into
51- // separate threads
52- this ->BeforeThreadedGenerateData ();
53-
54- using RegionType = itk::ImageRegion <TInputImage::ImageDimension>;
55- typename OutputImageType::Pointer outputImage (this ->GetOutput ());
56- const RegionType region = outputImage->GetRequestedRegion ();
57-
58- this ->GetMultiThreader ()->SetNumberOfWorkUnits (this ->GetNumberOfWorkUnits ());
59- this ->GetMultiThreader ()->template ParallelizeImageRegionRestrictDirection <OutputImageType::ImageDimension>(
60- this ->m_Direction , region, [this ](const RegionType & lambdaRegion) { this ->DynamicThreadedGenerateData (lambdaRegion); }, this );
45+ // Call a method that can be overridden by a subclass to allocate
46+ // memory for the filter's outputs
47+ this ->AllocateOutputs ();
48+
49+ // Call a method that can be overridden by a subclass to perform
50+ // some calculations prior to splitting the main computations into
51+ // separate threads
52+ this ->BeforeThreadedGenerateData ();
53+
54+ using RegionType = itk::ImageRegion <TInputImage::ImageDimension>;
55+ typename OutputImageType::Pointer outputImage (this ->GetOutput ());
56+ const RegionType region = outputImage->GetRequestedRegion ();
57+
58+ this ->GetMultiThreader ()->SetNumberOfWorkUnits (this ->GetNumberOfWorkUnits ());
59+ this ->GetMultiThreader ()->template ParallelizeImageRegionRestrictDirection <OutputImageType::ImageDimension>(
60+ this ->m_Direction , region, [this ](const RegionType & lambdaRegion) { this ->DynamicThreadedGenerateData (lambdaRegion); }, this );
61+
62+ this ->AfterThreadedGenerateData ();
6163}
6264
6365template < typename TInputImage >
0 commit comments