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
96234fe5
Commit
96234fe5
authored
16 years ago
by
Emmanuel Christophe
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Preparation of the NCC example for software guide output
parent
f319f5da
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Examples/DisparityMap/NCCRegistrationFilterExample.cxx
+29
-4
29 additions, 4 deletions
Examples/DisparityMap/NCCRegistrationFilterExample.cxx
with
29 additions
and
4 deletions
Examples/DisparityMap/NCCRegistrationFilterExample.cxx
+
29
−
4
View file @
96234fe5
...
...
@@ -51,6 +51,10 @@
#include
"itkWarpImageFilter.h"
// Software Guide : EndCodeSnippet
#include
"otbImageOfVectorsToMonoChannelExtractROI.h"
#include
"itkRescaleIntensityImageFilter.h"
#include
"itkCastImageFilter.h"
#include
<iostream>
...
...
@@ -73,6 +77,8 @@ int main(int argc, char** argv )
typedef
double
CoordinateRepresentationType
;
typedef
unsigned
char
OutputPixelType
;
typedef
otb
::
Image
<
OutputPixelType
,
ImageDimension
>
OutputImageType
;
// Software Guide : BeginLatex
//
...
...
@@ -187,11 +193,24 @@ int main(int argc, char** argv )
// Software Guide : EndCodeSnippet
typedef
otb
::
ImageFileWriter
<
DeformationFieldType
>
DFWriterType
;
typedef
otb
::
ImageOfVectorsToMonoChannelExtractROI
<
DeformationFieldType
,
MovingImageType
>
ChannelExtractionFilterType
;
ChannelExtractionFilterType
::
Pointer
channelExtractor
=
ChannelExtractionFilterType
::
New
();
channelExtractor
->
SetInput
(
registrator
->
GetOutput
());
channelExtractor
->
SetChannel
(
1
);
typedef
itk
::
RescaleIntensityImageFilter
<
MovingImageType
,
OutputImageType
>
RescalerType
;
RescalerType
::
Pointer
fieldRescaler
=
RescalerType
::
New
();
fieldRescaler
->
SetInput
(
channelExtractor
->
GetOutput
());
fieldRescaler
->
SetOutputMaximum
(
255
);
fieldRescaler
->
SetOutputMinimum
(
0
);
typedef
otb
::
ImageFileWriter
<
OutputImageType
>
DFWriterType
;
DFWriterType
::
Pointer
dfWriter
=
DFWriterType
::
New
();
dfWriter
->
SetFileName
(
argv
[
3
]);
dfWriter
->
SetInput
(
registrato
r
->
GetOutput
()
);
dfWriter
->
SetInput
(
fieldRescale
r
->
GetOutput
()
);
dfWriter
->
Update
();
...
...
@@ -204,11 +223,17 @@ int main(int argc, char** argv )
warper
->
SetDeformationField
(
registrator
->
GetOutput
()
);
warper
->
SetEdgePaddingValue
(
padValue
);
typedef
otb
::
ImageFileWriter
<
MovingImageType
>
WriterType
;
typedef
itk
::
CastImageFilter
<
MovingImageType
,
OutputImageType
>
CastFilterType
;
CastFilterType
::
Pointer
caster
=
CastFilterType
::
New
();
caster
->
SetInput
(
warper
->
GetOutput
()
);
typedef
otb
::
ImageFileWriter
<
OutputImageType
>
WriterType
;
WriterType
::
Pointer
writer
=
WriterType
::
New
();
writer
->
SetFileName
(
argv
[
4
]);
writer
->
SetInput
(
warp
er
->
GetOutput
()
);
writer
->
SetInput
(
cast
er
->
GetOutput
()
);
writer
->
Update
();
// Software Guide : BeginLatex
...
...
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