Skip to content

Commit

Permalink
STYLE: Remove dynamic_casts PosteriorImage BayesianClassifierImageFilter
Browse files Browse the repository at this point in the history
Removed the three "no-op" dynamic_casts of `this->GetPosteriorImage()`
from the implementation of `BayesianClassifierImageFilter`.

Follow-up to:
pull request InsightSoftwareConsortium#2365
commit 5089a04
"STYLE: Remove 9 no-op dynamic_casts (casting T* to T*)"
  • Loading branch information
N-Dekker authored and dzenanz committed Mar 18, 2021
1 parent c7586a1 commit faf3d3b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ BayesianClassifierImageFilter<TInputVectorImage, TLabelsType, TPosteriorsPrecisi
itkExceptionMacro("Second input type does not correspond to expected Priors Image Type");
}

auto * posteriorsImage = dynamic_cast<PosteriorsImageType *>(this->GetPosteriorImage());
PosteriorsImageType * posteriorsImage = this->GetPosteriorImage();

if (posteriorsImage == nullptr)
{
Expand Down Expand Up @@ -187,7 +187,7 @@ BayesianClassifierImageFilter<TInputVectorImage, TLabelsType, TPosteriorsPrecisi
}
else
{
auto * posteriorsImage = dynamic_cast<PosteriorsImageType *>(this->GetPosteriorImage());
PosteriorsImageType * posteriorsImage = this->GetPosteriorImage();

if (posteriorsImage == nullptr)
{
Expand Down Expand Up @@ -329,7 +329,7 @@ BayesianClassifierImageFilter<TInputVectorImage, TLabelsType, TPosteriorsPrecisi

ImageRegionType imageRegion = labels->GetBufferedRegion();

auto * posteriorsImage = dynamic_cast<PosteriorsImageType *>(this->GetPosteriorImage());
PosteriorsImageType * posteriorsImage = this->GetPosteriorImage();

if (posteriorsImage == nullptr)
{
Expand Down

0 comments on commit faf3d3b

Please sign in to comment.