[Insight-users] question about itk::Histogram

Luis Ibanez luis.ibanez at kitware.com
Fri, 06 Feb 2004 13:51:01 -0500


Hi Johny,

You probably are using ITK 1.4 or older.
This may be a good oportunity for you to
upgrade to ITK 1.6.

You will find the usual .zip and .tar.gz
file in the Download page at www.itk.org,
you can also cvs update using the tag ITK-1-6.


Another way of getting these new examples is through
web-cvs. The Examples/Statistics directory is at
http://www.itk.org/cgi-bin/cvsweb.cgi/Insight/Examples/Statistics/?cvsroot=Insight

Please try updating you ITK and let us
know if you find any problems.


Thanks


    Luis,



--------------------

Zhuang Song wrote:

> Hi Luis,
> Sorry. I didn't find ImageHistogram1.cxx in my old version ITK.
> I only found the example in ListSampleToHistogramGenerator.cxx.
> but I find ImageHistogram1.cxx file after I update ITK, in the latest
> version.
> 
> I got the error message when I used PushBack to feed data to
> listsample, without using ScalarImageToListAdaptor, because I
> dont need the whole image. I may test it more later.
> 
> thanks,
> Johnny
> 
> 
> 
> On Fri, 6 Feb 2004, Luis Ibanez wrote:
> 
> 
>>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
>>>>>
>>>>
>>>>
>>>>
>>
>>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>