Commit 0c897a90 authored by Manuel Grizonnet's avatar Manuel Grizonnet

BUG: error in parameters reading in Dimension reduction examples

parent 78a08d7a
/*=========================================================================
Program: ORFEO Toolbox
......@@ -63,8 +64,8 @@ int main(int argc, char* argv[])
const char * inpretty = argv[4];
const char * outpretty = argv[5];
const char * invoutpretty = argv[6];
unsigned int numIterations = atoi(argv[7]);
double mu = atof(argv[8]);
unsigned int numIterations = atoi(argv[8]);
double mu = atof(argv[9]);
// Software Guide : BeginLatex
//
......@@ -105,7 +106,7 @@ int main(int argc, char* argv[])
otb::Transform::FORWARD> FastICAFilterType;
FastICAFilterType::Pointer FastICAfilter = FastICAFilterType::New();
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
//
// We then set the number of independent
......@@ -138,7 +139,7 @@ int main(int argc, char* argv[])
// Software Guide : BeginCodeSnippet
FastICAfilter->SetMu( mu );
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
//
// We now instantiate the writer and set the file name for the
......@@ -172,26 +173,26 @@ int main(int argc, char* argv[])
// (which may not be square) has to be given.
//
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
typedef otb::FastICAImageFilter< ImageType, ImageType,
otb::Transform::INVERSE > InvFastICAFilterType;
InvFastICAFilterType::Pointer invFilter = InvFastICAFilterType::New();
invFilter->SetMeanValues( FastICAfilter->GetMeanValues() );
invFilter->SetStdDevValues( FastICAfilter->GetStdDevValues() );
invFilter->SetTransformationMatrix( FastICAfilter->GetTransformationMatrix() );
invFilter->SetPCATransformationMatrix(
FastICAfilter->GetPCATransformationMatrix() );
invFilter->SetInput(FastICAfilter->GetOutput());
WriterType::Pointer invWriter = WriterType::New();
invWriter->SetFileName(outputInverseFilename );
invWriter->SetInput(invFilter->GetOutput() );
invWriter->Update();
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
// Figure~\ref{fig:FastICA_FILTER} shows the result of applying forward
// and reverse FastICA transformation to a 8 bands Worldview2 image.
......
......@@ -76,8 +76,8 @@ int main(int argc, char* argv[])
const char * inpretty = argv[4];
const char * outpretty = argv[5];
const char * invoutpretty = argv[6];
unsigned int vradius = atoi(argv[7]);
bool normalization = atoi(argv[8]);
unsigned int vradius = atoi(argv[8]);
bool normalization = atoi(argv[9]);
// Software Guide : BeginLatex
//
......@@ -141,7 +141,7 @@ int main(int argc, char* argv[])
otb::Transform::FORWARD> MNFFilterType;
MNFFilterType::Pointer MNFfilter = MNFFilterType::New();
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
//
// We then set the number of principal
......@@ -175,7 +175,7 @@ int main(int argc, char* argv[])
// Software Guide : BeginCodeSnippet
MNFfilter->SetUseNormalization( normalization );
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
//
// We now instantiate the writer and set the file name for the
......@@ -209,26 +209,26 @@ int main(int argc, char* argv[])
// (which may not be square) has to be given.
//
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
typedef otb::MNFImageFilter< ImageType, ImageType,
NoiseFilterType,
otb::Transform::INVERSE > InvMNFFilterType;
InvMNFFilterType::Pointer invFilter = InvMNFFilterType::New();
invFilter->SetMeanValues( MNFfilter->GetMeanValues() );
if ( normalization )
invFilter->SetStdDevValues( MNFfilter->GetStdDevValues() );
invFilter->SetTransformationMatrix( MNFfilter->GetTransformationMatrix() );
invFilter->SetInput(MNFfilter->GetOutput());
WriterType::Pointer invWriter = WriterType::New();
invWriter->SetFileName(outputInverseFilename );
invWriter->SetInput(invFilter->GetOutput() );
invWriter->Update();
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
// Figure~\ref{fig:MNF_FILTER} shows the result of applying forward
// and reverse MNF transformation to a 8 bands Worldview2 image.
......
......@@ -77,8 +77,8 @@ int main(int argc, char* argv[])
const char * inpretty = argv[4];
const char * outpretty = argv[5];
const char * invoutpretty = argv[6];
unsigned int vradius = atoi(argv[7]);
bool normalization = atoi(argv[8]);
unsigned int vradius = atoi(argv[8]);
bool normalization = atoi(argv[9]);
// Software Guide : BeginLatex
//
......@@ -143,7 +143,7 @@ int main(int argc, char* argv[])
otb::Transform::FORWARD> NAPCAFilterType;
NAPCAFilterType::Pointer napcafilter = NAPCAFilterType::New();
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
//
// We then set the number of principal
......@@ -177,7 +177,7 @@ int main(int argc, char* argv[])
// Software Guide : BeginCodeSnippet
napcafilter->SetUseNormalization( normalization );
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
//
// We now instantiate the writer and set the file name for the
......@@ -211,26 +211,26 @@ int main(int argc, char* argv[])
// (which may not be square) has to be given.
//
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
typedef otb::NAPCAImageFilter< ImageType, ImageType,
NoiseFilterType,
otb::Transform::INVERSE > InvNAPCAFilterType;
InvNAPCAFilterType::Pointer invFilter = InvNAPCAFilterType::New();
invFilter->SetMeanValues( napcafilter->GetMeanValues() );
if ( normalization )
invFilter->SetStdDevValues( napcafilter->GetStdDevValues() );
invFilter->SetTransformationMatrix( napcafilter->GetTransformationMatrix() );
invFilter->SetInput(napcafilter->GetOutput());
WriterType::Pointer invWriter = WriterType::New();
invWriter->SetFileName(outputInverseFilename );
invWriter->SetInput(invFilter->GetOutput() );
invWriter->Update();
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
// Figure~\ref{fig:NAPCA_FILTER} shows the result of applying forward
// and reverse NA-PCA transformation to a 8 bands Worldview2 image.
......
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