<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi,<br>
I have some trouble using the class
itk::Statistics::ScalarImageToGreyLevelCooccurrenceMatrixGenerator<><br>
I need to compute the GLCM of an RGB image for texture analysis<br>
I<span class="st">'m doing:<br>
------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
typedef itk::Image<float,2> ScalarImageType;<br>
typedef
itk::RGBToLuminanceImageFilter<ProcessingImageType,ScalarImageType>
RGBToScalarFilterType;<br>
RGBToScalarFilterType::Pointer
toScalarFilter=RGBToScalarFilterType::New();<br>
toScalarFilter->SetInput(filter->GetOutput());<br>
toScalarFilter->Update();<br>
<br>
typedef
itk::Statistics::ScalarImageToGreyLevelCooccurrenceMatrixGenerator<ScalarImageType>
CooccurrenceMatrixGeneratorType;<br>
CooccurrenceMatrixGeneratorType::Pointer
generator=CooccurrenceMatrixGeneratorType::New();<br>
generator->SetInput(toScalarFilter->GetOutput());<br>
generator->SetNormalize(true);<br>
generator->Compute();<br>
-----------------------------------------------------------------------------------------------------------------------------------------------------------<br>
<br>
where </span><span class="st">ProcessingImageType is the type of a
processed image:<br>
-----------------------------------------------------------------------------------------------------------------------------------------------------------<br>
typedef itk::RGBPixel<float> ProcessingPixelType;<br>
typedef itk::Image<ProcessingPixelType,2> ProcessingImageType;<br>
-----------------------------------------------------------------------------------------------------------------------------------------------------------<br>
<br>
and </span><span class="st">filter->GetOutput() is the processing
function (</span><span class="st">Gradient <em>anisotropic diffusion</em></span><span
class="st"> filter).<br>
</span><span class="st"> I receive a <em>runtime error</em> at the</span>
<span class="st">generator->Compute(). What I</span><span class="st">'</span><span
class="st">m doing bad?</span><br>
<br>
Thanks.<br>
<br>
Hernán Ledesma.<br>
<span class="st"><br>
</span>
</body>
</html>