Measure tracked spot intensities in MaMuT (or ilastik)

Hello @tinevez @tpietzsch @chho @wolny,

We were tracking cells in ilastik and managed to import the tracking results into MaMuT and overlay the tracks on our two-color input data (saved as bdv/xml). This is very nice! Thank you all for putting in the effort of enabling this!

Now we could like to measure for each object its intensity in one of the two channels and have this information together with the tracking information. We were wondering whether this could be done in either MaMuT, ilastik, or somewhere else?

Best wishes,
Christian

The current situation in Mastodon:
You can define a FeatureComputer plugin to compute whatever features you like. Probably the SpotGaussFilteredIntensity is already close to what you want. But you can also implement your own FeatureComputer and drop it into Fiji, and it should be discovered.

You can enable and compute features in the “compute features” dialog
image
image

You can then define a color mode to color the lineage by the feature value.


image

There is more stuff in the pipeline (displaying in a table, filtering by feature values) which can be found on branches already, but is not released yet.
The computed features are exported as well when exporting a project to MaMuT, which is perhaps the most useful option.

@tinevez Could you describe the situation in MaMuT?

2 Likes

Hello,
I loaded my mamut file using import mamut button and it worked. However, when trying to export it again to mamut, I got below error message:


This is the file, so you can test it as well.
test_export_mamut.xml (8.7 MB)
Many thanks for your help,
cheers,
C

Hi Christian,
You can get the spot intensities with my R package mamut2r.
The tutorial is here.
Do not hesitate if you have questions.
Best regards,
Marion

2 Likes

@MarionLouveaux Great suggestion! Thank you!

@chho What I really really like about Marion’s suggestion is that you will have the intensity values directly in some very useful and computable format, i.e. in R. However you would need to learn a bit of R, which is, by the way, in fact probably a good thing :slight_smile:

@chho @wolny In terms of measuring the intensity values, I think the best would in fact be to get them directly out of ilastik, because there you can use the actual cell segments to measure the intensities. All the other approaches are less precise because they use some ellipsoidal region around the spot centre; if the cell shapes are a bit irregular this could easily include some background pixels outside the cell and thereby yield inaccurate results.

Together with @chho and @Christian_Tischer we’ve already discussed how to measure the intensities of tracked objects in ilastik based on a separate channel which was not used during training.

Just to recap: this can be done using ilastik’s object classification workflow and simple post-processing in order to merge the intensity information together with the tracking results.

The steps would be as follows:

  1. Open your ilastik’s tracking project and export the instance segmentation of your volume by picking ‘Object-Identities’ as a source inside of the ‘Tracking Result Export’ step
    tracking_obj_id_export
  2. Create a new ilastik project: ‘Object Classification [Inputs: Raw Data, Segmentation]’
  3. Load the channel from which you want to obtain per object intensities as the Raw Data, and load just exported segmentation time points as the Segmentation Image in ilastik
  4. Select the intensity features (e.g. mean/total/variance intensity inside the object) of interest
  5. Label a single object just to make the classifier happy and then go to the ‘Object Information Export’, select ‘Object Predictions’ as a Source and click Configure Feature Table Export. Use CSV format , select intensity features you want to export for every object and click ‘Export All’ in order to write the results table into the specified CSV file.
  6. The last step is the actual post processing where one needs to match the object ids from each and every time point in the tracking results table with the corresponding object ids from just exported CSV file (the object ids in the tracking results will most likely be different than the ids of the corresponding objects coming from the object classification results). One way to do the object matching would be by object centers which are present in the results table.
1 Like