Orfeo Toolbox  4.0
otbVectorDataToImageFilter.txx
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ORFEO Toolbox
4  Language: C++
5  Date: $Date$
6  Version: $Revision$
7 
8 
9  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
10  See OTBCopyright.txt for details.
11 
12 
13  This software is distributed WITHOUT ANY WARRANTY; without even
14  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  PURPOSE. See the above copyright notices for more information.
16 
17 =========================================================================*/
18 
19 #ifndef __otbVectorDataToImageFilter_txx
20 #define __otbVectorDataToImageFilter_txx
21 
22 #include <sstream>
24 #include "itkImageRegionIterator.h"
26 #include "otbVectorDataStyle.h"
27 #include "itkRGBAPixel.h"
28 
29 #include <mapnik/datasource_cache.hpp>
30 #include <mapnik/font_engine_freetype.hpp>
31 #include <mapnik/agg_renderer.hpp>
32 #include <mapnik/filter_factory.hpp>
33 #include <mapnik/color_factory.hpp>
34 #include <mapnik/image_util.hpp>
35 #include <mapnik/config_error.hpp>
36 #include <mapnik/memory_datasource.hpp>
37 #include <mapnik/layer.hpp>
38 #include <mapnik/map.hpp>
39 #include <mapnik/value.hpp>
40 
41 #include "ogr_spatialref.h"
42 
43 #ifdef OTB_MAPNIK_COMPATIBILITY_API07
44 namespace mapnik {
45 typedef Layer layer;
46 typedef Image32 image_32;
47 }
48 #endif
49 
50 namespace otb
51 {
52 namespace mapnik_otb
53 {
54 // this should be removed once mapnik support for version < 2.0 is dropped.
55 // should be around 01/2013.
56 #ifdef OTB_MAPNIK_COMPATIBILITY_API07
57 static size_t get_num_layer(const mapnik::Map& map) { return map.layerCount(); }
58 static unsigned get_height(const mapnik::Map& map) { return map.getHeight(); }
59 static unsigned get_width(const mapnik::Map& map) { return map.getWidth(); }
60 typedef mapnik::Envelope<double> box2d;
61 static void zoom_to_box(mapnik::Map* map, const mapnik::Envelope<double>& envelope)
62 {
63  map->zoomToBox(envelope);
64 }
65 typedef mapnik::geometry2d geom;
66 static geom* create_geom(int geom_type)
67 {
68  geom* g = 0;
69  switch (geom_type)
70  {
71  case mapnik::Point:
72  g = new mapnik::point<mapnik::vertex<double, 2> >;
73  case mapnik::LineString:
74  g = new mapnik::line_string<mapnik::vertex<double, 2> , mapnik::vertex_vector2>;
75  case mapnik::Polygon:
76  g = new mapnik::polygon<mapnik::vertex<double, 2>, mapnik::vertex_vector2>;
77  default:
78  std::cerr
79  << "Please fix otb::mapnik_otb::create_geom for mapnik 0.7" << std::endl;
80  }
81  return g;
82 }
83 #else
84 static size_t get_num_layer(const mapnik::Map& map) { return map.layer_count(); }
85 static unsigned get_height(const mapnik::Map& map) { return map.height(); }
86 static unsigned get_width(const mapnik::Map& map) { return map.width(); }
87 typedef mapnik::box2d<double> box2d;
88 static void zoom_to_box(mapnik::Map* map, const mapnik::box2d<double>& envelope)
89 {
90  map->zoom_to_box(envelope);
91 }
92 typedef mapnik::vertex<double, 2> vertex2d;
93 typedef mapnik::geometry<vertex2d> geom;
94 static geom* create_geom(mapnik::eGeomType geom_type) { return new geom(geom_type); }
95 #endif
96 }
97 
101 template <class TVectorData, class TImage>
104  m_StyleList(),
105  m_UseAsOverlay(true),
106  m_RenderingStyleType(OSM)
107 {
108  this->SetNumberOfRequiredInputs(1);
109  m_Spacing.Fill(1.0);
110  m_Origin.Fill(0.0);
111  m_Direction.SetIdentity();
112  m_Size.Fill(0);
113  m_StartIndex.Fill(0);
114  m_SensorModelFlip = 1;
115  m_ScaleFactor = 1.0;
116  m_VectorDataProjectionProj4 = "";
117  m_VectorDataProjectionWKT = "";
118 }
119 
120 template <class TVectorData, class TImage>
121 void
124 {
125  // Process object is not const-correct so the const_cast is required here
127  const_cast<VectorDataType *>(input));
128 }
129 
130 template <class TVectorData, class TImage>
131 void
133 ::SetInput(unsigned int idx, const VectorDataType *input)
134 {
135  // Process object is not const-correct so the const_cast is required here
137  const_cast<VectorDataType *>(input));
138 }
139 
140 template <class TVectorData, class TImage>
144 {
145  if (this->GetNumberOfInputs() < 1)
146  {
147  return 0;
148  }
149 
150  return static_cast<const TVectorData *>
151  (this->itk::ProcessObject::GetInput(0));
152 }
153 
154 template <class TVectorData, class TImage>
157 ::GetInput(unsigned int idx)
158 {
159  return static_cast<const TVectorData *>
160  (this->itk::ProcessObject::GetInput(idx));
161 }
162 
163 //----------------------------------------------------------------------------
164 template <class TVectorData, class TImage>
165 void
167 ::SetSpacing(const SpacingType& spacing)
168 {
169  if (this->m_Spacing != spacing)
170  {
171  this->m_Spacing = spacing;
172  this->Modified();
173  }
174 }
175 
176 //----------------------------------------------------------------------------
177 template <class TVectorData, class TImage>
178 void
180 ::SetSpacing(const double spacing[2])
181 {
182  SpacingType s(spacing);
183  this->SetSpacing(s);
184 }
185 
186 //----------------------------------------------------------------------------
187 template <class TVectorData, class TImage>
188 void
190 ::SetSpacing(const float spacing[2])
191 {
192  itk::Vector<float, 2> sf(spacing);
193  SpacingType s;
194  s.CastFrom(sf);
195  this->SetSpacing(s);
196 }
197 
198 //----------------------------------------------------------------------------
199 template <class TVectorData, class TImage>
200 void
202 ::SetOrigin(const double origin[2])
203 {
204  OriginType p(origin);
205  this->SetOrigin(p);
206 }
207 
208 //----------------------------------------------------------------------------
209 template <class TVectorData, class TImage>
210 void
212 ::SetOrigin(const float origin[2])
213 {
214  itk::Point<float, 2> of(origin);
215  OriginType p;
216  p.CastFrom(of);
217  this->SetOrigin(p);
218 }
219 
223 template <class TVectorData, class TImage>
224 void
227 {
228  // we can't call the superclass method here.
229 
230  // get pointers to the input and output
231  ImagePointer outputPtr = this->GetOutput();
232  if (!outputPtr)
233  {
234  return;
235  }
236 
237  // Set the size of the output region
238  typename TImage::RegionType outputLargestPossibleRegion;
239  outputLargestPossibleRegion.SetSize(m_Size);
240  outputLargestPossibleRegion.SetIndex(m_StartIndex);
241  outputPtr->SetLargestPossibleRegion(outputLargestPossibleRegion);
242 
243  // Set spacing and origin
244  outputPtr->SetSpacing(m_Spacing);
245  outputPtr->SetOrigin(m_Origin);
246  outputPtr->SetDirection(m_Direction);
247 
248  itk::MetaDataDictionary& dict = outputPtr->GetMetaDataDictionary();
249  itk::EncapsulateMetaData<std::string> (dict, MetaDataKey::ProjectionRefKey,
250  static_cast<std::string>(m_VectorDataProjectionWKT));
251 
252  //TODO update or check the projection information
253 
254  return;
255 }
256 
260 template <class TVectorData, class TImage>
261 void
264 {
265 
266  Superclass::BeforeThreadedGenerateData();
267 
268  //Font Handling
269  if(!m_FontFileName.empty())
270  mapnik::freetype_engine::register_font(m_FontFileName);
271 
272  //Handle the style type using helper class
274  styleLoader->SetScaleFactor(m_ScaleFactor);
275 
276  //We assume that all the data are reprojected before using OTB.
277  VectorDataConstPointer input = this->GetInput();
278  //Converting the projection string to the proj.4 format
279  itk::ExposeMetaData<std::string>(
280  input->GetMetaDataDictionary(), MetaDataKey::ProjectionRefKey, m_VectorDataProjectionWKT);
281  otbMsgDebugMacro(<< "WKT -> " << m_VectorDataProjectionWKT);
282 
283  m_SensorModelFlip = 1;
284 
285  if (m_VectorDataProjectionWKT == "")
286  {
287  //We assume that it is an image in sensor model geometry
288  //and tell mapnik that this is utm
289  //(with a resolution of 1m per unit)
290  m_VectorDataProjectionProj4 = "+proj=utm +zone=31 +ellps=WGS84";
291  m_SensorModelFlip = -1;
292  otbMsgDevMacro(<< "The output map will be in sensor geometry");
293  }
294  else
295  {
296  OGRSpatialReferenceH oSRS = OSRNewSpatialReference(m_VectorDataProjectionWKT.c_str());
297  char * pszProj4;
298  OSRExportToProj4(oSRS, &pszProj4);
299  m_VectorDataProjectionProj4 = pszProj4;
300  CPLFree(pszProj4);
301  OSRRelease(oSRS);
302  m_SensorModelFlip = 1;
303  otbMsgDevMacro(<< "The output map will be carto/geo geometry");
304  }
305  otbMsgDebugMacro(<< "Proj.4 -> " << m_VectorDataProjectionProj4);
306 
307  //Internal Tiling Support
308  //Workaround to overcome mapnik maximum tile size limitation
309  ImagePointer output = this->GetOutput();
310  RegionType requestedRegion = output->GetRequestedRegion();
311  otbMsgDevMacro("requestedRegion: " << requestedRegion);
312 
313  m_NbTile = (vcl_pow(std::max(vcl_floor((double)requestedRegion.GetSize()[0] / 16000),
314  vcl_floor((double)requestedRegion.GetSize()[1] / 16000))+1, 2));
315 
316  //std::cout << "nbTile: " << m_NbTile << std::endl;
317  //std::cout << "requestedRegion: " << requestedRegion << std::endl;
318 
319  m_TilingRegions.resize(m_NbTile);
320  m_Maps.resize(m_NbTile);
321  m_VectorDataExtractors.resize(m_NbTile);
322 
323  unsigned int tilingRegionsIdx = 0;
324  unsigned int stdXOffset;
325  unsigned int stdYOffset;
326 
327  stdXOffset = vcl_floor((double)requestedRegion.GetSize()[0]/ (m_NbTile/2))+1;
328  stdYOffset = vcl_floor((double)requestedRegion.GetSize()[1]/ (m_NbTile/2))+1;
329 
330  for(unsigned int i=0; i < vcl_floor((double)(m_NbTile)/2 + 0.5); ++i)
331  {
332  for(unsigned int j=0; j < vcl_floor((double)(m_NbTile)/2 + 0.5); ++j)
333  {
334  //Set Regions
335  SizeType size;
336  IndexType index;
337  if(m_NbTile == 1)
338  {
339  index = requestedRegion.GetIndex();
340  size = requestedRegion.GetSize();
341  }
342  else
343  {
344  index[0] = requestedRegion.GetIndex()[0] + i * stdXOffset;
345  index[1] = requestedRegion.GetIndex()[1] + j * stdYOffset;
346 
347  size[0] = std::min((unsigned int)(requestedRegion.GetSize()[0] - index[0]), stdXOffset);
348  size[1] = std::min((unsigned int)(requestedRegion.GetSize()[1] - index[1]), stdYOffset);
349  }
350  m_TilingRegions[tilingRegionsIdx].SetIndex(index);
351  m_TilingRegions[tilingRegionsIdx].SetSize(size);
352 
353  //std::cout << "tileRegions[" << tilingRegionsIdx << "] : "
354  // << m_TilingRegions[tilingRegionsIdx] << std::endl;
355 
356  //Set Maps
357  m_Maps[tilingRegionsIdx] = mapnik::Map();
358 
360  switch (m_RenderingStyleType)
361  {
362  case OSM:
363  {
364  styleLoader->LoadOSMStyle(m_Maps[tilingRegionsIdx]);
365  if (m_UseAsOverlay)
366  {
367  //Set the default backgroup to transparent
368  m_Maps[tilingRegionsIdx].set_background(mapnik::color(255, 255, 255, 0));
369  }
370  else
371  {
372  m_Maps[tilingRegionsIdx].set_background(mapnik::color("#b5d0d0"));
373  }
374  break;
375  }
376  case Binary:
377  {
378  styleLoader->LoadBinaryRasterizationStyle(m_Maps[tilingRegionsIdx]);
379  //Set the backgroup to white
380  m_Maps[tilingRegionsIdx].set_background(mapnik::color("#ffffff"));
381  break;
382  }
383  default:
384  {
385  itkExceptionMacro(<< "Style Type Not Supported!");
386  break;
387  }
388  }
389 
391  m_Maps[tilingRegionsIdx].set_srs(m_VectorDataProjectionProj4);
392 
393  //Set VectorData extracts
394  m_VectorDataExtractors[tilingRegionsIdx].resize(this->GetNumberOfInputs());
395  for (unsigned int idx = 0; idx < this->GetNumberOfInputs(); ++idx)
396  {
397  if (this->GetInput(idx))
398  {
399  RemoteSensingRegionType rsRegion;
400  SizePhyType sizePhy;
401  sizePhy[0] = size[0] * m_Spacing[0];
402  sizePhy[1] = size[1] * m_Spacing[1];
403  rsRegion.SetSize(sizePhy);
404  OriginType origin;
405  origin[0] = m_Origin[0] + index[0] * m_Spacing[0];
406  origin[1] = m_Origin[1] + index[1] * m_Spacing[1];
407  rsRegion.SetOrigin(origin);
408  rsRegion.SetRegionProjection(m_VectorDataProjectionWKT);
409 
410  //std::cout << "m_SensorModelFlip: " << m_SensorModelFlip << std::endl;
411  //std::cout << "rsTileRegions[" << tilingRegionsIdx << "] : "
412  // << rsRegion << std::endl;
413 
414  m_VectorDataExtractors[tilingRegionsIdx][idx] = VectorDataExtractROIType::New();
415  m_VectorDataExtractors[tilingRegionsIdx][idx]->SetRegion(rsRegion);
416  m_VectorDataExtractors[tilingRegionsIdx][idx]->SetInput(this->GetInput(idx));
417  }
418  }
419 
420  tilingRegionsIdx ++;
421  }
422  }
423 }
424 
428 template <class TVectorData, class TImage>
429 void
432 {
433 
434  this->AllocateOutputs();
435 
436  this->BeforeThreadedGenerateData();
437 
438  if (m_StyleList.size() == 0)
439  {
440  switch (m_RenderingStyleType)
441  {
442  case OSM:
443  {
444  //Add default styles
445  itkExceptionMacro(<< "No style is provided for the vector data");
446  break;
447  }
448  case Binary:
449  {
450  //Add default styles
451  this->AddStyle("binary-rasterization");
452  break;
453  }
454  default:
455  {
456  itkExceptionMacro(<< "No style is provided for the vector data");
457  break;
458  }
459  }
460  }
461 
462  ImagePointer output = this->GetOutput();
463 
464  for (unsigned int tileIdx = 0; tileIdx < m_NbTile; ++tileIdx)
465  {
466  //Delete the previous layers from the map
467  int numberLayer = mapnik_otb::get_num_layer(m_Maps[tileIdx]);
468  for (int i = numberLayer - 1; i >= 0; i--) //yes, int.
469  {
470  m_Maps[tileIdx].removeLayer(i);
471  }
472  m_Maps[tileIdx].resize(m_TilingRegions[tileIdx].GetSize()[0], m_TilingRegions[tileIdx].GetSize()[1]);
473 
474  for (unsigned int vdIdx = 0; vdIdx < this->GetNumberOfInputs(); ++vdIdx)
475  {
476  if (this->GetInput(vdIdx))
477  {
478  datasource_ptr mDatasource = datasource_ptr(new mapnik::memory_datasource);
479 
480  m_VectorDataExtractors[tileIdx][vdIdx]->Update();
481  VectorDataConstPointer input = m_VectorDataExtractors[tileIdx][vdIdx]->GetOutput();
482  InternalTreeNodeType * inputRoot = const_cast<InternalTreeNodeType *>(input->GetDataTree()->GetRoot());
483 
484  ProcessNode(inputRoot, mDatasource);
485  otbMsgDevMacro("Datasource size: " << mDatasource->size());
486 
487  std::stringstream layerName;
488  layerName << "layer-" << tileIdx;
489  mapnik::layer lyr(layerName.str());
490  lyr.set_srs(m_VectorDataProjectionProj4);
491  lyr.set_datasource(mDatasource);
492 
493  for (unsigned int i = 0; i < m_StyleList.size(); ++i)
494  {
495  lyr.add_style(m_StyleList[i]);
496  }
497 
498  m_Maps[tileIdx].addLayer(lyr);
499  }
500  }
501  assert((m_SensorModelFlip == 1) || (m_SensorModelFlip == -1));
502 
503  mapnik_otb::box2d envelope(
504  m_Origin[0] + m_TilingRegions[tileIdx].GetIndex()[0]*m_Spacing[0],
505  m_SensorModelFlip*(m_Origin[1] + m_TilingRegions[tileIdx].GetIndex()[1] * m_Spacing[1]
506  + m_TilingRegions[tileIdx].GetSize()[1] * m_Spacing[1]),
507  m_Origin[0] + m_TilingRegions[tileIdx].GetIndex()[0] * m_Spacing[0]
508  + m_TilingRegions[tileIdx].GetSize()[0] * m_Spacing[0],
509  m_SensorModelFlip*(m_Origin[1] + m_TilingRegions[tileIdx].GetIndex()[1] * m_Spacing[1])
510  );
511 
512  mapnik_otb::zoom_to_box(&m_Maps[tileIdx], envelope);
513  otbMsgDebugMacro(<< "Envelope: " << envelope);
514 
515  otbMsgDebugMacro(<< "Map scale: " << m_Maps[tileIdx].scale_denominator());
516  mapnik::image_32 buf(mapnik_otb::get_width(m_Maps[tileIdx]),
517  mapnik_otb::get_height(m_Maps[tileIdx]));
518  mapnik::agg_renderer<mapnik::image_32> ren(m_Maps[tileIdx], buf);
519  ren.apply();
520 
521  const unsigned char * src = buf.raw_data();
522 
523  itk::ImageRegionIterator<ImageType> it(output, m_TilingRegions[tileIdx]);
524 
525  for (it.GoToBegin(); !it.IsAtEnd(); ++it)
526  {
528  pix[0] = *src;
529  pix[1] = *(src+1);
530  pix[2] = *(src+2);
531  pix[3] = *(src+3);
532  src += 4;
533 
534  it.Set(m_RGBAConverter->Convert(pix));
535  }
536  }
537 }
538 
539 template <class TVectorData, class TImage>
540 void
543 {
544  typedef typename VectorDataType::DataNodeType DataNodeType;
545  typedef typename DataNodeType::Pointer DataNodePointerType;
546 
547  // Get the children list from the input node
548  ChildrenListType children = source->GetChildrenList();
549 
550  // For each child
551  for (typename ChildrenListType::iterator it = children.begin(); it != children.end(); ++it)
552  {
553  // Copy input DataNode info
554  DataNodePointerType dataNode = (*it)->Get();
555 
556  switch (dataNode->GetNodeType())
557  {
558  case otb::ROOT:
559  {
560  ProcessNode((*it), mDatasource);
561  break;
562  }
563  case otb::DOCUMENT:
564  {
565  ProcessNode((*it), mDatasource);
566  break;
567  }
568  case otb::FOLDER:
569  {
570  ProcessNode((*it), mDatasource);
571  break;
572  }
573  case FEATURE_POINT:
574  {
575  mapnik_otb::geom* point = mapnik_otb::create_geom(mapnik::Point);
576 
577  point->move_to(dataNode->GetPoint()[0], m_SensorModelFlip * dataNode->GetPoint()[1]);
578 // std::cout << dataNode->GetPoint()[0] << ", " << dataNode->GetPoint()[1] << std::endl;
579 
580  typedef boost::shared_ptr<mapnik::raster> raster_ptr;
581  typedef mapnik::feature<mapnik_otb::geom, raster_ptr> Feature;
582  typedef boost::shared_ptr<Feature> feature_ptr;
583 
584  feature_ptr mfeature = feature_ptr(new Feature(1));
585  mfeature->add_geometry(point);
586 
587  mapnik::transcoder tr("ISO-8859-15");
588 
589  if (dataNode->HasField("place_name"))
590  boost::put(*mfeature, "name",
591  tr.transcode((dataNode->GetFieldAsString("place_name")).c_str()));
592 
593  boost::put(*mfeature, "place", tr.transcode("city"));
594  boost::put(*mfeature, "capital", tr.transcode("yes")); //FIXME more a question of style
595 
596  boost::put(*mfeature, "geometry", tr.transcode("point"));
597 
598  mDatasource->push(mfeature);
599 
600  break;
601  }
602  case otb::FEATURE_LINE:
603  {
604  mapnik_otb::geom* line = mapnik_otb::create_geom(mapnik::LineString);
605 
606  typedef typename DataNodeType::LineType::VertexListConstIteratorType VertexIterator;
607  VertexIterator itVertex = dataNode->GetLine()->GetVertexList()->Begin();
608  while (itVertex != dataNode->GetLine()->GetVertexList()->End())
609  {
610 // std::cout << itVertex.Value()[0] << ", " << itVertex.Value()[1] << std::endl;
611  line->line_to(itVertex.Value()[0], m_SensorModelFlip * itVertex.Value()[1]);
612  ++itVertex;
613  }
614 
615 // std::cout << "Num points: " << line->num_points() << std::endl;
616 
617  typedef boost::shared_ptr<mapnik::raster> raster_ptr;
618  typedef mapnik::feature<mapnik_otb::geom, raster_ptr> Feature;
619  typedef boost::shared_ptr<Feature> feature_ptr;
620 
621  feature_ptr mfeature = feature_ptr(new Feature(1));
622  mfeature->add_geometry(line);
623 
624  mapnik::transcoder tr("ISO-8859-15");
625 
626  if (dataNode->HasField("name"))
627  boost::put(*mfeature, "name",
628  tr.transcode((dataNode->GetFieldAsString("name")).c_str()));
629  if (dataNode->HasField("NAME"))
630  boost::put(*mfeature, "name",
631  tr.transcode((dataNode->GetFieldAsString("NAME")).c_str()));
632 
633 // std::cout << mfeature->props().size() << std::endl;
634 // std::cout << " -> " << (*mfeature)["name"] << std::endl;
635 
636 // std::cout << "Name: " << dataNode->GetFieldAsString("NAME") << std::endl;
637 // std::cout << "Type: " << dataNode->GetFieldAsString("TYPE") << std::endl;
638 // std::cout << "OSM ID: " << dataNode->GetFieldAsString("osm_id") << std::endl;
639 
640  if (dataNode->HasField("type"))
641  boost::put(*mfeature, "highway",
642  tr.transcode((dataNode->GetFieldAsString("type")).c_str()));
643  if (dataNode->HasField("TYPE"))
644  boost::put(*mfeature, "highway",
645  tr.transcode((dataNode->GetFieldAsString("TYPE")).c_str()));
646 
647  boost::put(*mfeature, "geometry", tr.transcode("line"));
648 
649  mDatasource->push(mfeature);
650 
651  break;
652  }
653  case FEATURE_POLYGON:
654  {
655  mapnik_otb::geom* polygon = mapnik_otb::create_geom(mapnik::Polygon);
656 
657  typedef typename DataNodeType::PolygonType::VertexListConstIteratorType VertexIterator;
658  VertexIterator itVertex = dataNode->GetPolygonExteriorRing()->GetVertexList()->Begin();
659  while (itVertex != dataNode->GetPolygonExteriorRing()->GetVertexList()->End())
660  {
661  polygon->line_to(itVertex.Value()[0], m_SensorModelFlip * itVertex.Value()[1]);
662  ++itVertex;
663  }
664 
665  typedef boost::shared_ptr<mapnik::raster> raster_ptr;
666  typedef mapnik::feature<mapnik_otb::geom, raster_ptr> Feature;
667  typedef boost::shared_ptr<Feature> feature_ptr;
668 
669  feature_ptr mfeature = feature_ptr(new Feature(1));
670  mfeature->add_geometry(polygon);
671 
672  mapnik::transcoder tr("ISO-8859-15");
673 
674  boost::put(*mfeature, "geometry", tr.transcode("polygon"));
675 
676  mDatasource->push(mfeature);
677 
678  break;
679  }
680  case FEATURE_MULTIPOINT:
681  {
682  itkExceptionMacro(
683  << "This type (FEATURE_MULTIPOINT) is not handle (yet) by VectorDataToImageFilter(), please request for it");
684  break;
685  }
686  case FEATURE_MULTILINE:
687  {
688  itkExceptionMacro(
689  << "This type (FEATURE_MULTILINE) is not handle (yet) by VectorDataToImageFilter(), please request for it");
690  break;
691  }
693  {
694  itkExceptionMacro(
695  << "This type (FEATURE_MULTIPOLYGON) is not handle (yet) by VectorDataToImageFilter(), please request for it");
696  break;
697  }
698  case FEATURE_COLLECTION:
699  {
700  itkExceptionMacro(
701  << "This type (FEATURE_COLLECTION) is not handle (yet) by VectorDataToImageFilter(), please request for it");
702  break;
703  }
704  }
705  }
706 }
707 
711 template <class TVectorData, class TImage>
712 void
714 ::PrintSelf(std::ostream& os, itk::Indent indent) const
715 {
716  Superclass::PrintSelf(os, indent);
717 }
718 }
719 
720 #endif

Generated at Sat Mar 8 2014 16:24:35 for Orfeo Toolbox with doxygen 1.8.3.1