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
f100346b
Commit
f100346b
authored
12 years ago
by
Sebastien Harasse
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Region merging: adding template parameter for clustered output
parent
6614445a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/BasicFilters/otbLabelImageRegionMergingFilter.h
+2
-2
2 additions, 2 deletions
Code/BasicFilters/otbLabelImageRegionMergingFilter.h
Code/BasicFilters/otbLabelImageRegionMergingFilter.txx
+29
-29
29 additions, 29 deletions
Code/BasicFilters/otbLabelImageRegionMergingFilter.txx
with
31 additions
and
31 deletions
Code/BasicFilters/otbLabelImageRegionMergingFilter.h
+
2
−
2
View file @
f100346b
...
...
@@ -36,7 +36,7 @@ namespace otb
*
* \ingroup ImageSegmentation
*/
template
<
class
TInputLabelImage
,
class
TInputSpectralImage
,
class
TOutputLabelImage
=
TInputLabelImage
>
template
<
class
TInputLabelImage
,
class
TInputSpectralImage
,
class
TOutputLabelImage
=
TInputLabelImage
,
class
TOutputClusteredImage
=
TInputSpectralImage
>
class
ITK_EXPORT
LabelImageRegionMergingFilter
:
public
itk
::
ImageToImageFilter
<
TInputLabelImage
,
TOutputLabelImage
>
{
...
...
@@ -77,7 +77,7 @@ public:
typedef
typename
OutputImageType
::
PixelType
OutputPixelType
;
typedef
typename
OutputImageType
::
RegionType
OutputRegionType
;
typedef
T
InputSpectral
Image
OutputClusteredImageType
;
typedef
T
OutputClustered
Image
OutputClusteredImageType
;
itkStaticConstMacro
(
ImageDimension
,
unsigned
int
,
InputLabelImageType
::
ImageDimension
);
...
...
This diff is collapsed.
Click to expand it.
Code/BasicFilters/otbLabelImageRegionMergingFilter.txx
+
29
−
29
View file @
f100346b
...
...
@@ -28,8 +28,8 @@
namespace otb
{
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage>
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage>
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage
, class TOutputClusteredImage
>
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage
, TOutputClusteredImage
>
::LabelImageRegionMergingFilter()
{
...
...
@@ -41,51 +41,51 @@ LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabe
}
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage>
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage
, class TOutputClusteredImage
>
void
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage>
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage
, TOutputClusteredImage
>
::SetInputLabelImage( const TInputLabelImage * labelImage)
{
// Process object is not const-correct so the const casting is required.
this->SetNthInput(0, const_cast<TInputLabelImage *>( labelImage ));
}
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage>
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage
, class TOutputClusteredImage
>
void
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage>
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage
, TOutputClusteredImage
>
::SetInputSpectralImage( const TInputSpectralImage * spectralImage)
{
// Process object is not const-correct so the const casting is required.
this->SetNthInput(1, const_cast<TInputSpectralImage *>( spectralImage ));
}
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage>
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage
, class TOutputClusteredImage
>
TInputLabelImage *
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage>
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage
, TOutputClusteredImage
>
::GetInputLabelImage()
{
return dynamic_cast<TInputLabelImage*>(itk::ProcessObject::GetInput(0));
}
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage>
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage
, class TOutputClusteredImage
>
TInputSpectralImage *
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage>
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage
, TOutputClusteredImage
>
::GetInputSpectralImage()
{
return dynamic_cast<TInputSpectralImage*>(itk::ProcessObject::GetInput(1));
}
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage>
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage>
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage
, class TOutputClusteredImage
>
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage
, TOutputClusteredImage
>
::~LabelImageRegionMergingFilter()
{
}
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage>
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage
, class TOutputClusteredImage
>
TOutputLabelImage *
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage>
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage
, TOutputClusteredImage
>
::GetLabelOutput()
{
if (this->GetNumberOfOutputs() < 1)
...
...
@@ -95,9 +95,9 @@ LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabe
return static_cast<OutputLabelImageType *>(this->itk::ProcessObject::GetOutput(0));
}
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage>
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage
, class TOutputClusteredImage
>
const TOutputLabelImage *
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage>
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage
, TOutputClusteredImage
>
::GetLabelOutput() const
{
if (this->GetNumberOfOutputs() < 1)
...
...
@@ -107,9 +107,9 @@ LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabe
return static_cast<OutputLabelImageType *>(this->itk::ProcessObject::GetOutput(0));
}
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage>
typename LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage>::OutputClusteredImageType *
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage>
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage
, class TOutputClusteredImage
>
typename LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage
, TOutputClusteredImage
>::OutputClusteredImageType *
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage
, TOutputClusteredImage
>
::GetClusteredOutput()
{
if (this->GetNumberOfOutputs() < 2)
...
...
@@ -119,9 +119,9 @@ LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabe
return static_cast<OutputClusteredImageType *>(this->itk::ProcessObject::GetOutput(1));
}
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage>
const typename LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage>::OutputClusteredImageType *
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage>
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage
, class TOutputClusteredImage
>
const typename LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage
, TOutputClusteredImage
>::OutputClusteredImageType *
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage
, TOutputClusteredImage
>
::GetClusteredOutput() const
{
if (this->GetNumberOfOutputs() < 2)
...
...
@@ -132,9 +132,9 @@ LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabe
}
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage>
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage
, class TOutputClusteredImage
>
void
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage>
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage
, TOutputClusteredImage
>
//::BeforeThreadedGenerateData()
::GenerateData()
{
...
...
@@ -383,9 +383,9 @@ LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabe
}
}
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage>
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage
, class TOutputClusteredImage
>
void
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage>
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage
, TOutputClusteredImage
>
::PrintSelf(std::ostream& os, itk::Indent indent) const
{
Superclass::PrintSelf(os, indent);
...
...
@@ -393,9 +393,9 @@ LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabe
}
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage>
typename LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage>::RegionAdjacencyMapType
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage>
template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage
, class TOutputClusteredImage
>
typename LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage
, TOutputClusteredImage
>::RegionAdjacencyMapType
LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage
, TOutputClusteredImage
>
::LabelImageToRegionAdjacencyMap(typename InputLabelImageType::Pointer inputLabelImage)
{
// declare the output map
...
...
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