Skip to content

Commit d10ec39

Browse files
committed
Move rician to gaussian to itk 5
1 parent 94168dc commit d10ec39

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

Anima/filtering/rician_to_gaussian_noise/animaRicianToGaussianImageFilter.hxx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ RicianToGaussianImageFilter<ComponentType,ImageDimension>
5555
template <class ComponentType,unsigned int ImageDimension>
5656
void
5757
RicianToGaussianImageFilter<ComponentType,ImageDimension>
58-
::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
59-
itk::ThreadIdType threadId)
58+
::DynamicThreadedGenerateData(const OutputImageRegionType& outputRegionForThread)
6059
{
6160
typedef itk::ConstNeighborhoodIterator<InputImageType> InputIteratorType;
6261
typedef itk::ConstNeighborhoodIterator<MaskImageType> MaskIteratorType;
@@ -83,6 +82,8 @@ RicianToGaussianImageFilter<ComponentType,ImageDimension>
8382
typename InputImageType::IndexType currentIndex, neighborIndex;
8483
typename InputImageType::PointType currentPoint, neighborPoint;
8584

85+
unsigned int threadId = this->GetSafeThreadId();
86+
8687
while (!maskItr.IsAtEnd())
8788
{
8889
// Discard voxels outside of the brain
@@ -222,6 +223,8 @@ RicianToGaussianImageFilter<ComponentType,ImageDimension>
222223
++scaleItr;
223224
++signalItr;
224225
}
226+
227+
this->SafeReleaseThreadId(threadId);
225228
}
226229

227230
template <class ComponentType,unsigned int ImageDimension>

0 commit comments

Comments
 (0)