Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
otb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
273
Issues
273
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Main Repositories
otb
Commits
98b47751
Commit
98b47751
authored
Feb 09, 2010
by
Emmanuel Christophe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DOC: fix typo
parent
00a73f97
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
26 deletions
+13
-26
Examples/Projections/SensorModelExample.cxx
Examples/Projections/SensorModelExample.cxx
+13
-26
No files found.
Examples/Projections/SensorModelExample.cxx
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
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment