ClearAnatomics / ClearMap

ClearMap 2 with WobblyStitcher, TubeMap and CellMap
https://clearanatomics.github.io/ClearMapDocumentation/
GNU General Public License v3.0
105 stars 44 forks source link

Interfacing ilastik with ClearMap2 #64

Open bhnrus opened 3 years ago

bhnrus commented 3 years ago

Hi all, I would like to detect cell bodies with various shapes and sizes. The regular 'disk' detection doesn't work for me, and I would like to use ilastik to create a classifier. How do I use the exported h5py classifier in the ClearMap2 code? Best, Nimrod

ChristophKirst commented 3 years ago

We have not implemented the corresponding Ilastik modules from ClearMap 1 in ClearMap 2 at this point mainly because of lack of time. A contribution would be welcome. You can use ClearMap 1.0 for now.

I am sorry I cannot be of much more help at this point.

bhnrus commented 3 years ago

Thanks for your reply. I used ClearMap1 eventually, and adapted it to python3.

Best, Nimrod

‫בתאריך יום א׳, 2 במאי 2021 ב-16:01 מאת ‪ChristophKirst‬‏ <‪ @.***‬‏>:‬

We have not implemented the corresponding Ilastik modules from ClearMap 1 in ClearMap 2 at this point mainly because of lack of time. A contribution would be welcome. You can use ClearMap 1.0 for now.

I am sorry I cannot be of much more help at this point.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ChristophKirst/ClearMap2/issues/64#issuecomment-830806256, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQQKA6YKUHC3QBSQ37VEBADTLVEMNANCNFSM4YRKXZ4Q .

andrewsilberfeld commented 3 years ago

I utilized Ilastik for my nuclei counting using the haloperidol/Saline dataset and the count results correlate strongly with the data published in the 2016 renier paper (Table S1).

  1. Train the Pixel Classifier using training dataset.
  2. Run the .ilp file on the full dataset and export the probabilities as a .npy file. The resulting npy object has a slightly modified shape compared to input npy and needs to be subsetted in order to view using p3d.plot. Use p3d.plot([ws.source('raw', postfix = 'Probabilities')[0:xlength,0:ylength,0:zlength,1] where xlength, ylength, and zlength is the max number of images in that direction.
  3. Then train the "Object Classification" module (Inputs: Raw Data, pixel prediction map) using the probabilities map of the training data output from the pixel classifier.
  4. Configure the Ilastik export table to csv and export image as numpy. export the object predictions map.
  5. Then with some processing, the Ilastik object_predictions.csv file can be your input to the cell alignment "transformation" function.