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
b9caccfa
Commit
b9caccfa
authored
16 years ago
by
Emmanuel Christophe
Browse files
Options
Downloads
Patches
Plain Diff
ENH: adding convenient SetOrigin based on itk::Point
parent
5dbce8ac
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
Code/Common/otbRemoteSensingRegion.h
+10
-2
10 additions, 2 deletions
Code/Common/otbRemoteSensingRegion.h
with
10 additions
and
2 deletions
Code/Common/otbRemoteSensingRegion.h
+
10
−
2
View file @
b9caccfa
...
...
@@ -67,6 +67,7 @@ public:
/** Index typedef support. An index is used to access pixel values. */
typedef
itk
::
ContinuousIndex
<
Type
>
IndexType
;
typedef
itk
::
Point
<
Type
,
2
>
PointType
;
/** Size typedef support. A size is used to define region bounds. */
typedef
itk
::
ContinuousIndex
<
Type
>
SizeType
;
...
...
@@ -132,7 +133,7 @@ public:
ImageRegionType
imageRegion
;
typename
ImageRegionType
::
IndexType
irIndex
;
typename
ImageRegionType
::
SizeType
irSize
;
irIndex
[
0
]
=
static_cast
<
unsigned
long
>
(
vcl_floor
(
m_Index
[
0
]));
irIndex
[
1
]
=
static_cast
<
unsigned
long
>
(
vcl_floor
(
m_Index
[
1
]));
irSize
[
0
]
=
static_cast
<
unsigned
long
>
(
vcl_ceil
(
m_Size
[
0
]));
...
...
@@ -140,7 +141,7 @@ public:
imageRegion
.
SetIndex
(
irIndex
);
imageRegion
.
SetSize
(
irSize
);
return
imageRegion
;
}
...
...
@@ -150,6 +151,13 @@ public:
m_Index
=
index
;
}
/** Set the index defining the corner of the region. */
void
SetOrigin
(
const
PointType
&
index
)
{
m_Index
[
0
]
=
index
[
0
];
m_Index
[
1
]
=
index
[
1
];
}
/** Get index defining the corner of the region. */
const
IndexType
&
GetOrigin
()
const
{
...
...
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