Skip to content
Snippets Groups Projects
Commit 92b9025c authored by Thomas Feuvrier's avatar Thomas Feuvrier
Browse files

Correction : ajout static_cast<double>() pour l'apel aux fonction vcl_atan2 et...

Correction : ajout static_cast<double>() pour l'apel aux fonction vcl_atan2 et vcl_sqrt car erreurs de compilation sous Visual 7.1
parent 9221237d
Branches
Tags
No related merge requests found
......@@ -119,7 +119,7 @@ namespace otb
PixelType pixel = it.Get();
for(unsigned int i = 0;i<m_InputImage->GetNumberOfComponentsPerPixel();++i)
{
sl->GetNthElement(0)->PushBack(vcl_sqrt(pixel[m_RedChannelIndex]*pixel[m_RedChannelIndex]+pixel[m_GreenChannelIndex]*pixel[m_GreenChannelIndex]));
sl->GetNthElement(0)->PushBack(vcl_sqrt(static_cast<double>(pixel[m_RedChannelIndex]*pixel[m_RedChannelIndex]+pixel[m_GreenChannelIndex]*pixel[m_GreenChannelIndex])));
}
++it;
}
......@@ -132,7 +132,7 @@ namespace otb
PixelType pixel = it.Get();
for(unsigned int i = 0;i<m_InputImage->GetNumberOfComponentsPerPixel();++i)
{
sl->GetNthElement(0)->PushBack(vcl_atan2(pixel[m_RedChannelIndex],pixel[m_GreenChannelIndex]));
sl->GetNthElement(0)->PushBack(vcl_atan2(static_cast<double>(pixel[m_RedChannelIndex]),static_cast<double>(pixel[m_GreenChannelIndex])));
}
++it;
}
......
......@@ -398,8 +398,8 @@ ImageWidgetBase<TPixel>
}
case COMPLEX_MODULUS:
{
unsigned char modulus = Normalize(static_cast<PixelType>(vcl_sqrt(it.Get()[m_RedChannelIndex]*it.Get()[m_RedChannelIndex]
+it.Get()[m_GreenChannelIndex]*it.Get()[m_GreenChannelIndex])),0);
unsigned char modulus = Normalize(static_cast<PixelType>(vcl_sqrt(static_cast<double>(it.Get()[m_RedChannelIndex]*it.Get()[m_RedChannelIndex]
+it.Get()[m_GreenChannelIndex]*it.Get()[m_GreenChannelIndex]))),0);
m_OpenGlBuffer[index] = modulus;
m_OpenGlBuffer[index+1] = modulus;
m_OpenGlBuffer[index+2] = modulus;
......@@ -409,7 +409,7 @@ ImageWidgetBase<TPixel>
}
case COMPLEX_PHASE:
{
unsigned char phase = Normalize(static_cast<PixelType>(vcl_atan2(it.Get()[m_RedChannelIndex],it.Get()[m_GreenChannelIndex])),0);
unsigned char phase = Normalize(static_cast<PixelType>(vcl_atan2(static_cast<double>(it.Get()[m_RedChannelIndex]),static_cast<double>(it.Get()[m_GreenChannelIndex]))),0);
m_OpenGlBuffer[index] = phase;
m_OpenGlBuffer[index+1] = phase;
m_OpenGlBuffer[index+2] = phase;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment