Skip to content

Commit

Permalink
Merge pull request ANTsX#1542 from ANTsX/CompilationX
Browse files Browse the repository at this point in the history
COMP:  Address some compilation warnings.
ntustison authored May 23, 2023
2 parents f25d8ea + e4d5507 commit 8cc4f8a
Showing 3 changed files with 17 additions and 21 deletions.
34 changes: 17 additions & 17 deletions Tensor/TensorFunctions.h
Original file line number Diff line number Diff line change
@@ -705,23 +705,23 @@ GetTensorPrincipalEigenvector(TTensorType dtv)

itk::RGBPixel<float> rgb;

float xx = dtv[0];
float xy = dtv[1];
float xz = dtv[2];
float yy = dtv[3];
float yz = dtv[4];
float zz = dtv[5];
float isp = (xx * xx + yy * yy + zz * zz + 2.0f * (xy * xy + xz * xz + yz * yz));

float fa = 0.0;
if (isp > 0.0f)
{
float trace = dtv[0];
trace += dtv[3];
trace += dtv[5];
float anisotropy = 3.0f * isp - trace * trace;
fa = (std::sqrt(anisotropy / (2.0f * isp)));
}
// float xx = dtv[0];
// float xy = dtv[1];
// float xz = dtv[2];
// float yy = dtv[3];
// float yz = dtv[4];
// float zz = dtv[5];
// float isp = (xx * xx + yy * yy + zz * zz + 2.0f * (xy * xy + xz * xz + yz * yz));

// float fa = 0.0;
// if (isp > 0.0f)
// {
// float trace = dtv[0];
// trace += dtv[3];
// trace += dtv[5];
// float anisotropy = 3.0f * isp - trace * trace;
// fa = (std::sqrt(anisotropy / (2.0f * isp)));
// }

// rgb[0]=eig.V(2,0)*fa*255;//+eig.V(1,0)*e2;
// rgb[1]=eig.V(2,1)*fa*255;//+eig.V(1,1)*e2;
2 changes: 0 additions & 2 deletions Utilities/ReadWriteData.h
Original file line number Diff line number Diff line change
@@ -661,10 +661,8 @@ ReadWarpFromFile(std::string warpfn, std::string ext)
// std::cout << " spacing xv " << xvec->GetSpacing()[0]
// << " field " << field->GetSpacing()[0] << std::endl;

unsigned int ct = 0;
for (it.GoToBegin(); !it.IsAtEnd(); ++it)
{
ct++;
typename ImageType::IndexType index = it.GetIndex();

VectorType disp;
2 changes: 0 additions & 2 deletions Utilities/itkDiReCTImageFilter.hxx
Original file line number Diff line number Diff line change
@@ -712,7 +712,6 @@ DiReCTImageFilter<TInputImage, TOutputImage>::MakeThicknessImage(RealImagePointe
ItSmoothTotalImage.GoToBegin();

RealType meanThickness = 0;
unsigned long count = 0;
while (!ItSegmentationImage.IsAtEnd())
{
const typename InputImageType::PixelType grayMatterPixel =
@@ -724,7 +723,6 @@ DiReCTImageFilter<TInputImage, TOutputImage>::MakeThicknessImage(RealImagePointe
{
thicknessValue = ItSmoothTotalImage.Get() / ItSmoothHitImage.Get();
meanThickness += thicknessValue;
count++;
if (thicknessValue < NumericTraits<RealType>::ZeroValue())
{
thicknessValue = NumericTraits<RealType>::ZeroValue();

0 comments on commit 8cc4f8a

Please sign in to comment.