Commit 4727bb9b authored by OTB Bot's avatar OTB Bot

STYLE

parent d8f4e6ba
......@@ -135,7 +135,6 @@ public:
std::vector<std::string> GetVarNames() const;
protected :
BandMathImageFilterX();
virtual ~BandMathImageFilterX();
......@@ -150,7 +149,7 @@ protected :
private :
bool globalStatsDetected() const
bool globalStatsDetected() const
{
return (m_StatsVarDetected.size()>0);
}
......
......@@ -154,7 +154,7 @@ void BandMathImageFilterX<TImage>
//Mandatory before call of GetNumberOfComponentsPerPixel
//Really important not to call the filter's UpdateOutputInformation method here:
//this method is not ready until all inputs, variables and expressions are set.
imagebis->UpdateOutputInformation();
imagebis->UpdateOutputInformation();
//imibj
for (int j=0; j<imagebis->GetNumberOfComponentsPerPixel(); j++)
......@@ -245,7 +245,6 @@ void BandMathImageFilterX<TImage>
}
template< typename TImage >
void BandMathImageFilterX<TImage>
::SetMatrix(const std::string& name, const std::string& definition)
......@@ -358,7 +357,7 @@ void BandMathImageFilterX<TImage>
iss << " " << m_VAllowedVarNameAddedByUser[i].value.At(k,0);
for(int p=1; p<m_VAllowedVarNameAddedByUser[i].value.GetCols(); p++)
iss << " , " << m_VAllowedVarNameAddedByUser[i].value.At(k,p);
iss << " ;";
iss << ";";
}
str=iss.str();
str.erase(str.size()-1);
......@@ -549,7 +548,7 @@ void BandMathImageFilterX<TImage>
m_VFinalAllowedVarName.clear();
// m_VFinalAllowedVarName = m_VAllowedVarNameAuto + m_VAllowedVarNameAddedByUser
// m_VFinalAllowedVarName = variable names dictionary
// m_VFinalAllowedVarName = variable names dictionary
for(int i=0; i<m_VAllowedVarNameAddedByUser.size(); i++)
m_VFinalAllowedVarName.push_back(m_VAllowedVarNameAddedByUser[i]);
for(int i=0; i<m_VAllowedVarNameAuto.size(); i++)
......@@ -608,7 +607,7 @@ void BandMathImageFilterX<TImage>
// Important to remember that variables of m_VVarName come from a call of GetExprVar method
// Only useful variables are allocated in this filter
int nbVar = m_VVarName.size();
int nbVar = m_VVarName.size();
m_StatsVarDetected.clear();
......@@ -675,14 +674,14 @@ void BandMathImageFilterX<TImage>
if (m_AImage[i][j].type == 8 ) // global stats
{
m_AImage[i][j].value = ValueType(initValue);
//m_AImage[i][j].info[0] = Image ID : useful to know which images must have their regions set to largest possible region (see GenerateInputRequestedRegion)
m_AImage[i][j].value = ValueType(initValue);
//m_AImage[i][j].info[0] = Image ID : useful to know which images must have their regions set to largest possible region (see GenerateInputRequestedRegion)
bool found = false;
for (int r=0; r<m_StatsVarDetected.size() && !found; r++)
for (int r=0; r<m_StatsVarDetected.size() && !found; r++)
if (m_StatsVarDetected[r] == m_AImage[i][j].info[0])
found = true;
if (!found)
m_StatsVarDetected.push_back(m_AImage[i][j].info[0]);
if (!found)
m_StatsVarDetected.push_back(m_AImage[i][j].info[0]);
}
......@@ -690,7 +689,6 @@ void BandMathImageFilterX<TImage>
m_VParser.at(i)->DefineVar(m_AImage[i][j].name, &(m_AImage[i][j].value));
initValue += 0.001;
if (initValue>1.0)
initValue=0.1;
......@@ -787,14 +785,13 @@ void BandMathImageFilterX< TImage >
ImagePointer inputPtr = const_cast<TImage *>(this->GetInput(m_StatsVarDetected[i]));
inputPtr->SetRequestedRegionToLargestPossibleRegion();
}
else
itkExceptionMacro(<< "Requested input #" << m_StatsVarDetected[i] << ", but only " << this->GetNumberOfInputs() << " inputs are available." << std::endl);
else
itkExceptionMacro(<< "Requested input #" << m_StatsVarDetected[i] << ", but only " << this->GetNumberOfInputs() << " inputs are available." << std::endl);
}
}
template< typename TImage >
void BandMathImageFilterX<TImage>
::BeforeThreadedGenerateData()
......@@ -828,7 +825,6 @@ void BandMathImageFilterX<TImage>
}
// Allocate and initialize the thread temporaries
m_ThreadUnderflow.SetSize(nbThreads);
m_ThreadUnderflow.Fill(0);
......
......@@ -533,7 +533,6 @@ void vmax::Eval(mup::ptr_val_type &ret, const mup::ptr_val_type *a_pArg, int a_i
}
//--------------------------------------------------------------------------------------------------------//
void vcos::Eval(mup::ptr_val_type &ret, const mup::ptr_val_type *a_pArg, int a_iArgc)
{
......
......@@ -418,7 +418,7 @@ int otbBandMathImageFilterXTxt( int itkNotUsed(argc), char* argv [])
FilterType::Pointer filter = FilterType::New();
filter->ImportContext(inputFilename);
filter->ImportContext(inputFilename);
filter->ExportContext(outputFilename);
return EXIT_SUCCESS;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment