Skip to content

Commit

Permalink
COMP: Resolved compiler warnings for itktubeRadiusExtractor3.
Browse files Browse the repository at this point in the history
1. An unused variable declaration was removed.
2. A variable 'p' was renaimed to 'point' to prevent it from
	shadowing another variable.

This resolves the c=following compiler warnings:
1.
/localscratch/Users/kjweimer/ITK/Modules/Remote/TubeTK/src/Segmentation/itktubeRadiusExtractor3.hxx:90:12: warning: unused variable ‘v’ [-Wunused-variable]
   90 |     double v = this->GetValue(p);
      |            ^

2.
/localscratch/Users/kjweimer/ITK/Modules/Remote/TubeTK/src/Segmentation/itktubeRadiusExtractor3.hxx:395:19: warning: declaration of ‘p’ shadows a previous local [-Wshadow]
  395 |         PointType p;
      |                   ^
/localscratch/Users/kjweimer/ITK/Modules/Remote/TubeTK/src/Segmentation/itktubeRadiusExtractor3.hxx:349:13: note: shadowed declaration is here
  349 |   PointType p = pntIter->GetPositionInObjectSpace();
      |             ^
  • Loading branch information
kian-weimer committed Feb 25, 2022
1 parent 8c5d55f commit 68b126a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/Segmentation/itktubeRadiusExtractor3.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ public:
d[1] = 0;
d[2] = 0;
d[3] = 0;
double v = this->GetValue(p);
for( unsigned int i=0; i<m_Data->size(); ++i )
{
double expV = exp(-p[2]*(i-p[3]));
Expand Down Expand Up @@ -402,8 +401,8 @@ RadiusExtractor3<TInputImage>
/ ( m_DataMax - m_DataMin );
if( val >= 0 && val < 1 )
{
PointType p;
m_InputImage->TransformIndexToPhysicalPoint( xIndex, p );
PointType point;
m_InputImage->TransformIndexToPhysicalPoint( xIndex, point );

unsigned int pntCount = 0;
pntIter = m_KernelTube->GetPoints().begin();
Expand All @@ -415,7 +414,7 @@ RadiusExtractor3<TInputImage>
minTangentPnt = m_KernelTube->GetPoints().end();
while( pntIter != m_KernelTube->GetPoints().end() )
{
VectorType pDiff = p - pntIter->GetPositionInObjectSpace();
VectorType pDiff = point - pntIter->GetPositionInObjectSpace();
double d1 = 0;
for( unsigned int i = 0; i < ImageDimension; ++i )
{
Expand All @@ -434,7 +433,7 @@ RadiusExtractor3<TInputImage>
if( minTangentPnt != m_KernelTube->GetPoints().end())
{
double d1 = 0;
VectorType pDiff = p - minTangentPnt->GetPositionInObjectSpace();
VectorType pDiff = point - minTangentPnt->GetPositionInObjectSpace();
for( unsigned int i = 0; i < ImageDimension; ++i )
{
double tf = pDiff[i] * minTangentPnt->GetNormal1InObjectSpace()[i];
Expand Down

0 comments on commit 68b126a

Please sign in to comment.