<div dir="ltr"><div><div><div><div>Hello, <br></div>I want to implement new texture analysis in c++ Grey size zone matrix.<br></div>I succeed to create a 2d matrix with the corresponding value. Now, the goal is to transform it to an histogram and to use it with itkHistogramToRunLengthFeaturesFilter to extract the features.<br></div>Unfortunately a problem appaers when  i use SetFrequency to store the value of the matrix to the histogram. <br><br>invalid conversion from ‘int*’ to ‘itk::Statistics::Histogram<float, itk::Statistics::DenseFrequencyContainer2>::InstanceIdentifier {aka long unsigned int}’ [-fpermissive]<br>              histogram->SetFrequency(index, frequency);<br><br></div>i try to remplace the matrix value by 0 or 2.0 and it didn't work either.<br><div><br>Here the part of the code:<br><br>typedef  itk::Statistics::SparseFrequencyContainer2 FrequencyContainerType;<br>typedef  FrequencyContainerType::AbsoluteFrequencyType FrequencyType;<br><br>typedef itk::Statistics::Histogram< float, FrequencyContainerType> HistogramType;<br><br>     unsigned int numberOfComponents=2;<br>     HistogramType::Pointer histogram = HistogramType::New();<br><br>     HistogramType::SizeType size(numberOfComponents);<br>     size[0]=D;<br>     size[1]=Max_volume;<br><br>     HistogramType::MeasurementVectorType lowerBound(numberOfComponents);<br>     lowerBound[0]=1;<br>     lowerBound[1]=1;<br>     HistogramType::MeasurementVectorType upperBound(numberOfComponents);<br>     upperBound[0]=D;<br>     upperBound[1]=Max_volume;<br><br>     histogram->Initialize(size, lowerBound, upperBound );<br>     histogram->SetToZero();<br><br>     int index[2];<br>     for(int level_Grey=0; level_Grey<D; level_Grey++ )<br>     {<br>         for(int N=0; N<Max_volume;N++)<br>         {<br>             index[0]=level_Grey;<br>             index[1]=N;<br>             histogram->SetFrequency(index, static_cast<FrequencyType>(Z[level_Grey][N]));<br>         }<br>     }<br><br></div><div>Thanks you,<br></div><div><p class="MsoNormal">
<b><span style="font-size:9pt;font-family:"Lucida Sans Unicode","sans-serif";color:rgb(95,96,74)">Cyril Jaudet<br>
</span></b><span style="font-size:9pt;font-family:"Lucida Sans Unicode","sans-serif";color:rgb(95,96,74)">Medical physicist, phd</span></p>

<span style="font-size:9pt;font-family:"Lucida Sans Unicode","sans-serif";color:rgb(95,96,74)"><br>
<a href="mailto:cyril.jaudet@uzbrussel.be" target="_blank"><span style="color:blue"><span><span class="">cyril.jaudet@uzbrussel.be</span></span></span></a><br>
<br>
Laarbeeklaan 101 - 1090 Brussel<br>
Tel 02 477 52 35 - Fax 02 477 YY YY<br>
<br>
<a href="http://www.uzbrussel.be/" target="_blank"><span style="color:rgb(95,96,74);text-decoration:none">www.uzbrussel.be</span></a></span></div><div> <br></div></div>