Skip to content
Snippets Groups Projects
Commit 5a686bb9 authored by Antoine Regimbeau's avatar Antoine Regimbeau
Browse files

ENH: add possibility to get a complex from a scalar with a imaginary part equal to 0

parent f7b6779e
No related branches found
No related tags found
1 merge request!12Complex image integration
......@@ -59,7 +59,7 @@ public:
m_Scal = m_CompIn;
if ( m_cOutPix || m_cOutInternalPix )
{
m_CompOut = sizeIn / 2 ; // ( sizeIn + 1 )/ 2
m_CompOut = ( sizeIn + 1 ) / 2 ; // ( sizeIn + 1 )/ 2
return m_CompOut ;
}
else
......@@ -105,6 +105,8 @@ public:
std::vector < double > vPixel;
for ( unsigned int i = 0 ; i < m_CompIn ; i ++)
FillIn < InputPixelType > ( i , in , vPixel );
if ( ( m_cOutPix || m_cOutInternalPix ) && vPixel.size()%2 )
vPixel.push_back(0); // last component has no imaginary part
Clamp( vPixel );
OutputPixelType out;
int hack = 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment