Dear ITK Users,<div><br></div><div>When i run this code, </div><div><div><br></div><div>//#include &lt;itkDenseFrequencyContainer2.h&gt;</div><div>#include &quot;itkHistogramToTextureFeaturesFilter.h&quot;</div><div>#include &quot;itkScalarImageToCooccurrenceMatrixFilter.h&quot;</div>
</div><div><br></div><div><div>typedef itk::Neighborhood&lt;float, Dimension&gt; NeighborhoodType;</div><div>typedef itk::Statistics::ScalarImageToCooccurrenceMatrixFilter&lt; FloatImageType &gt; Image2CoOccuranceType;</div>
<div>typedef Image2CoOccuranceType::HistogramType HistogramType;</div><div>typedef itk::Statistics::HistogramToTextureFeaturesFilter&lt;HistogramType&gt; Hist2FeaturesType;</div><div>typedef FloatImageType::OffsetType OffsetType;</div>
<div>typedef itk::AddImageFilter &lt; FloatImageType &gt; AddImageFilterType;</div><div>typedef itk::MultiplyImageFilter&lt; FloatImageType &gt; MultiplyImageFilterType;</div></div><div><br></div><div><div>void calcTextureFeatureImage (OffsetType offset, FloatImageType::Pointer inputImage, FloatImageType::Pointer outInertia, </div>
<div><span class="Apple-tab-span" style="white-space:pre">                                                        </span>  FloatImageType::Pointer outCorrelation, FloatImageType::Pointer outEnergy)</div><div>{</div><div>    //allocate output images</div><div>    outInertia-&gt;CopyInformation(inputImage);</div>
<div>    outInertia-&gt;SetRegions(inputImage-&gt;GetLargestPossibleRegion());</div><div>    outInertia-&gt;Allocate();</div><div>    outInertia-&gt;FillBuffer(0);</div><div>    outCorrelation-&gt;CopyInformation(inputImage);</div>
<div>    outCorrelation-&gt;SetRegions(inputImage-&gt;GetLargestPossibleRegion());</div><div>    outCorrelation-&gt;Allocate();</div><div>    outCorrelation-&gt;FillBuffer(0);</div><div>    outEnergy-&gt;CopyInformation(inputImage);</div>
<div>    outEnergy-&gt;SetRegions(inputImage-&gt;GetLargestPossibleRegion());</div><div>    outEnergy-&gt;Allocate();</div><div>    outEnergy-&gt;FillBuffer(0);</div><div> </div><div>    Image2CoOccuranceType::Pointer glcmGenerator=Image2CoOccuranceType::New();</div>
<div>    glcmGenerator-&gt;SetOffset(offset);</div><div>    glcmGenerator-&gt;SetNumberOfBinsPerAxis(16); //reasonable number of bins</div><div>    glcmGenerator-&gt;SetPixelValueMinMax(0, 255); //for input UCHAR pixel type</div>
<div>    Hist2FeaturesType::Pointer featureCalc=Hist2FeaturesType::New();</div><div> </div><div>    typedef itk::RegionOfInterestImageFilter&lt;FloatImageType,FloatImageType&gt; roiType;</div><div>    roiType::Pointer roi=roiType::New();</div>
<div>    roi-&gt;SetInput(inputImage);</div><div> </div><div>    FloatImageType::RegionType window;</div><div>    FloatImageType::RegionType::SizeType size;</div><div>    size.Fill(3); //window size=3x3x3</div><div>    window.SetSize(size);</div>
<div>    FloatImageType::IndexType pi; //pixel index</div><div> </div><div>    //slide window over the entire image</div><div>    for (unsigned x=1; x&lt;inputImage-&gt;GetLargestPossibleRegion().GetSize(0)-1; x++)</div><div>
    {</div><div>        pi.SetElement(0,x);</div><div>        window.SetIndex(0,x-1);</div><div>        for (unsigned y=1; y&lt;inputImage-&gt;GetLargestPossibleRegion().GetSize(1)-1; y++)</div><div>        {</div><div>            pi.SetElement(1,y);</div>
<div>            window.SetIndex(1,y-1);</div><div>            for (unsigned z=1; z&lt;inputImage-&gt;GetLargestPossibleRegion().GetSize(2)-1; z++)</div><div>            {</div><div>                pi.SetElement(2,z);</div>
<div>                window.SetIndex(2,z-1);</div><div>                roi-&gt;SetRegionOfInterest(window);</div><div>                roi-&gt;Update();</div><div>                glcmGenerator-&gt;SetInput(roi-&gt;GetOutput());</div>
<div>                glcmGenerator-&gt;Update();</div><div>                featureCalc-&gt;SetInput( glcmGenerator-&gt;GetOutput() );</div><div>                featureCalc-&gt;Update();</div><div> </div><div>                outInertia-&gt;SetPixel(pi, featureCalc-&gt;GetFeature(Hist2FeaturesType::Inertia));</div>
<div>                outCorrelation-&gt;SetPixel(pi, featureCalc-&gt;GetFeature(Hist2FeaturesType::Correlation));</div><div>                outEnergy-&gt;SetPixel(pi, featureCalc-&gt;GetFeature(Hist2FeaturesType::Energy));</div>
<div>            }</div><div>        }</div><div>        std::cout&lt;&lt;&#39;.&#39;;</div><div>    }</div><div>}</div></div><div><br></div><div>void main()</div><div>{</div><div><div>        NeighborhoodType neighborhood;</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>neighborhood.SetRadius(1);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>unsigned int centerIndex = neighborhood.GetCenterNeighborhoodIndex();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>OffsetType offset;</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>WriterType::Pointer writer=WriterType::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>char buf[64];</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>for ( unsigned int d = 0; d &lt; centerIndex; d++ )</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>{</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>offset = neighborhood.GetOffset(d);</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>InternalImageType::Pointer inertia=InternalImageType::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>InternalImageType::Pointer correlation=InternalImageType::New();</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>InternalImageType::Pointer energy=InternalImageType::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>calcTextureFeatureImage(offset, image, inertia, correlation, energy);</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>writer-&gt;SetInput(inertia);</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>snprintf(buf, 100, &quot;Inertia%u.mha&quot;, d);</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>writer-&gt;SetFileName(buf);</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>writer-&gt;Update();</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>writer-&gt;SetInput(correlation);</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>snprintf(buf, 100, &quot;Correlation%u.mha&quot;, d);</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>writer-&gt;SetFileName(buf);</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>writer-&gt;Update();</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>writer-&gt;SetInput(energy);</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>snprintf(buf, 100, &quot;Energy%u.mha&quot;, d);</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>writer-&gt;SetFileName(buf);</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>writer-&gt;Update();</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>std::cout&lt;&lt;&#39;\n&#39;;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div>
</div><div>}</div><div><br></div><div>i found following error msg: </div><div><br></div><div><div>H:\ITK\ITK\Code\Review\Statistics\itkDenseFrequencyContainer2.h(58) : error C2039: &#39;InstanceIdentifier&#39; : is not a member of &#39;itk::MeasurementVectorTraits&#39;</div>
<div>2&gt;        h:\itk\itk\code\numerics\statistics\itkMeasurementVectorTraits.h(44) : see declaration of &#39;itk::MeasurementVectorTraits&#39;</div><div>2&gt;H:\ITK\ITK\Code\Review\Statistics\itkDenseFrequencyContainer2.h(58) : error C2146: syntax error : missing &#39;;&#39; before identifier &#39;InstanceIdentifier&#39;</div>
<div>2&gt;H:\ITK\ITK\Code\Review\Statistics\itkDenseFrequencyContainer2.h(58) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int</div><div>2&gt;H:\ITK\ITK\Code\Review\Statistics\itkDenseFrequencyContainer2.h(58) : error C2602: &#39;itk::Statistics::DenseFrequencyContainer2::InstanceIdentifier&#39; is not a member of a base class of &#39;itk::Statistics::DenseFrequencyContainer2&#39;</div>
<div>2&gt;        H:\ITK\ITK\Code\Review\Statistics\itkDenseFrequencyContainer2.h(58) : see declaration of &#39;itk::Statistics::DenseFrequencyContainer2::InstanceIdentifier&#39;</div><div>2&gt;        H:\ITK\ITK\Code\Review\Statistics\itkDenseFrequencyContainer2.h(42) : see declaration of &#39;itk::Statistics::DenseFrequencyContainer2&#39;</div>
<div><br></div><div><br></div><div><br></div>-- <br><font face="arial, helvetica, sans-serif">-- <br>Best Regards, <br><br></font><div><b><font face="arial, helvetica, sans-serif">HUMAYUN IRSHAD</font></b></div><div><span style="border-collapse:collapse"><b><span style="border-collapse:separate;font-weight:normal"><div>
<span style="border-collapse:collapse"><b><span style="border-collapse:separate;font-weight:normal"><div style="display:inline!important"><span style="border-collapse:collapse"><b><span style="border-collapse:separate;font-weight:normal"><font face="arial, helvetica, sans-serif">PhD student, University of Joseph Fourier, Grenoble, France</font></span></b></span></div>
</span></b></span></div></span></b></span><span style="border-collapse:collapse"><b><span style="border-collapse:separate;font-weight:normal"><div style="display:inline!important"><span style="border-collapse:collapse"><b><span style="border-collapse:separate;font-weight:normal"><div style="display:inline!important">
<span style="border-collapse:collapse"><b><span style="border-collapse:separate;font-weight:normal"><font face="arial, helvetica, sans-serif">Research Engineer, </font></span></b></span></div></span></b></span></div></span></b></span><span style="border-collapse:collapse"><b><span style="border-collapse:separate;font-weight:normal"><div style="display:inline!important">
<span style="border-collapse:collapse"><b><span style="border-collapse:separate;font-weight:normal"><font face="arial, helvetica, sans-serif">IPAL – Image &amp; Pervasive Access Lab, Singapore</font></span></b></span></div>
</span></b></span><span style="border-collapse:collapse"><b><span style="border-collapse:separate;font-weight:normal"><div><span style="border-collapse:collapse"><b><span style="border-collapse:separate;font-weight:normal"><font face="arial, helvetica, sans-serif">UMI CNRS (I2R/A*STAR, NUS, UJF, UPMC, IT)</font></span></b></span></div>
<div><div><div><span style="border-collapse:collapse"><font face="arial, helvetica, sans-serif"><div><span style="border-collapse:collapse"><br></span></div>Institute for Infocomm Research (I2R)<br>1 Fusionopolis Way<br>#10-19 Connexis South Tower<br>
Singapore 138632<br>Tel:+65-65162864</font></span></div></div></div><div><span style="border-collapse:collapse"><font face="arial, helvetica, sans-serif">Cell: +65-83851671</font></span></div><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><br>
</span></div></span></b></span></div><br>
</div>