Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Youssefi
otb
Commits
98b47751
Commit
98b47751
authored
15 years ago
by
Emmanuel Christophe
Browse files
Options
Downloads
Patches
Plain Diff
DOC: fix typo
parent
00a73f97
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Examples/Projections/SensorModelExample.cxx
+13
-26
13 additions, 26 deletions
Examples/Projections/SensorModelExample.cxx
with
13 additions
and
26 deletions
Examples/Projections/SensorModelExample.cxx
+
13
−
26
View file @
98b47751
...
...
@@ -56,16 +56,12 @@ int main( int argc, char* argv[] )
{
std
::
cout
<<
argv
[
0
]
<<
" <input_filename> <output_filename>"
<<
" <upper_left_corner_longitude> <upper_left_corner_latitude>"
<<
" <size_x> <size
e
_y> <number_of_stream_divisions>"
<<
" <size_x> <size_y> <number_of_stream_divisions>"
<<
std
::
endl
;
return
EXIT_FAILURE
;
}
// Software Guide : BeginLatex
//
// As explained before, the first thing to do is to create the sensor
...
...
@@ -79,12 +75,13 @@ int main( int argc, char* argv[] )
// Software Guide : BeginCodeSnippet
typedef
otb
::
Image
<
unsigned
int
,
2
>
ImageType
;
typedef
otb
::
Image
<
unsigned
int
,
2
>
ImageType
;
typedef
otb
::
ImageFileReader
<
ImageType
>
ReaderType
;
ReaderType
::
Pointer
reader
=
ReaderType
::
New
();
ReaderType
::
Pointer
reader
=
ReaderType
::
New
();
reader
->
SetFileName
(
argv
[
1
]);
ImageType
::
Pointer
inputImage
=
reader
->
GetOutput
();
ImageType
::
Pointer
inputImage
=
reader
->
GetOutput
();
// Software Guide : EndCodeSnippet
...
...
@@ -105,7 +102,7 @@ int main( int argc, char* argv[] )
reader
->
GenerateOutputInformation
();
std
::
cout
<<
"Original input imagine spacing: "
<<
reader
->
GetOutput
()
->
GetSpacing
()
<<
std
::
endl
;
;
reader
->
GetOutput
()
->
GetSpacing
()
<<
std
::
endl
;
// Software Guide : EndCodeSnippet
...
...
@@ -150,7 +147,6 @@ int main( int argc, char* argv[] )
// Software Guide : BeginCodeSnippet
if
(
!
model
)
{
std
::
cerr
<<
"Unable to create a model"
<<
std
::
endl
;
...
...
@@ -169,18 +165,14 @@ int main( int argc, char* argv[] )
// Software Guide : BeginCodeSnippet
ModelType
::
OutputPointType
inputPoint
;
typedef
itk
::
Point
<
double
,
2
>
PointType
;
PointType
outputPoint
;
ImageType
::
IndexType
currentIndex
;
ImageType
::
IndexType
currentIndexBis
;
ImageType
::
IndexType
pixelIndexBis
;
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
...
...
@@ -194,7 +186,7 @@ int main( int argc, char* argv[] )
// Software Guide : BeginCodeSnippet
ImageType
::
Pointer
outputImage
=
ImageType
::
New
();
ImageType
::
Pointer
outputImage
=
ImageType
::
New
();
ImageType
::
PixelType
pixelValue
;
...
...
@@ -279,9 +271,9 @@ int main( int argc, char* argv[] )
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
typedef
otb
::
Image
<
unsigned
char
,
2
>
CharImageType
;
typedef
otb
::
ImageFileWriter
<
CharImageType
>
CharWriterType
;
typedef
otb
::
ImageFileWriter
<
ImageType
>
WriterType
;
typedef
otb
::
Image
<
unsigned
char
,
2
>
CharImageType
;
typedef
otb
::
ImageFileWriter
<
CharImageType
>
CharWriterType
;
typedef
otb
::
ImageFileWriter
<
ImageType
>
WriterType
;
WriterType
::
Pointer
extractorWriter
=
WriterType
::
New
();
CharWriterType
::
Pointer
writer
=
CharWriterType
::
New
();
extractorWriter
->
SetFileName
(
"image_temp.jpeg"
);
...
...
@@ -297,8 +289,8 @@ int main( int argc, char* argv[] )
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
typedef
itk
::
RescaleIntensityImageFilter
<
ImageType
,
CharImageType
>
RescalerType
;
typedef
itk
::
RescaleIntensityImageFilter
<
ImageType
,
CharImageType
>
RescalerType
;
RescalerType
::
Pointer
rescaler
=
RescalerType
::
New
();
rescaler
->
SetOutputMinimum
(
10
);
rescaler
->
SetOutputMaximum
(
255
);
...
...
@@ -324,7 +316,7 @@ int main( int argc, char* argv[] )
typedef
itk
::
ImageRegionIteratorWithIndex
<
ImageType
>
IteratorType
;
unsigned
int
NumberOfStreamDivisions
;
if
(
atoi
(
argv
[
7
])
==
0
)
if
(
atoi
(
argv
[
7
])
==
0
)
{
NumberOfStreamDivisions
=
10
;
}
...
...
@@ -451,8 +443,6 @@ int main( int argc, char* argv[] )
max_y
=
pixelIndexArray
[
1
];
min_y
=
pixelIndexArray
[
1
];
for
(
j
=
0
;
j
<
It
;
j
++
)
{
if
(
j
%
2
==
0
&&
pixelIndexArray
[
j
]
>
max_x
)
...
...
@@ -473,7 +463,6 @@ int main( int argc, char* argv[] )
}
}
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
//
...
...
@@ -493,7 +482,6 @@ int main( int argc, char* argv[] )
extractStart
[
0
]
=
0
;
extractStart
[
1
]
=
0
;
}
else
{
extractStart
[
0
]
=
min_x
-
10
;
...
...
@@ -568,4 +556,3 @@ int main( int argc, char* argv[] )
return
EXIT_SUCCESS
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment