[Insight-users] question about itk::Histogram

Luis Ibanez luis.ibanez at kitware.com
Fri, 06 Feb 2004 08:17:47 -0500


Hi Johny,

mmm, you haven't done your homework...

If you look at the example in

      ImageHistogram1.cxx

You will notice that you can compute the
histogram of a char image, and in general
any image with scalar or vector type.


Please look at the example and give it a try.


Thanks


    Luis


--------------------------
Zhuang Song wrote:
> Thanks for the help.  But it seems to have another problem.
>  itkHistogram can work  only if the MeasurementVectorType is float.
> unsigned char type data from images can't be accepted in the listsample.
> Is it supposed to be?
> 
> 
> On Thu, 5 Feb 2004, Luis Ibanez wrote:
> 
> 
>>Hi Johny,
>>
>>
>>Please look at the example
>>
>>     Insight/Examples/Statistics/
>>                        ImageHistogram1.cxx
>>
>>Since you already put the voxel values into a sample,
>>you can skip the part of the code in this example that
>>is using the ScalarImageToListAdaptor. Just start by
>>using the class
>>
>>      ListSampleToHistogramGenerator<>
>>
>>http://www.itk.org/Insight/Doxygen/html/classitk_1_1Statistics_1_1ListSampleToHistogramGenerator.html
>>
>>
>>
>>
>>Regards,
>>
>>
>>   Luis
>>
>>
>>-------------------
>>Zhuang Song wrote:
>>
>>
>>>Hi,
>>>I want to obtain the histogram of intensities of some voxels in an image.
>>>I have push the data into a sample, but I can't find a function to
>>>feed the sample into itk::Hisrogram object. How does it work?
>>>
>>>thanks,
>>>Johnny
>>>
>>>_______________________________________________
>>>Insight-users mailing list
>>>Insight-users at itk.org
>>>http://www.itk.org/mailman/listinfo/insight-users
>>>
>>
>>
>>
>