[Insight-users] ScalarImageTextureCalculator

Zachary Pincus zpincus at stanford.edu
Wed Sep 14 18:23:22 EDT 2005


I can't give you any definitive answers without seeing the entire  
code, but here are several thoughts:

(1) Are you using the SetInsidePixelValue() method of the texture  
calculator to tell it which mask pixels correspond to regions that  
the calculator should use?

(2) Can you try a simpler case (a) without the mask image, and (b)  
without cropping the images? It would be best to try to isolate the  
problem with as simple a test case as possible.

(3) Could you send the entire code that deals with the texture  
calculations? Maybe there's a problem elsewhere not in the snippet  
below.


Zach Pincus

Program in Biomedical Informatics and Department of Biochemistry
Stanford University School of Medicine


On Sep 14, 2005, at 12:21 AM, <Aster.Wardhani at csiro.au>  
<Aster.Wardhani at csiro.au> wrote:

> Hi,
>
> I am using ScalarImageTextureCalculator to compute textural  
> features from a CT slice.
>
> I initially segment the slice using region growing. The source  
> image is then divided into blocks of say 8x8. A mask image and each  
> block (obtained using ExtractImageFilter) is fed into the  
> ScalarImageTextureCalculator but all features received are all  
> zeros. Below is a snippet of the code.
>
> ---------------------------------------------------------------------- 
> ------------
>
> // Extract Image Filter
>
> CropFilterType::Pointer crop_filter = CropFilterType::New();
>
> crop_filter->SetInput( _srcImage );
>
> // ScalarImageTextureCalculator
>
> textureMeasureType::Pointer texture_measure =  
> textureMeasureType::New();
>
> texture_measure->FastCalculationsOn();
>
> texture_measure->SetImageMask( _maskImage );    // label image
>
> texture_measure->SetNumberOfBinsPerAxis( 16 );
>
> texture_measure->SetInsidePixelValue( 255 );
>
> // for loop…(etc. omitted)
>
> block.SetSize( size );
>
> block.SetIndex( start );
>
>
>         crop_filter->SetExtractionRegion( block );
>
>         crop_filter->UpdateLargestPossibleRegion();
>
>         texture_measure->SetInput( crop_filter->GetOutput() );
>
>         texture_measure->Compute();
>
>         feature_vector = texture_measure->GetFeatureMeans();
>
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>



More information about the Insight-users mailing list