<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Hi David,<br>
<br>
How can I visualize the results?<br>
I don't have access to T64.mha, I use
GeodesicActiveContourShapePriorImageFilterOutput4.mha. The slices that
output the extract filter (png files) are "blacks". See the following
code snippets<br>
<br>
//para mostrar un slice<br>
&nbsp;&nbsp;&nbsp; typedef unsigned char OutputPixelType;<br>
&nbsp;&nbsp;&nbsp; typedef itk::Image&lt;OutputPixelType,2&gt; OutputImageType;<br>
<br>
&nbsp;&nbsp;&nbsp; typedef unsigned char InputPixelType;<br>
&nbsp;&nbsp;&nbsp; typedef itk::Image&lt;InputPixelType,3&gt; InputImageType;<br>
<br>
&nbsp;&nbsp;&nbsp; typedef itk::ImageFileReader&lt;InputImageType&gt; ReaderMHAType;<br>
&nbsp;&nbsp;&nbsp; typedef itk::ImageFileWriter&lt;OutputImageType&gt; WriterPNGType;<br>
<br>
&nbsp;&nbsp;&nbsp; ReaderMHAType::Pointer readerMHA=ReaderMHAType::New();<br>
&nbsp;&nbsp;&nbsp; WriterPNGType::Pointer writerPNG=WriterPNGType::New();<br>
<br>
&nbsp;&nbsp;&nbsp; readerMHA-&gt;SetFileName("Energy0.mha");<br>
&nbsp;&nbsp;&nbsp; writerPNG-&gt;SetFileName("slice.png");<br>
<br>
&nbsp;&nbsp;&nbsp; typedef
itk::ExtractImageFilter&lt;InputImageType,OutputImageType&gt;
FilterType;<br>
&nbsp;&nbsp;&nbsp; FilterType::Pointer extractfilter=FilterType::New();<br>
&nbsp;&nbsp;&nbsp; extractfilter-&gt;InPlaceOn();<br>
&nbsp;&nbsp;&nbsp; extractfilter-&gt;SetDirectionCollapseToSubmatrix();<br>
.....<br>
.....<br>
<br>
I think that the problem is here. What am I doing wrong?<br>
<br>
Thank you David.<br>
<em></em><br>
<br>
El 28/06/12 14:58, David Doria escribi&oacute;:
<blockquote
 cite="mid:CABDpjTkYbs_8R=vCowNBHg=tRTKKiG7au7Ny632BFWF9CTAGOg@mail.gmail.com"
 type="cite">
  <pre wrap="">On Thu, Jun 28, 2012 at 1:32 PM, Hernan Ledesma <a
 moz-do-not-send="true" class="moz-txt-link-rfc2396E"
 href="mailto:fledesma@inti.gob.ar">&lt;fledesma@inti.gob.ar&gt;</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi,
I have some trouble using the class
itk::Statistics::ScalarImageToGreyLevelCooccurrenceMatrixGenerator&lt;&gt;
I need to compute the GLCM of an RGB image for texture analysis
I'm doing:
------------------------------------------------------------------------------------------------------------------------------------------------------------
typedef itk::Image&lt;float,2&gt; ScalarImageType;
typedef itk::RGBToLuminanceImageFilter&lt;ProcessingImageType,ScalarImageType&gt;
RGBToScalarFilterType;
RGBToScalarFilterType::Pointer toScalarFilter=RGBToScalarFilterType::New();
toScalarFilter-&gt;SetInput(filter-&gt;GetOutput());
toScalarFilter-&gt;Update();

typedef
itk::Statistics::ScalarImageToGreyLevelCooccurrenceMatrixGenerator&lt;ScalarImageType&gt;
CooccurrenceMatrixGeneratorType;
CooccurrenceMatrixGeneratorType::Pointer
generator=CooccurrenceMatrixGeneratorType::New();
generator-&gt;SetInput(toScalarFilter-&gt;GetOutput());
generator-&gt;SetNormalize(true);
generator-&gt;Compute();
-----------------------------------------------------------------------------------------------------------------------------------------------------------

where ProcessingImageType is the type of a processed image:
-----------------------------------------------------------------------------------------------------------------------------------------------------------
typedef itk::RGBPixel&lt;float&gt; ProcessingPixelType;
typedef itk::Image&lt;ProcessingPixelType,2&gt; ProcessingImageType;
-----------------------------------------------------------------------------------------------------------------------------------------------------------

and filter-&gt;GetOutput() is the processing function (Gradient anisotropic
diffusion filter).
I receive a runtime error at the generator-&gt;Compute(). What I'm doing bad?

Thanks.

Hern&aacute;n Ledesma.
    </pre>
  </blockquote>
  <pre wrap="">That class seems to have been replaced by:

<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.itk.org/Doxygen/html/classitk_1_1Statistics_1_1ScalarImageToCooccurrenceMatrixFilter.html">http://www.itk.org/Doxygen/html/classitk_1_1Statistics_1_1ScalarImageToCooccurrenceMatrixFilter.html</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.itk.org/Wiki/ITK/Examples/Statistics/TextureFeatures">http://www.itk.org/Wiki/ITK/Examples/Statistics/TextureFeatures</a>

David

  </pre>
</blockquote>
<br>
</body>
</html>