Commit 98b47751 authored by Emmanuel Christophe's avatar Emmanuel Christophe

DOC: fix typo

parent 00a73f97
...@@ -56,16 +56,12 @@ int main( int argc, char* argv[] ) ...@@ -56,16 +56,12 @@ int main( int argc, char* argv[] )
{ {
std::cout << argv[0] <<" <input_filename> <output_filename>" std::cout << argv[0] <<" <input_filename> <output_filename>"
<< " <upper_left_corner_longitude> <upper_left_corner_latitude>" << " <upper_left_corner_longitude> <upper_left_corner_latitude>"
<< " <size_x> <sizee_y> <number_of_stream_divisions>" << " <size_x> <size_y> <number_of_stream_divisions>"
<< std::endl; << std::endl;
return EXIT_FAILURE; return EXIT_FAILURE;
} }
// Software Guide : BeginLatex // Software Guide : BeginLatex
// //
// As explained before, the first thing to do is to create the sensor // As explained before, the first thing to do is to create the sensor
...@@ -79,12 +75,13 @@ int main( int argc, char* argv[] ) ...@@ -79,12 +75,13 @@ int main( int argc, char* argv[] )
// Software Guide : BeginCodeSnippet // Software Guide : BeginCodeSnippet
typedef otb::Image<unsigned int, 2> ImageType; typedef otb::Image<unsigned int, 2> ImageType;
typedef otb::ImageFileReader<ImageType> ReaderType; typedef otb::ImageFileReader<ImageType> ReaderType;
ReaderType::Pointer reader=ReaderType::New();
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName(argv[1]); reader->SetFileName(argv[1]);
ImageType::Pointer inputImage= reader->GetOutput(); ImageType::Pointer inputImage = reader->GetOutput();
// Software Guide : EndCodeSnippet // Software Guide : EndCodeSnippet
...@@ -105,7 +102,7 @@ int main( int argc, char* argv[] ) ...@@ -105,7 +102,7 @@ int main( int argc, char* argv[] )
reader->GenerateOutputInformation(); reader->GenerateOutputInformation();
std::cout << "Original input imagine spacing: "<< std::cout << "Original input imagine spacing: "<<
reader->GetOutput()->GetSpacing() << std::endl;; reader->GetOutput()->GetSpacing() << std::endl;
// Software Guide : EndCodeSnippet // Software Guide : EndCodeSnippet
...@@ -150,7 +147,6 @@ int main( int argc, char* argv[] ) ...@@ -150,7 +147,6 @@ int main( int argc, char* argv[] )
// Software Guide : BeginCodeSnippet // Software Guide : BeginCodeSnippet
if (!model) if (!model)
{ {
std::cerr << "Unable to create a model" << std::endl; std::cerr << "Unable to create a model" << std::endl;
...@@ -169,18 +165,14 @@ int main( int argc, char* argv[] ) ...@@ -169,18 +165,14 @@ int main( int argc, char* argv[] )
// Software Guide : BeginCodeSnippet // Software Guide : BeginCodeSnippet
ModelType::OutputPointType inputPoint; ModelType::OutputPointType inputPoint;
typedef itk::Point <double, 2> PointType; typedef itk::Point <double, 2> PointType;
PointType outputPoint; PointType outputPoint;
ImageType::IndexType currentIndex; ImageType::IndexType currentIndex;
ImageType::IndexType currentIndexBis; ImageType::IndexType currentIndexBis;
ImageType::IndexType pixelIndexBis; ImageType::IndexType pixelIndexBis;
// Software Guide : EndCodeSnippet // Software Guide : EndCodeSnippet
// Software Guide : BeginLatex // Software Guide : BeginLatex
...@@ -194,7 +186,7 @@ int main( int argc, char* argv[] ) ...@@ -194,7 +186,7 @@ int main( int argc, char* argv[] )
// Software Guide : BeginCodeSnippet // Software Guide : BeginCodeSnippet
ImageType::Pointer outputImage = ImageType::New(); ImageType::Pointer outputImage = ImageType::New();
ImageType::PixelType pixelValue; ImageType::PixelType pixelValue;
...@@ -279,9 +271,9 @@ int main( int argc, char* argv[] ) ...@@ -279,9 +271,9 @@ int main( int argc, char* argv[] )
// Software Guide : EndLatex // Software Guide : EndLatex
// Software Guide : BeginCodeSnippet // Software Guide : BeginCodeSnippet
typedef otb::Image<unsigned char, 2> CharImageType; typedef otb::Image<unsigned char, 2> CharImageType;
typedef otb::ImageFileWriter<CharImageType> CharWriterType; typedef otb::ImageFileWriter<CharImageType> CharWriterType;
typedef otb::ImageFileWriter<ImageType> WriterType; typedef otb::ImageFileWriter<ImageType> WriterType;
WriterType::Pointer extractorWriter=WriterType::New(); WriterType::Pointer extractorWriter=WriterType::New();
CharWriterType::Pointer writer=CharWriterType::New(); CharWriterType::Pointer writer=CharWriterType::New();
extractorWriter->SetFileName("image_temp.jpeg"); extractorWriter->SetFileName("image_temp.jpeg");
...@@ -297,8 +289,8 @@ int main( int argc, char* argv[] ) ...@@ -297,8 +289,8 @@ int main( int argc, char* argv[] )
// Software Guide : EndLatex // Software Guide : EndLatex
// Software Guide : BeginCodeSnippet // Software Guide : BeginCodeSnippet
typedef itk::RescaleIntensityImageFilter<ImageType,CharImageType> typedef itk::RescaleIntensityImageFilter
RescalerType; <ImageType,CharImageType> RescalerType;
RescalerType::Pointer rescaler=RescalerType::New(); RescalerType::Pointer rescaler=RescalerType::New();
rescaler->SetOutputMinimum(10); rescaler->SetOutputMinimum(10);
rescaler->SetOutputMaximum(255); rescaler->SetOutputMaximum(255);
...@@ -324,7 +316,7 @@ int main( int argc, char* argv[] ) ...@@ -324,7 +316,7 @@ int main( int argc, char* argv[] )
typedef itk::ImageRegionIteratorWithIndex<ImageType> IteratorType; typedef itk::ImageRegionIteratorWithIndex<ImageType> IteratorType;
unsigned int NumberOfStreamDivisions; unsigned int NumberOfStreamDivisions;
if (atoi(argv[7])==0) if (atoi(argv[7]) == 0)
{ {
NumberOfStreamDivisions=10; NumberOfStreamDivisions=10;
} }
...@@ -451,8 +443,6 @@ int main( int argc, char* argv[] ) ...@@ -451,8 +443,6 @@ int main( int argc, char* argv[] )
max_y=pixelIndexArray[1]; max_y=pixelIndexArray[1];
min_y=pixelIndexArray[1]; min_y=pixelIndexArray[1];
for (j=0;j<It;j++) for (j=0;j<It;j++)
{ {
if (j%2==0 && pixelIndexArray[j]>max_x) if (j%2==0 && pixelIndexArray[j]>max_x)
...@@ -473,7 +463,6 @@ int main( int argc, char* argv[] ) ...@@ -473,7 +463,6 @@ int main( int argc, char* argv[] )
} }
} }
// Software Guide : EndCodeSnippet // Software Guide : EndCodeSnippet
// Software Guide : BeginLatex // Software Guide : BeginLatex
// //
...@@ -493,7 +482,6 @@ int main( int argc, char* argv[] ) ...@@ -493,7 +482,6 @@ int main( int argc, char* argv[] )
extractStart[0]=0; extractStart[0]=0;
extractStart[1]=0; extractStart[1]=0;
} }
else else
{ {
extractStart[0]=min_x-10; extractStart[0]=min_x-10;
...@@ -568,4 +556,3 @@ int main( int argc, char* argv[] ) ...@@ -568,4 +556,3 @@ int main( int argc, char* argv[] )
return EXIT_SUCCESS; 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