Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COMP: Address some compilation warnings. #1542

Merged
merged 1 commit into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions Tensor/TensorFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions Utilities/ReadWriteData.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions Utilities/itkDiReCTImageFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -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();
Expand Down