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
f5dd3fde
Commit
f5dd3fde
authored
16 years ago
by
Julien Michel
Browse files
Options
Downloads
Patches
Plain Diff
Correction du filtre : plus InPlace car trop de pb
parent
25080c1d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/BasicFilters/otbImportGeoInformationImageFilter.h
+6
-6
6 additions, 6 deletions
Code/BasicFilters/otbImportGeoInformationImageFilter.h
Code/BasicFilters/otbImportGeoInformationImageFilter.txx
+18
-12
18 additions, 12 deletions
Code/BasicFilters/otbImportGeoInformationImageFilter.txx
with
24 additions
and
18 deletions
Code/BasicFilters/otbImportGeoInformationImageFilter.h
+
6
−
6
View file @
f5dd3fde
...
...
@@ -18,7 +18,7 @@ PURPOSE. See the above copyright notices for more information.
#ifndef _otbImportGeoInformationImageFilter_h
#define _otbImportGeoInformationImageFilter_h
#include
"itk
InPlace
ImageFilter.h"
#include
"itk
Cast
ImageFilter.h"
namespace
otb
{
...
...
@@ -36,12 +36,12 @@ namespace otb
*/
template
<
class
TImage
,
class
TSourceImage
>
class
ITK_EXPORT
ImportGeoInformationImageFilter
:
public
itk
::
InPlace
ImageFilter
<
TImage
,
TImage
>
:
public
itk
::
Cast
ImageFilter
<
TImage
,
TImage
>
{
public:
/** Standard typedefs */
typedef
ImportGeoInformationImageFilter
Self
;
typedef
itk
::
InPlace
ImageFilter
<
TImage
,
TImage
>
Superclass
;
typedef
itk
::
Cast
ImageFilter
<
TImage
,
TImage
>
Superclass
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
typedef
itk
::
SmartPointer
<
const
Self
>
ConstPointer
;
...
...
@@ -49,7 +49,7 @@ class ITK_EXPORT ImportGeoInformationImageFilter
itkNewMacro
(
Self
);
/** Creation through object factory macro */
itkTypeMacro
(
ImportGeoInformationImageFilter
,
InPlace
ImageFilter
);
itkTypeMacro
(
ImportGeoInformationImageFilter
,
Cast
ImageFilter
);
/** Template parameters typedefs */
typedef
TImage
ImageType
;
...
...
@@ -76,12 +76,12 @@ protected:
virtual
~
ImportGeoInformationImageFilter
()
{};
/**PrintSelf method */
virtual
void
PrintSelf
(
std
::
ostream
&
os
,
itk
::
Indent
indent
)
const
;
/** GenerateData */
virtual
void
GenerateData
(
void
);
/** Generate input requested region */
virtual
void
GenerateInputRequestedRegion
(
void
);
/** Generate output information */
virtual
void
GenerateOutputInformation
(
void
);
/* /\** Generate data *\/ */
/* virtual void GenerateData(void); */
private
:
ImportGeoInformationImageFilter
(
const
Self
&
);
//purposely not implemented
void
operator
=
(
const
Self
&
);
//purposely not implemented
...
...
This diff is collapsed.
Click to expand it.
Code/BasicFilters/otbImportGeoInformationImageFilter.txx
+
18
−
12
View file @
f5dd3fde
...
...
@@ -34,8 +34,6 @@ ImportGeoInformationImageFilter<TImage,TSourceImage>
::ImportGeoInformationImageFilter()
{
this->SetNumberOfRequiredInputs(2);
this->SetNthInput(1,SourceImageType::New().GetPointer());
this->SetInPlace(true);
}
template <class TImage, class TSourceImage>
...
...
@@ -84,17 +82,25 @@ void
SourceImageType * sourcePtr =const_cast<SourceImageType *>(this->GetSource());
// Import metdata
outputPtr->CopyInformation(sourcePtr);
outputPtr->SetLargestPossibleRegion(this->GetInput()->GetLargestPossibleRegion());
}
/**
* Main computation method.
*/
template <class TImage, class TSourceImage>
void
ImportGeoInformationImageFilter<TImage,TSourceImage>
::GenerateData(void)
{
this->AllocateOutputs();
}
// template <class TImage, class TSourceImage>
// void
// ImportGeoInformationImageFilter<TImage,TSourceImage>
// ::GenerateData(void)
// {
// // Get output and source pointer
// ImagePointerType outputPtr = this->GetOutput();
// SourceImageType * sourcePtr =const_cast<SourceImageType *>(this->GetSource());
// // Import metdata
// outputPtr->CopyInformation(sourcePtr);
// // Don't forget to copy also the origin and spacing, not handled by the CopyInformation method.
// outputPtr->SetOrigin(sourcePtr->GetOrigin());
// outputPtr->SetSpacing(sourcePtr->GetSpacing());
// }
/**
* PrintSelf Method
*/
...
...
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