Commit a4c8cd89e7156ec63210209c44eca9dcb6363315

Authored by Pierre Lassalle
1 parent 1de43c4f
Exists in master

Remove useless code.

Showing 1 changed file with 0 additions and 66 deletions   Show diff stats
Code/lsrmGraphToOtbImage.txx
... ... @@ -54,72 +54,6 @@ namespace lsrm
54 54  
55 55 return fillFilter->GetOutput();
56 56 }
57   -
58   - /*template<class TGraph>
59   - typename GraphToOtbImage<TGraph>::ClusteredImageType::Pointer
60   - GraphToOtbImage<TGraph>::GetClusteredOutput(const GraphType& graph,
61   - const unsigned int width,
62   - const unsigned int height)
63   - {
64   - ClusteredImageType::IndexType index;
65   - ClusteredImageType::SizeType size;
66   - ClusteredImageType::RegionType region;
67   -
68   - index[0] = 0; index[1] = 0;
69   - size[0] = width; size[1] = height;
70   - region.SetIndex(index);
71   - region.SetSize(size);
72   -
73   - ClusteredImageType::Pointer clusterImg = ClusteredImageType::New();
74   - clusterImg->SetRegions(region);
75   - clusterImg->SetNumberOfComponentsPerPixel(3);
76   - clusterImg->Allocate();
77   -
78   - ClusteredImageType::PixelType pixelValue;
79   - pixelValue.Reserve(3);
80   - pixelValue[0] = 0;
81   - pixelValue[1] = 0;
82   - pixelValue[2] = 0;
83   -
84   - using ClusterImageIterator = itk::ImageRegionIterator<ClusteredImageType>;
85   - ClusterImageIterator it(clusterImg, clusterImg->GetLargestPossibleRegion());
86   - for(it.GoToBegin();!it.IsAtEnd(); ++it)
87   - it.Set(pixelValue);
88   -
89   - srand(time(NULL));
90   - unsigned char c1, c2, c3;
91   - for(auto& region : graph.m_Nodes)
92   - {
93   - c1 = rand() % 256;
94   - c2 = rand() % 256;
95   - c3 = rand() % 256;
96   -
97   - lp::CellLists borderPixels;
98   - ContourOperator::GenerateBorderCells(borderPixels, region->m_Contour, region->m_Id, width);
99   -
100   - for (auto& pix : borderPixels)
101   - {
102   - index[0] = pix % width;
103   - index[1] = pix / width;
104   - pixelValue[0] = c1;
105   - pixelValue[1] = c2;
106   - pixelValue[2] = c3;
107   - clusterImg->SetPixel(index, pixelValue);
108   - }
109   - }
110   -
111   -
112   - for(it.GoToBegin(); !it.IsAtEnd(); ++it)
113   - {
114   - auto pixel = it.Get();
115   - if(pixel[0] == 0 && pixel[1] == 0 && pixel[2] == 0)
116   - it.Set(pixelValue);
117   - else
118   - pixelValue = pixel;
119   - }
120   -
121   - return clusterImg;
122   - }*/
123 57  
124 58 } // end of namespace lsrm
125 59 #endif
... ...