[ITK] Colocalization of bacteria and lysosome

Michael Meuli michael.meuli at gmail.com
Thu Dec 11 04:25:50 EST 2014


Hi all,

thanks a lot for your responses. I think the results are correct, but
there's a bug in the 2D "heat map" which should actually serve to
visually verify that the program is running correct.

Actually yesterday I fully evaluated my experiment with the output of
my little program and for the first time could see the effect we
wanted to see and which I wasn't fully able to demonstrate using
Imaris.
As it's my first programm which does something useful I really like it
and I wanted to thank all the itk people for this cool toolkit and for
all the help!

Some synthetic images for testing would be nice but I've no idea how
to draw a 3D bacterium. Are there some tools or programms available?
Also I don't get it how to write a test. If somebody could point me to
a nice starting point would be nice.

Best regards
Michael


On 8 December 2014 at 16:18, Girish Mallya Udupi
<indianzeppelin at gmail.com> wrote:
> Hi Michael,
>
> That snippet of code should do what you expect (although, as Brad suggested,
> it would be a good idea to validate it). "image3Dred" is used as the feature
> image. This is the image from which the statistics are calculated. The
> label-map input defines the regions of the feature image for the
> calculations.
>
> By the way, you could use a single filter -
> BinaryImageToStatisticsLabelMapFilter [1], to achieve the same.
>
>
> [1]
> http://www.itk.org/Doxygen/html/classitk_1_1BinaryImageToStatisticsLabelMapFilter.html
>
> On Mon, Dec 8, 2014 at 1:44 PM, Bradley Lowekamp <blowekamp at mail.nih.gov>
> wrote:
>>
>> Hello,
>>
>> I am not sure anyone else can validate your code for you.
>>
>> What I'd recommend is developing some test images with known answers, and
>> then adding them at test to you code to validate the results. This testing
>> process can easily be done with cmake and ctest.
>>
>> Brad
>>
>> On Dec 8, 2014, at 7:07 AM, Michael Meuli <michael.meuli at gmail.com> wrote:
>>
>> > Hi all
>> >
>> > I've written a little program to analyse the colocalization of
>> > bacteria and lysosome within macrophages. As main result it should
>> > write the mean values of pixels located in the objects (bacteria) but
>> > taking the value from the channel used to visualize the lysosomes
>> > (image3Dred) into a file.
>> > Image acquisition is done with a fancy confocal laser scanning
>> > microscope. Bacteria, lysosomes and the nuclei of the macrophages are
>> > labeld with different fluorochromes. As the cells are seeded as
>> > monolayer, the images are quite flat and maximum intensity projections
>> > are done to visually check the result.
>> >
>> > The programm compiles and runs but I'm not yet fully convinced if it
>> > does what it should do.
>> > I'm not a professional programmer and wanted to ask if some itk guru
>> > could have a look at it.
>> > The programm and some more information can be found here:
>> >
>> > https://github.com/michaelmeuli/bactelize
>> >
>> > My main question is, if the following piece of code really does what
>> > it shoud do:
>> >
>> > BinaryImageToShapeLabelMapFilterType::Pointer
>> > binaryImageToShapeLabelMapFilter =
>> > BinaryImageToShapeLabelMapFilterType::New();
>> > binaryImageToShapeLabelMapFilter->SetInput(binaryimage3Dbacteria);
>> > binaryImageToShapeLabelMapFilter->Update();
>> > ...
>> > StatisticsLabelMapFilterType::Pointer statisticsLabelMapFilter =
>> > StatisticsLabelMapFilterType::New();
>> >
>> > statisticsLabelMapFilter->SetInput1(binaryImageToShapeLabelMapFilter->GetOutput());
>> > statisticsLabelMapFilter->SetInput2(image3Dred);
>> > statisticsLabelMapFilter->InPlaceOn();
>> > statisticsLabelMapFilter->Update();
>> >
>> > unsigned int bacteriacount =
>> > statisticsLabelMapFilter->GetOutput()->GetNumberOfLabelObjects();
>> > for(unsigned int i = 0; i <
>> > statisticsLabelMapFilter->GetOutput()->GetNumberOfLabelObjects(); i++)
>> > {
>> > StatisticsLabelMapFilterType::OutputImageType::LabelObjectType*
>> > labelObjectMe =
>> > statisticsLabelMapFilter->GetOutput()->GetNthLabelObject(i);
>> > double mean = labelObjectMe->GetMean();
>> > fileout << mean << "\t";
>> > std::cout << "Mean value of object with label " <<
>> > static_cast<int>(labelObjectMe->GetLabel()) << " in lysosomechannel: "
>> > << mean << std::endl;
>> > }
>> > fileout << "\n";
>> > fileout.close();
>> > std::cout << "Total bacteria counted (in statisticsLabelMapFilter): "
>> > << bacteriacount << std::endl;
>> > std::cout << std::endl;
>> >
>> >
>> > Do I really get the mean value from within my objects (bacteria) but
>> > calculating it using the values in image3Dred because I did:
>> > statisticsLabelMapFilter->SetInput2(image3Dred);
>> > and
>> > double mean = labelObjectMe->GetMean();
>> >
>> > Best regards
>> > Michael Meuli
>> > _______________________________________________
>> > Community mailing list
>> > Community at itk.org
>> > http://public.kitware.com/mailman/listinfo/community
>>
>> _______________________________________________
>> Community mailing list
>> Community at itk.org
>> http://public.kitware.com/mailman/listinfo/community
>
>
>
>
> --
> Regards,
> Girish


More information about the Community mailing list