Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
otb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
273
Issues
273
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Main Repositories
otb
Commits
01af611d
Commit
01af611d
authored
Dec 16, 2009
by
Emmanuel Christophe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG: add otbMacro include
parent
1f11c259
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
57 deletions
+15
-57
Code/BasicFilters/otbImageToPointSetFilter.h
Code/BasicFilters/otbImageToPointSetFilter.h
+2
-2
Code/BasicFilters/otbImageToPointSetFilter.txx
Code/BasicFilters/otbImageToPointSetFilter.txx
+11
-13
Code/FeatureExtraction/otbThresholdImageToPointSetFilter.h
Code/FeatureExtraction/otbThresholdImageToPointSetFilter.h
+0
-1
Code/FeatureExtraction/otbThresholdImageToPointSetFilter.txx
Code/FeatureExtraction/otbThresholdImageToPointSetFilter.txx
+2
-41
No files found.
Code/BasicFilters/otbImageToPointSetFilter.h
View file @
01af611d
...
...
@@ -78,7 +78,7 @@ protected:
/** Multi-threading implementation */
typedef
std
::
vector
<
typename
OutputPointSetType
::
PointsContainer
::
Pointer
>
OutputPointContainerForThreadType
;
typedef
std
::
vector
<
typename
OutputPointSetType
::
PointsContainer
::
Pointer
>
OutputPoint
s
ContainerForThreadType
;
virtual
void
BeforeThreadedGenerateData
();
...
...
@@ -99,7 +99,7 @@ protected:
Pointer
Filter
;
};
OutputPoint
ContainerForThreadType
m_Point
ContainerPerThread
;
OutputPoint
sContainerForThreadType
m_Points
ContainerPerThread
;
/** End Multi-threading implementation */
...
...
Code/BasicFilters/otbImageToPointSetFilter.txx
View file @
01af611d
...
...
@@ -138,10 +138,9 @@ ImageToPointSetFilter<TInputImage,TOutputPointSet>
str.Filter = this;
// Initializing object per thread
typename PointsContainerType::Pointer defaultPointsContainer
= OutputPointSetType::PointsContainer::New();
this->m_PointContainerPerThread
= OutputPointContainerForThreadType(this->GetNumberOfThreads(),defaultPointsContainer);
typename PointsContainerType::Pointer defaultPointsContainer = PointsContainerType::New();
this->m_PointsContainerPerThread
= OutputPointsContainerForThreadType(this->GetNumberOfThreads(),defaultPointsContainer);
// Setting up multithreader
...
...
@@ -171,19 +170,18 @@ ImageToPointSetFilter<TInputImage,TOutputPointSet>
::AfterThreadedGenerateData(void)
{
// copy the lists to the output
//TODO rename PointContainer in PointsContainer
typename OutputPointSetType::PointsContainer * outputPointContainer = this->GetOutput()->GetPoints();
outputPointContainer->Initialize();
typedef typename OutputPointSetType::PointsContainer::ConstIterator OutputPointContainerIterator;
for (unsigned int i=0; i< this->m_PointContainerPerThread.size(); ++i)
PointsContainerType * outputPointsContainer = this->GetOutput()->GetPoints();
outputPointsContainer->Initialize();
typedef typename PointsContainerType::ConstIterator OutputPointsContainerIterator;
for (unsigned int i=0; i< this->m_PointsContainerPerThread.size(); ++i)
{
if (this->m_PointContainerPerThread[i].IsNotNull())
if (this->m_Point
s
ContainerPerThread[i].IsNotNull())
{
for (OutputPoint
ContainerIterator it = this->m_Point
ContainerPerThread[i]->Begin();
it != this->m_PointContainerPerThread[i]->End();
for (OutputPoint
sContainerIterator it = this->m_Points
ContainerPerThread[i]->Begin();
it != this->m_Point
s
ContainerPerThread[i]->End();
++it)
{
outputPointContainer->push_back(it.Value());
outputPoint
s
Container->push_back(it.Value());
}
}
}
...
...
Code/FeatureExtraction/otbThresholdImageToPointSetFilter.h
View file @
01af611d
...
...
@@ -72,7 +72,6 @@ protected:
ThresholdImageToPointSetFilter
();
virtual
~
ThresholdImageToPointSetFilter
()
{};
// virtual void GenerateData();
virtual
void
ThreadedGenerateData
(
const
InputImageRegionType
&
inputRegionForThread
,
int
threadId
);
void
PrintSelf
(
std
::
ostream
&
os
,
itk
::
Indent
indent
)
const
;
...
...
Code/FeatureExtraction/otbThresholdImageToPointSetFilter.txx
View file @
01af611d
...
...
@@ -35,52 +35,13 @@ ThresholdImageToPointSetFilter<TInputImage, TOutputPointSet>
m_UpperThreshold = itk::NumericTraits<InputPixelType>::max();
}
//template <class TInputImage, class TOutputPointSet>
//void
//ThresholdImageToPointSetFilter<TInputImage, TOutputPointSet>
//::GenerateData()
//{
// InputImageConstPointer inputPtr = this->GetInput(0);
// OutputPointSetPointer outputPtr = this->GetOutput();
//
// unsigned int pointId = 0;
// typename OutputPointSetType::PointType position;
//
// outputPtr->Initialize();
//
// typedef itk::ImageRegionConstIterator<TInputImage> InputIterator;
// InputIterator inIt(inputPtr, inputPtr->GetRequestedRegion() );
//
// // walk the regions, threshold each pixel
// while ( !inIt.IsAtEnd() )
// {
//
// const InputPixelType value = inIt.Get();
// const IndexType index = inIt.GetIndex();
//
// if ((value >= m_LowerThreshold) && (value <= m_UpperThreshold))
// {
// position[0] = index[0];
// position[1] = index[1];
//
// outputPtr->SetPoint(pointId,position);
//
// pointId++;
//
// }
// ++inIt;
// }
//}
template <class TInputImage, class TOutputPointSet>
void
ThresholdImageToPointSetFilter<TInputImage, TOutputPointSet>
::ThreadedGenerateData(const InputImageRegionType &inputRegionForThread, int threadId)
{
otbMsgDevMacro(<< "Processing thread: " << threadId);
this->m_PointContainerPerThread[threadId] = PointsContainerType::New();
this->m_Point
s
ContainerPerThread[threadId] = PointsContainerType::New();
InputImageConstPointer inputPtr = this->GetInput();
// Define the iterators
...
...
@@ -101,7 +62,7 @@ ThresholdImageToPointSetFilter<TInputImage, TOutputPointSet>
const IndexType index = inputIt.GetIndex();
position[0] = index[0];
position[1] = index[1];
this->m_PointContainerPerThread[threadId]->push_back(position);
this->m_Point
s
ContainerPerThread[threadId]->push_back(position);
}
++inputIt;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment