[Insight-users] question about itk::Histogram

Zhuang Song songz at seas.upenn.edu
Fri, 6 Feb 2004 11:36:21 -0500 (EST)


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
> >>>
> >>
> >>
> >>
> >
>
>
>