Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Main Repositories
otb
Commits
0af647de
Commit
0af647de
authored
Apr 29, 2009
by
Emmanuel Christophe
Browse files
OTB classes (WIP)
parent
413f19e8
Changes
4
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
0af647de
...
...
@@ -22,4 +22,7 @@ ADD_EXECUTABLE(myOwnMapnik myOwnMapnik.cxx)
TARGET_LINK_LIBRARIES
(
myOwnMapnik mapnik
)
ADD_EXECUTABLE
(
mapnikFromVectorData mapnikFromVectorData.cxx
)
TARGET_LINK_LIBRARIES
(
mapnikFromVectorData OTBCommon OTBIO mapnik
)
\ No newline at end of file
TARGET_LINK_LIBRARIES
(
mapnikFromVectorData OTBCommon OTBIO mapnik
)
ADD_EXECUTABLE
(
mapnikOTBClasses mapnikOTBClasses.cxx
)
TARGET_LINK_LIBRARIES
(
mapnikOTBClasses OTBCommon OTBIO
)
mapnikOTBClasses.cxx
View file @
0af647de
#include
"otbVectorDataFileReader.h"
#include
"otbImageFileWriter.h"
#include
"otbVectorData.h"
#include
"otbVectorDataProjectionFilter.h"
#include
<fstream>
...
...
@@ -12,6 +13,7 @@ int main(int argc, char * argv[])
{
//Read the vector data
typedef
otb
::
VectorData
<>
VectorDataType
;
typedef
otb
::
VectorDataFileReader
<
VectorDataType
>
VectorDataFileReaderType
;
VectorDataFileReaderType
::
Pointer
reader
=
VectorDataFileReaderType
::
New
();
...
...
@@ -25,7 +27,7 @@ int main(int argc, char * argv[])
//Convert the vector data into an image
typedef
itk
::
RGBAPixel
<
unsigned
char
>
PixelType
;
typedef
otb
::
Image
<
PixelType
>
ImageType
;
typedef
otb
::
Image
<
PixelType
,
2
>
ImageType
;
typedef
otb
::
VectorDataToImageFilter
<
VectorDataType
,
ImageType
>
VectorDataToImageFilterType
;
VectorDataToImageFilterType
::
Pointer
vectorDataRendering
=
VectorDataToImageFilterType
::
New
();
vectorDataRendering
->
SetInput
(
projection
->
GetOutput
());
...
...
otbVectorDataToImageFilter.h
0 → 100644
View file @
0af647de
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __otbVectorDataToImageFilter_h
#define __otbVectorDataToImageFilter_h
#include
"itkImageSource.h"
namespace
otb
{
/** \class VectorDataToImageFilter
* \brief Render a vector data into an image
*
*/
template
<
class
TVectorData
,
class
TImage
>
class
VectorDataToImageFilter
:
public
itk
::
ImageSource
{
};
// end class
}
// end namespace otb
#ifndef OTB_MANUAL_INSTANTIATION
#include
"otbVectorDataToImageFilter.txx"
#endif
#endif
\ No newline at end of file
otbVectorDataToImageFilter.txx
0 → 100644
View file @
0af647de
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __otbVectorDataToImageFilter_txx
#define __otbVectorDataToImageFilter_txx
namespace otb
{
}
#endif
\ No newline at end of file
Write
Preview
Supports
Markdown
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