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
e0986845
Commit
e0986845
authored
16 years ago
by
OTB Bot
Browse files
Options
Downloads
Patches
Plain Diff
Images en arguments du test
parent
78c86aeb
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
Testing/Code/BasicFilters/otbProlateInterpolateImageFunction.cxx
+11
-7
11 additions, 7 deletions
.../Code/BasicFilters/otbProlateInterpolateImageFunction.cxx
with
11 additions
and
7 deletions
Testing/Code/BasicFilters/otbProlateInterpolateImageFunction.cxx
+
11
−
7
View file @
e0986845
...
@@ -35,13 +35,16 @@ int otbProlateInterpolateImageFunction(int argc, char * argv[])
...
@@ -35,13 +35,16 @@ int otbProlateInterpolateImageFunction(int argc, char * argv[])
{
{
const
char
*
infname
=
argv
[
1
];
const
char
*
infname
=
argv
[
1
];
const
char
*
outfname
=
argv
[
2
];
const
char
*
outfname
=
argv
[
2
];
const
char
*
cosfname
=
argv
[
3
];
const
char
*
itkcosfname
=
argv
[
4
];
const
char
*
profname
=
argv
[
5
];
typedef
otb
::
Image
<
double
,
2
>
ImageType
;
typedef
otb
::
Image
<
double
,
2
>
ImageType
;
typedef
otb
::
ProlateInterpolateImageFunction
<
ImageType
>
InterpolatorType
;
typedef
otb
::
ProlateInterpolateImageFunction
<
ImageType
>
InterpolatorType
;
typedef
InterpolatorType
::
ContinuousIndexType
ContinuousIndexType
;
typedef
InterpolatorType
::
ContinuousIndexType
ContinuousIndexType
;
typedef
otb
::
ImageFileReader
<
ImageType
>
ReaderType
;
typedef
otb
::
ImageFileReader
<
ImageType
>
ReaderType
;
unsigned
int
i
=
4
;
unsigned
int
i
=
7
;
std
::
vector
<
ContinuousIndexType
>
indicesList
;
std
::
vector
<
ContinuousIndexType
>
indicesList
;
while
(
i
<
static_cast
<
unsigned
int
>
(
argc
)
&&
(
i
+
1
)
<
static_cast
<
unsigned
int
>
(
argc
))
while
(
i
<
static_cast
<
unsigned
int
>
(
argc
)
&&
(
i
+
1
)
<
static_cast
<
unsigned
int
>
(
argc
))
...
@@ -53,13 +56,14 @@ int otbProlateInterpolateImageFunction(int argc, char * argv[])
...
@@ -53,13 +56,14 @@ int otbProlateInterpolateImageFunction(int argc, char * argv[])
i
+=
2
;
i
+=
2
;
}
}
// Instantiating object
// Instantiating object
InterpolatorType
::
Pointer
prolate
=
InterpolatorType
::
New
();
InterpolatorType
::
Pointer
prolate
=
InterpolatorType
::
New
();
ReaderType
::
Pointer
reader
=
ReaderType
::
New
();
ReaderType
::
Pointer
reader
=
ReaderType
::
New
();
reader
->
SetFileName
(
infname
);
reader
->
SetFileName
(
infname
);
reader
->
Update
();
reader
->
Update
();
prolate
->
SetInputImage
(
reader
->
GetOutput
());
prolate
->
SetInputImage
(
reader
->
GetOutput
());
prolate
->
SetRadius
(
atoi
(
argv
[
3
]));
prolate
->
SetRadius
(
atoi
(
argv
[
6
]));
std
::
ofstream
file
;
std
::
ofstream
file
;
file
.
open
(
outfname
);
file
.
open
(
outfname
);
...
@@ -82,7 +86,7 @@ int otbProlateInterpolateImageFunction(int argc, char * argv[])
...
@@ -82,7 +86,7 @@ int otbProlateInterpolateImageFunction(int argc, char * argv[])
InterpolatorType
::
Pointer
pro
=
InterpolatorType
::
New
();
InterpolatorType
::
Pointer
pro
=
InterpolatorType
::
New
();
// Resampler connected to input image
// Resampler connected to input image
proresampler
->
SetInput
(
reader
->
GetOutput
());
proresampler
->
SetInput
(
reader
->
GetOutput
());
pro
->
SetRadius
(
atoi
(
argv
[
3
]));
pro
->
SetRadius
(
atoi
(
argv
[
6
]));
proresampler
->
SetInterpolator
(
pro
);
proresampler
->
SetInterpolator
(
pro
);
StreamingResampleImageFilterType
::
SizeType
size
;
StreamingResampleImageFilterType
::
SizeType
size
;
size
[
0
]
=
512
;
size
[
0
]
=
512
;
...
@@ -93,7 +97,7 @@ int otbProlateInterpolateImageFunction(int argc, char * argv[])
...
@@ -93,7 +97,7 @@ int otbProlateInterpolateImageFunction(int argc, char * argv[])
// Result of resampler is written
// Result of resampler is written
prowriter
->
SetInput
(
proresampler
->
GetOutput
());
prowriter
->
SetInput
(
proresampler
->
GetOutput
());
//prowriter->SetNumberOfStreamDivisions(1);
//prowriter->SetNumberOfStreamDivisions(1);
prowriter
->
SetFileName
(
"
pro
resample.tif"
);
prowriter
->
SetFileName
(
pro
fname
);
prowriter
->
Update
();
prowriter
->
Update
();
typedef
otb
::
WindowedSincInterpolateImageCosineFunction
<
ImageType
>
CosInterpolatorType
;
typedef
otb
::
WindowedSincInterpolateImageCosineFunction
<
ImageType
>
CosInterpolatorType
;
...
@@ -111,14 +115,14 @@ int otbProlateInterpolateImageFunction(int argc, char * argv[])
...
@@ -111,14 +115,14 @@ int otbProlateInterpolateImageFunction(int argc, char * argv[])
itkcosresampler
->
SetSize
(
size
);
itkcosresampler
->
SetSize
(
size
);
itkcosresampler
->
SetOutputSpacing
(
tutu
);
itkcosresampler
->
SetOutputSpacing
(
tutu
);
cosresampler
->
SetInput
(
reader
->
GetOutput
());
cosresampler
->
SetInput
(
reader
->
GetOutput
());
cos
->
SetRadius
(
atoi
(
argv
[
3
]));
cos
->
SetRadius
(
atoi
(
argv
[
6
]));
cosresampler
->
SetInterpolator
(
cos
);
cosresampler
->
SetInterpolator
(
cos
);
itkcosresampler
->
SetInput
(
reader
->
GetOutput
());
itkcosresampler
->
SetInput
(
reader
->
GetOutput
());
itkcosresampler
->
SetInterpolator
(
itkcos
);
itkcosresampler
->
SetInterpolator
(
itkcos
);
coswriter
->
SetInput
(
cosresampler
->
GetOutput
());
coswriter
->
SetInput
(
cosresampler
->
GetOutput
());
coswriter
->
SetFileName
(
"
cos
resample.tif"
);
coswriter
->
SetFileName
(
cos
fname
);
itkcoswriter
->
SetInput
(
itkcosresampler
->
GetOutput
());
itkcoswriter
->
SetInput
(
itkcosresampler
->
GetOutput
());
itkcoswriter
->
SetFileName
(
"
itkcos
resample.tif"
);
itkcoswriter
->
SetFileName
(
itkcos
fname
);
coswriter
->
Update
();
coswriter
->
Update
();
itkcoswriter
->
Update
();
itkcoswriter
->
Update
();
/*
/*
...
...
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