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
d45cab79
Commit
d45cab79
authored
15 years ago
by
Emmanuel Christophe
Browse files
Options
Downloads
Patches
Plain Diff
Compilation ok
parent
0af647de
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CMakeLists.txt
+1
-1
1 addition, 1 deletion
CMakeLists.txt
mapnikOTBClasses.cxx
+1
-1
1 addition, 1 deletion
mapnikOTBClasses.cxx
otbVectorDataToImageFilter.h
+35
-2
35 additions, 2 deletions
otbVectorDataToImageFilter.h
otbVectorDataToImageFilter.txx
+60
-0
60 additions, 0 deletions
otbVectorDataToImageFilter.txx
with
97 additions
and
4 deletions
CMakeLists.txt
+
1
−
1
View file @
d45cab79
...
...
@@ -14,7 +14,7 @@ ENDIF(OTB_FOUND)
INCLUDE_DIRECTORIES
(
"/home/christop/slash/include"
)
INCLUDE_DIRECTORIES
(
"/usr/include/freetype2"
)
LINK_DIRECTORIES
(
"/home/christop/slash/lib
64
"
)
LINK_DIRECTORIES
(
"/home/christop/slash/lib"
)
...
...
This diff is collapsed.
Click to expand it.
mapnikOTBClasses.cxx
+
1
−
1
View file @
d45cab79
...
...
@@ -35,7 +35,7 @@ int main(int argc, char * argv[])
//Save the image in a file
typedef
otb
::
ImageFileWriter
<
ImageType
>
WriterType
;
WriterType
::
Pointer
writer
=
WriterType
::
New
();
writer
->
SetInput
(
vectorDataRendering
);
writer
->
SetInput
(
vectorDataRendering
->
GetOutput
()
);
writer
->
SetFileName
(
argv
[
2
]);
writer
->
Update
();
...
...
This diff is collapsed.
Click to expand it.
otbVectorDataToImageFilter.h
+
35
−
2
View file @
d45cab79
...
...
@@ -30,11 +30,44 @@ namespace otb
template
<
class
TVectorData
,
class
TImage
>
class
VectorDataToImageFilter
:
public
itk
::
ImageSource
class
ITK_EXPORT
VectorDataToImageFilter
:
public
itk
::
ImageSource
<
TImage
>
{
public:
/** Standard class typedefs. */
typedef
VectorDataToImageFilter
Self
;
typedef
itk
::
ImageSource
<
TImage
>
Superclass
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
typedef
itk
::
SmartPointer
<
const
Self
>
ConstPointer
;
/** Method for creation through the object factory. */
itkNewMacro
(
Self
);
/** Run-time type information (and related methods). */
itkTypeMacro
(
VectorDataToImageFilter
,
ImageSource
);
/** Some typedefs. */
typedef
TVectorData
VectorDataType
;
typedef
TImage
ImageType
;
virtual
void
SetInput
(
const
VectorDataType
*
input
);
const
VectorDataType
*
GetInput
(
void
);
protected:
/** Constructor */
VectorDataToImageFilter
();
/** Destructor */
virtual
~
VectorDataToImageFilter
()
{};
/**PrintSelf method */
virtual
void
PrintSelf
(
std
::
ostream
&
os
,
itk
::
Indent
indent
)
const
;
virtual
void
GenerateData
(
void
);
private
:
VectorDataToImageFilter
(
const
Self
&
);
//purposely not implemented
void
operator
=
(
const
Self
&
);
//purposely not implemented
};
// end class
...
...
This diff is collapsed.
Click to expand it.
otbVectorDataToImageFilter.txx
+
60
−
0
View file @
d45cab79
...
...
@@ -19,12 +19,72 @@
#ifndef __otbVectorDataToImageFilter_txx
#define __otbVectorDataToImageFilter_txx
#include "otbVectorDataToImageFilter.h"
namespace otb
{
/**
* Constructor
*/
template <class TVectorData, class TImage>
VectorDataToImageFilter<TVectorData, TImage>
::VectorDataToImageFilter()
{
this->SetNumberOfRequiredInputs( 1 );
}
template <class TVectorData, class TImage>
void
VectorDataToImageFilter<TVectorData, TImage>
::SetInput(const VectorDataType *input)
{
// Process object is not const-correct so the const_cast is required here
this->itk::ProcessObject::SetNthInput(0,
const_cast< VectorDataType * >( input ) );
}
template <class TVectorData, class TImage>
const typename VectorDataToImageFilter<TVectorData, TImage>::VectorDataType *
VectorDataToImageFilter<TVectorData, TImage>
::GetInput(void)
{
if (this->GetNumberOfInputs() < 1)
{
return 0;
}
return static_cast<const TVectorData * >
(this->itk::ProcessObject::GetInput(0) );
}
/**
* Generate Data
*/
template <class TVectorData, class TImage>
void
VectorDataToImageFilter<TVectorData, TImage>
::GenerateData(void)
{
}
/**
* PrintSelf Method
*/
template <class TVectorData, class TImage>
void
VectorDataToImageFilter<TVectorData, TImage>
::PrintSelf(std::ostream& os, itk::Indent indent) const
{
Superclass::PrintSelf(os, indent);
}
}
#endif
\ No newline at end of file
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