Skip to content
Snippets Groups Projects
Commit 0af647de authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

OTB classes (WIP)

parent 413f19e8
Branches
Tags
No related merge requests found
......@@ -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)
#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());
......
/*=========================================================================
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
/*=========================================================================
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment