<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6603.0">
<TITLE>ScalarImageTextureCalculator</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P ALIGN=LEFT><SPAN LANG="en-au"><FONT SIZE=2 FACE="Arial">Hi,</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"><FONT SIZE=2 FACE="Arial">I am using</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"> <FONT SIZE=2 FACE="Courier New">ScalarImageTextureCalculator</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"><FONT SIZE=2 FACE="Courier New"> to compute textural features from a CT slice</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"><FONT SIZE=2 FACE="Courier New">.</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"><FONT SIZE=2 FACE="Courier New">I initially segment the slice using region growing. The source image is then divided into blocks of say 8x8.</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"> <FONT SIZE=2 FACE="Courier New">A mask image and e</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"><FONT SIZE=2 FACE="Courier New">ach block (obtained using ExtractImageFilter)</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"> <FONT SIZE=2 FACE="Courier New">is fed into</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"> <FONT SIZE=2 FACE="Courier New">the</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"> <FONT SIZE=2 FACE="Courier New">ScalarImageTextureCalculator</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"><FONT SIZE=2 FACE="Courier New"> but all features received are all zeros. Below is a snippet of the code.</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"><FONT SIZE=2 FACE="Courier New">----------------------------------------------------------------------------------</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"><FONT SIZE=2 FACE="Courier New">// Extract Image Filter</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"><FONT SIZE=2 FACE="Courier New">CropFilterType::Pointer crop_filter = CropFilterType::New();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"><FONT SIZE=2 FACE="Courier New">crop_filter->SetInput( _srcImage );</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"><FONT SIZE=2 FACE="Courier New">//</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"> <FONT SIZE=2 FACE="Courier New">ScalarImageTextureCalculator</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"><FONT SIZE=2 FACE="Courier New">textureMeasureType::Pointer texture_measure = textureMeasureType::New();</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"><FONT SIZE=2 FACE="Courier New">texture_measure->FastCalculationsOn();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"><FONT SIZE=2 FACE="Courier New">texture_measure->SetImageMask( _maskImage );</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"> <FONT SIZE=2 FACE="Courier New">// label image</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"><FONT SIZE=2 FACE="Courier New">texture_measure->SetNumberOfBinsPerAxis(</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"> <FONT SIZE=2 FACE="Courier New">16</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"><FONT SIZE=2 FACE="Courier New"> );</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"><FONT SIZE=2 FACE="Courier New">texture_measure->SetInsidePixelValue(</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"> <FONT SIZE=2 FACE="Courier New">255</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"><FONT SIZE=2 FACE="Courier New"> );</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"><FONT SIZE=2 FACE="Courier New">// for loop</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"><FONT SIZE=2 FACE="Courier New">…</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"><FONT SIZE=2 FACE="Courier New">(</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"><FONT SIZE=2 FACE="Courier New">etc.</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"> <FONT SIZE=2 FACE="Courier New">omitted)</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"><FONT SIZE=2 FACE="Courier New">block.SetSize( size );</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"><FONT SIZE=2 FACE="Courier New">block.SetIndex( start );</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"> </SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"> <FONT SIZE=2 FACE="Courier New">crop_filter->SetExtractionRegion( block );</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"> <FONT SIZE=2 FACE="Courier New">crop_filter->UpdateLargestPossibleRegion();</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"> </SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"> <FONT SIZE=2 FACE="Courier New">texture_measure->SetInput( crop_filter->GetOutput() );</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"> <FONT SIZE=2 FACE="Courier New">texture_measure->Compute();</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"> </SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"> <FONT SIZE=2 FACE="Courier New">feature_vector = texture_measure->GetFeatureMeans();</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"> </SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"> </SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"> </SPAN></P>
</BODY>
</HTML>