[Insight-developers] Re: [Insight-users]
ScalarImageToHistogramGenerator with mask support
Gaëtan Lehmann
gaetan.lehmann at jouy.inra.fr
Sat Nov 25 12:32:02 EST 2006
Hi,
I have modified ScalarImageToHistogramGenerator to support the mask
feature, with Karthik's class. The code is available at:
http://voxel.jouy.inra.fr/darcs/contrib-itk/kappaSigmaThreshold/itkScalarImageToHistogramGenerator.h
http://voxel.jouy.inra.fr/darcs/contrib-itk/kappaSigmaThreshold/itkScalarImageToHistogramGenerator.txx
Gaetan
Le Fri, 24 Nov 2006 20:05:25 +0100, Karthik Krishnan
<karthik.krishnan at kitware.com> a écrit:
> On 11/22/06, Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr> wrote:
>>
>>
>> Hi,
>>
>> I need to generate an histogram of an image, but only in a mask... and
>> ScalarImageToHistogramGenerator doesn't support masks.
>>
>> Is there a class to do that in ITK ?
>
>
> Sorry for the late reply.
> Yes, I wrote a bunch of classes to do that.. but its not in ITK yet..
>
> The class you're looking for below is itk::ImageToListGenerator that
> takes a
> scalar image and generates a list sample and optionally accepts a mask as
> well, which is specified, the class will generate list samples confined
> to
> the mask. Once you have that sample (itk::ListSample), you can use the
> usual
> ITK classes to do what you want with it, for instance generating a
> histogram.. For example, below this class is used to generate K-means
> within
> the mask.
>
> http://www.na-mic.org:8000/websvn/filedetails.php?repname=NAMICSandBox&path=%2Ftrunk%2FBayesianSegmentationModule%2FitkImageToListGenerator.h&rev=1106&sc=0
> http://www.na-mic.org:8000/websvn/filedetails.php?repname=NAMICSandBox&path=%2Ftrunk%2FBayesianSegmentationModule%2FitkImageToListGenerator.txx&rev=0&sc=0
> http://www.na-mic.org:8000/websvn/filedetails.php?repname=NAMICSandBox&path=%2Ftrunk%2FBayesianSegmentationModule%2FitkImageToListGeneratorTest.cxx&rev=0&sc=0
> http://www.na-mic.org:8000/websvn/filedetails.php?repname=NAMICSandBox&path=%2Ftrunk%2FBayesianSegmentationModule%2FitkScalarImageKmeansImageFilterWithMask.h&rev=0&sc=0
> http://www.na-mic.org:8000/websvn/filedetails.php?repname=NAMICSandBox&path=%2Ftrunk%2FBayesianSegmentationModule%2FitkScalarImageKmeansImageFilterWithMask.txx&rev=0&sc=0
>
> If you want, I can add it to ITK in a couple of days.. It'll be good if
> you
> can look at the code and see if it suits your needs.
>
> Thanks
> Regards
> -karthik
>
> A quick look at the code used in ScalarImageToHistogramGenerator show
> that
>> the changes to implement that feature will not be easy.
>> I would be pleased to write the code to implement that feature, but as
>> I'm
>> not familiar with the satistic framework, I would appreciate some advice
>> about the way to go.
>>
>> Thanks,
>>
>> Gaetan
>>
>>
>> --
>> Gaëtan Lehmann
>> Biologie du Développement et de la Reproduction
>> INRA de Jouy-en-Josas (France)
>> tel: +33 1 34 65 29 66 fax: 01 34 65 29 09
>> http://voxel.jouy.inra.fr
>> _______________________________________________
>> Insight-users mailing list
>> Insight-users at itk.org
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>
>
>
--
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66 fax: 01 34 65 29 09
http://voxel.jouy.inra.fr
More information about the Insight-developers
mailing list