Commit 6f3df317dfd1b15d09d06cab72ec130b7d1d67c9

Authored by Pierre Lassalle
1 parent 10eef79f
Exists in master

Write label image instead of clustered image.

Showing 1 changed file with 7 additions and 7 deletions   Show diff stats
Code/lsgrmGraphOperations.txx
... ... @@ -81,13 +81,13 @@ namespace lsgrm
81 81 // Write output graph to the output graph directory
82 82 WriteGraph<TSegmenter>(segmenter.m_Graph, outputGraphDirectory, 0, 0);
83 83  
84   - typedef unsigned char ClusterPixelType;
85   - typedef otb::VectorImage<ClusterPixelType, 2> ClusterImageType;
86   - typedef otb::ImageFileWriter<ClusterImageType> ClusterImageWriterType;
87   - auto clusterWriter = ClusterImageWriterType::New();
88   - clusterWriter->SetFileName("out/finalimage.png");
89   - clusterWriter->SetInput(segmenter.GetClusteredImageOutput());
90   - clusterWriter->Update();
  84 + typedef unsigned long int LabelPixelType;
  85 + typedef otb::Image<LabelPixelType, 2> LabelImageType;
  86 + typedef otb::ImageFileWriter<LabelImageType> LabelImageWriterType;
  87 + auto labelWriter = LabelImageWriterType::New();
  88 + labelWriter->SetFileName("out/labelImage.tiff");
  89 + labelWriter->SetInput(segmenter.GetLabeledClusteredImageOutput());
  90 + labelWriter->Update();
91 91 }
92 92  
93 93 template<class TSegmenter>
... ...