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
Main Repositories
otb
Commits
0c131bb3
Commit
0c131bb3
authored
10 years ago
by
Jordi Inglada
Browse files
Options
Downloads
Plain Diff
MRG
parents
9d044545
f028171f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/Projections/otbImageToEnvelopeVectorDataFilter.txx
+19
-14
19 additions, 14 deletions
Code/Projections/otbImageToEnvelopeVectorDataFilter.txx
with
19 additions
and
14 deletions
Code/Projections/otbImageToEnvelopeVectorDataFilter.txx
+
19
−
14
View file @
0c131bb3
...
...
@@ -125,11 +125,16 @@ ImageToEnvelopeVectorDataFilter<TInputImage, TOutputVectorData>
OutputVectorDataPointer outputPtr = this->GetOutput();
// Compute corners as index
typename InputImageType::IndexType ul, ur, lr, ll;
ul = inputPtr->GetLargestPossibleRegion().GetIndex();
ur = ul;
ll=ul;
lr=ul;
itk::ContinuousIndex<double,2> ul(
inputPtr->GetLargestPossibleRegion().GetIndex());
// move 'ul' to the corner of the first pixel
ul[0] += -0.5;
ul[1] += -0.5;
itk::ContinuousIndex<double,2> ur(ul);
itk::ContinuousIndex<double,2> lr(ul);
itk::ContinuousIndex<double,2> ll(ul);
typename InputImageType::SizeType size = inputPtr->GetLargestPossibleRegion().GetSize();
ur[0]+=size[0];
ll[1]+=size[1];
...
...
@@ -138,14 +143,14 @@ ImageToEnvelopeVectorDataFilter<TInputImage, TOutputVectorData>
// Get corners as physical points
typename InputImageType::PointType ulp, urp, lrp, llp, current;
inputPtr->TransformIndexToPhysicalPoint(ul, ulp);
inputPtr->TransformIndexToPhysicalPoint(ur, urp);
inputPtr->TransformIndexToPhysicalPoint(lr, lrp);
inputPtr->TransformIndexToPhysicalPoint(ll, llp);
inputPtr->Transform
Continuous
IndexToPhysicalPoint(ul, ulp);
inputPtr->Transform
Continuous
IndexToPhysicalPoint(ur, urp);
inputPtr->Transform
Continuous
IndexToPhysicalPoint(lr, lrp);
inputPtr->Transform
Continuous
IndexToPhysicalPoint(ll, llp);
this->InstantiateTransform();
typename InputImageType::IndexType
edgeIndex;
itk::ContinuousIndex<double,2>
edgeIndex;
typename InputImageType::PointType edgePoint;
// Build envelope polygon
...
...
@@ -162,7 +167,7 @@ ImageToEnvelopeVectorDataFilter<TInputImage, TOutputVectorData>
edgeIndex[0]+=m_SamplingRate;
while (edgeIndex[0]<ur[0])
{
inputPtr->TransformIndexToPhysicalPoint(edgeIndex, edgePoint);
inputPtr->Transform
Continuous
IndexToPhysicalPoint(edgeIndex, edgePoint);
current = m_Transform->TransformPoint(edgePoint);
vertex[0] = current[0];
vertex[1] = current[1];
...
...
@@ -182,7 +187,7 @@ ImageToEnvelopeVectorDataFilter<TInputImage, TOutputVectorData>
edgeIndex[1]+=m_SamplingRate;
while (edgeIndex[1]<lr[1])
{
inputPtr->TransformIndexToPhysicalPoint(edgeIndex, edgePoint);
inputPtr->Transform
Continuous
IndexToPhysicalPoint(edgeIndex, edgePoint);
current = m_Transform->TransformPoint(edgePoint);
vertex[0] = current[0];
vertex[1] = current[1];
...
...
@@ -202,7 +207,7 @@ ImageToEnvelopeVectorDataFilter<TInputImage, TOutputVectorData>
edgeIndex[0]-=m_SamplingRate;
while (edgeIndex[0]>ll[0])
{
inputPtr->TransformIndexToPhysicalPoint(edgeIndex, edgePoint);
inputPtr->Transform
Continuous
IndexToPhysicalPoint(edgeIndex, edgePoint);
current = m_Transform->TransformPoint(edgePoint);
vertex[0] = current[0];
vertex[1] = current[1];
...
...
@@ -222,7 +227,7 @@ ImageToEnvelopeVectorDataFilter<TInputImage, TOutputVectorData>
edgeIndex[1]-=m_SamplingRate;
while (edgeIndex[1]>ul[1])
{
inputPtr->TransformIndexToPhysicalPoint(edgeIndex, edgePoint);
inputPtr->Transform
Continuous
IndexToPhysicalPoint(edgeIndex, edgePoint);
current = m_Transform->TransformPoint(edgePoint);
vertex[0] = current[0];
vertex[1] = current[1];
...
...
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