embl-cba / spindle3d

0 stars 0 forks source link

Add option to provide cell masks #16

Closed TobiasKletter closed 3 years ago

TobiasKletter commented 3 years ago

In the advanced version, add the option to look for corresponding cell mask images to use these in order to nicely crop the cell of interest and make the analysis more robust against bright neighbour cells, and we could add the volume of the cell mask to the output table.

"raw" (isotropic) input: https://www.dropbox.com/s/gykm36yiqn9oei3/20210204_HeLa_MCB309_006-1.tif?dl=0

cell mask: https://www.dropbox.com/s/34wj12aev0iiv9h/20210204_HeLa_MCB309_006-1_CellMask.tif?dl=0

tischi commented 3 years ago

@TobiasKletter I guess I should work on this such that we automatically can measure the sum intensity in the whole cell, isn't it? (see https://github.com/tischi/spindle3d/issues/13)

TobiasKletter commented 3 years ago

Would be good, yes!

tischi commented 3 years ago

Does that look right (see cell mask based measurements in the end)?

## Spindle Morphometry Settings
workingVoxelSize: 0.25
dnaThresholdResolution: 1.5
dnaThresholdFactor: 0.5
spindleThresholdFactor: 1.0
spindleDerivativeDelta: 1.0
minimalDynamicRange: 7
minimalDnaFragmentsVolume: 9.0
maxCentralObjectRegionsDistance: 7.0
erosionOfDnaMaskInCalibratedUnits: 1.0

## Spindle Morphometry Measurement
Processing file 20210204_HeLa_MCB309_006-1.tif
Found cell mask file: /Users/tischer/Documents/spindle3d/src/test/resources/test/with-cell-mask/20210204_HeLa_MCB309_006-1_CellMask.tif
Running Spindle3D 0.7.4-SNAPSHOT
Create isotropic images...
DNA downscaled minimum value: 716.0
DNA downscaled maximum value: 4325.0
DNA initial threshold factor: 0.5
DNA initial threshold = (max-min)*factor + min: 2520.5
Removed 7 of 23 regions, because of image border contact.
Determining DNA axes...
Creating aligned images...
Measuring DNA width...
DNA axial profile threshold 0: 1467.8127365476387
DNA axial profile threshold 1: 1574.7617245351325
Measuring DNA length...
DNA Otsu threshold: 2492.0
Removed 5 of 20 regions, because of image border contact.
Tubulin intensity cytoplasm (median +/- mad): 1224.0 +/- 96.0
Tubulin intensity cytoplasm (mean +/- sdev): 1285 +/- 250; numPixels: 5426
Tubulin intensity cytoplasm based threshold (median + 2 * mad): 1416
Tubulin intensity cytoplasm based threshold (median + 3 * mad): 1512
Tubulin intensity cytoplasm based threshold (median + 4 * mad): 1608
Tubulin intensity cytoplasm based threshold (median + 5 * mad): 1704
Tubulin intensity spindle (mean +/- sdev): 2505 +/- 518; numPixels: 3527
Tubulin Otsu threshold: 1955.96875
Spindle threshold = Tubulin Otsu threshold: 1955.96875
Spindle SNR = ( <spindle> - <cyto> ) / sqrt( var(spindle) + var(cyto) ): 2.118209932231476
Computing mask...
Creating projection of spindle mask along spindle axis...
Version: Spindle Morphometry Version: 0.7.4-SNAPSHOT
DNA_Initial_Threshold: 2520.5
DNA_Volume_Threshold: 2492.0
MetaphasePlate_Width_um: 3.25
MetaphasePlate_Length_um: 14.0
Chromatin_Volume_um3: 450.1875
Chromatin_Dilation: 0.12277598952990698
Spindle_Pole_Refinement_Distance_PoleA_um: 1.299038105676658
Spindle_Pole_Refinement_Distance_PoleB_um: 1.0307764064044151
Spindle_Intensity_Threshold: 1955.96875
Spindle_SNR: 2.118209932231476
Spindle_Volume_um3: 632.5
Spindle_Length_um: 12.532457859494283
Spindle_Width_Min_um: 9.25
Spindle_Width_Max_um: 11.5
Spindle_Width_Avg_um: 10.171052631578947
Spindle_Aspect_Ratio: 1.2321692074017665
Spindle_Center_To_MetaphasePlate_Center_Distance_um: 0.673145600891813
Spindle_Angle_Degrees: 6.077432966672049
Spindle_Intensity_Variation: 0.8511698881358775
Spindle_Sum_Intensity_Corrected: 3.4845201E7
Spindle_Sum_Intensity_Raw: 1.14022816E8
Cell_Volume_um3: 4888.0625
Cell_Tubulin_Sum_Intensity_Raw: 4.3303081E8
Comment: Analysis finished.
Analysis finished.
TobiasKletter commented 3 years ago

Yes 👍

tischi commented 3 years ago

Cool! Is it sufficient when I send you a new version by Monday or would you like to run something in the next few days?

TobiasKletter commented 3 years ago

Monday is fine! Thanks!

tischi commented 3 years ago

OK, I will upload a new version to Fiji on Monday. If you want to keep the old one, the best is to duplicate the whole Fiji folder.