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
Container registry
Model registry
Operate
Environments
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
Antoine Belvire
otb
Commits
04056550
Commit
04056550
authored
12 years ago
by
Otmane Lahlou
Browse files
Options
Downloads
Patches
Plain Diff
ENH: initialize the manipulator with a initial zoom
parent
4da165f2
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
Code/Common/mvdImageViewManipulator.h
+12
-2
12 additions, 2 deletions
Code/Common/mvdImageViewManipulator.h
with
12 additions
and
2 deletions
Code/Common/mvdImageViewManipulator.h
+
12
−
2
View file @
04056550
...
...
@@ -116,14 +116,24 @@ public:
void
SetImageLargestRegion
(
const
ImageRegionType
&
largestRegion
)
{
m_NavigationContext
.
m_ModelImageRegion
=
largestRegion
;
// Compute the intial scale factor
double
factorX
=
(
double
)
m_NavigationContext
.
m_ViewportImageRegion
.
GetSize
()[
0
]
/
(
double
)(
largestRegion
.
GetSize
()[
0
]);
double
factorY
=
(
double
)
m_NavigationContext
.
m_ViewportImageRegion
.
GetSize
()[
1
]
/
(
double
)(
largestRegion
.
GetSize
()[
1
]);
double
scale
=
std
::
min
(
factorX
,
factorY
);
this
->
Zoom
(
scale
);
// store the image region
m_NavigationContext
.
m_ModelImageRegion
=
largestRegion
;
// Need to call ConstrainRegion here cause not called when the input image
// is opened
this
->
ConstrainRegion
(
m_NavigationContext
.
m_ViewportImageRegion
,
m_NavigationContext
.
m_ModelImageRegion
);
);
}
//
...
...
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