scieee AI-readable full text Open interactive document viewer

Femur vesseltree (Young female mouse)

Hemmen, Katherina

Abstract

This repository is one part of five zenodo entries belonging to the same project, dealing with the vessel tree of femur bones. Complete femur bones were extracted, stained, and imaged on light-sheet fluorescence microscope in small tiles as described in the accompanying publication (REF). The individual tiles were stitched in Fiji using the BigStitcher and build the foundation of all analysis results shown here. Individual tiles can be obtained upon request (too large file size for a single zenodo entry). Each femur was imaged on four different channels:ch0: Megakaryocytes (Anti-GPIX labeled with Alexa750)ch1: Blood vessels (CD31-high, Anti-CD31 labeled with Alexa647)ch2: Blood vessels (CD31-low, Anti-CD105 labeled with Alexa546)ch3: (residual) Autofluorescence, captured at 488 nm Three samples are provided: 1) Young naive mouse: VK-AA501 (10.5281/zenodo.14752863) 2) Aged mouse: VK-AA760 (10.5281/zenodo.14753479) 3) Blood-let mouse: VK-AA764 (10.5281/zenodo.14753578) 4) Young naive female mouse: DS-AA464 5) Aged female mouse: DS-AA470

Full text

1 Dr. Katherina Hemmen & Vishnu Manoj ~ CU Imaging ~ RVZ ~University Würzburg Data analysis femur bones  complete guide Data acquisition, stitching & preprocessing Sample preparation - Staining: o Alexa750 = anti-GPIX (MKs), channel 0 o Alexa647 = anti-CD31 (vessel), channel 1 o Alexa546 = anti-CD105 (vessel), channel 2 - Tissue/bone autofluorescence, channel 3 (excited at 488 nm) Samples SAMPLE CLASS SAMPLE NAMES YOUNG MALE MICE VK - AA498, VK - AA499, VK - AA500, VK - AA501, VK - AA502 AGED MALE MICE (~ 1 YR) VK-AA758, VK-AA759, VK-AA760, VK-AA761, VK-AA762 BLOOD-LET MICE* VK-AA763, VK-AA764, VK-AA765, VK-AA766, VK-AA767 YOUNG FEMALE MICE DS-AA464, DS-AA465, DS-AA466, DS-AA467, DS-AA468 AGED FEMALE MICE (~ 1 YR) DS-AA469, DS-AA470, DS-AA471, DS-AA472, DS-AA473 *for blood-let mice, ~ 1 mL of blood has been removed directly prior to perfusion & staining Data acquisition - 5x LSFM, 4 channel, 1024x1024 pixel with a size of 2.6 x 2.6 µm and a z-spacing of 5 µm o 750 nm, 647 nm, 546 nm and 488 nm (488 nm for autofluorescence) - Complete femur was acquired in 12-13 tiles each Important note: While the bones for blood-let and aged mice were hang up straight in the microscope, the young mice were randomly oriented in the microscope. Data preparation Stitching - Stitching was performed using the BigStitcher implemented in Fiji - https://imagej.net/plugins/bigstitcher/ - Tiles were converted to a uniform data format (1 file per channel) prior to stitching o 00_Merge_stacks.ijm o 00_Resave_image.ijm - Data was exported as 16-bit tiff, retaining original pixel size (i.e. the box “preserve original pixel anisotropy” is ticked) and no Non-rigid advanced parameters were used Background subtraction - Background was subtracted in Imaris via o (1) selecting a small cubic background region o (2) observing the intensity distribution in that ROI ( camera noise is Gaussian distributed) o (3) Select maximum of distribution as background values - Perform background subtraction for all channels - The resulting tiff-files were converted to Imaris file format 2 Dr. Katherina Hemmen & Vishnu Manoj ~ CU Imaging ~ RVZ ~University Würzburg Autofluorescence / bone marrow ROI selection  Two ROIs were selected from each bone:  (1) Complete shaft region (i.e. omitting hip and knee joints)  (2) Region of the large vessel tree, which reaches up into the hip region but end at the lower 2/3 of the shaft region  The ROI were saved into the respective subfolders of Large Vessel or Autofluorescence(shaft), respectively. Large Vessel ROI  not needed for autofluorescence / bone marrow channel Sample X_min Y_min Z_min X_max Y_max Z_max 498 737 1124 384 1394 4058 1162 499 889 1210 179 1668 3899 554 500 464 1217 206 1764 4541 627 501 932 1285 327 1617 4377 798 502 915 1347 479 2279 4501 911 758 757 990 297 1618 5158 657 759 313 966 284 1238 4166 619 760 377 1039 416 1163 4144 885 761 771 1061 250 1484 3937 536 762 376 1036 323 1429 4250 804 763 389 976 205 1126 3853 613 764 462 1111 343 1242 3671 749 765 792 983 327 1564 3906 649 766 759 999 461 1438 3976 766 767 753 857 199 1436 3851 486 464 490 1771 827 4425 116 489 465 279 1191 672 4520 479 1184 466 157 1110 776 4295 268 709 467 572 1584 824 4444 104 478 468 211 1072 1070 4612 224 601 469 92 1138 1101 4882 156 530 470 199 1255 990 5252 388 966 471 51 1209 1028 5198 203 645 472 223 1244 1946 4862 57 521 473 504 1179 1050 4934 73 436 Small Vessel / shaft ROI Sample X_min Y_min Z_min X_max Y_max Z_max 498 604 1367 174 1531 4763 1117 499 833 1441 102 1844 4390 643 500 927 1,580 140 2386 5163 738 501 457 1634 64 1384 5030 1117 502 671 1781 153 2051 5129 657 758 441 1163 238 1820 5078 734 759 144 1365 217 1468 5257 718 760 281 975 303 1500 5071 986 761 374 1355 164 1612 5190 657 3 Dr. Katherina Hemmen & Vishnu Manoj ~ CU Imaging ~ RVZ ~University Würzburg 762 314 1083 320 1633 5232 854 763 268 1470 128 1465 4533 675 764 404 1492 295 1588 4739 712 765 456 1351 269 1642 4502 664 766 641 1518 362 1504 4512 806 767 431 1426 170 1506 4520 537 464 665 1831 1486 4623 68 516 465 209 1288 1412 4760 387 1209 466 97 1161 1253 4543 271 709 467 447 1650 1276 4664 52 485 468 166 1270 1368 4970 183 712 469 71 1263 1524 5600 57 570 470 204 1284 1305 4975 350 1033 471 119 1283 1434 5402 213 673 472 57 1385 1434 5198 1 503 473 175 1494 1458 4993 77 473 Labkit-based segmentation The bone marrow region of all bones was segmented using the combination of all four channels for orientation in Imaris using the Labkit extension.  Open the respective image in Imaris and crop the region of interest for either the large or small vessel as given in the above tables.  Add a new surface  Select the autofluorescence channel, 5.2 µm smoothing, tick the Labkit box and enable “use all channels”  Label the bone marrow region with the “foreground” label and the surrounding as “background”  Enable GPU use, if applicable  Once training is completed, select “compute results and send to Imaris” o This might take a while – do not close Fiji or Imaris!  Once the segmentation is performed and transferred back to Imaris, complete the surface segmentation wizard  Remove potentially unwanted regions like the “comb” on the side using the scissors tool o Save the file  Mask the bone marrow surface onto the autofluorescence channel as a binary channel, i.e. values outside surface = 0, values inside surface = 65535: o All the holes will be filled to get a true bone marrow volume. This mask will be used to define the bone marrow ROI in the small vessel segmentation and the MK segmentation channel.  saved as “*_AF_filled.tif”  This channel is required for both the small and large vessel ROI.  Save the file before continuing!  To fill the holes in the bone marrow mask, in Imaris select the option “Fiji” -> “Image to Fiji” o Note: Your system might complain about a missing or outdated Fiji-Imaris bridge, if it is not automatically installing/updating, you need to install it manually.  Once the image has opened in Fiji (this might take up to 20 min or longer) proceed as follows in Fiji: o Image -> Color -> Split channels 4 Dr. Katherina Hemmen & Vishnu Manoj ~ CU Imaging ~ RVZ ~University Würzburg o Select the correct channel (one of the two binary AF channels) o Set the LUT to “grey” o Convert the selected channel into an 8-bit channel o Fill holes via process -> binary -> fill holes  Attention: this approach only works for holes completely enclosed by foreground pixels; holes which are touching the outside border of the image are not filled! o Next, manually close holes which touch the image border: Use the flood fill tool and the color picker to fill the holes with white/foreground color  https://imagej.net/ij/docs/tools.html o Option 1: directly save the filled channel as tiff-file o Option 2: send the filled channel back to Imaris:  Image-> Color -> merge channels (Do NOT create composite!)  Plugins -> Imaris -> Send image to Imaris o WAIT until the process is complete, this also again might take several minutes. o Once completed, save the files.  Important note: If you save the tif files directly after opening from Imaris, you cannot send them back to Imaris without it crashing!  Next, use the filled autofluorescence channel and quickly generate another surface for the AF channel without the central vein hole. o This surface will be used in the later steps to limit the segmentation of the CD105 and MK channel to the bone marrow region only. Exported data For further analysis, you need to export the following image as 8-bit tiff image: - “*_AF_filled.tif”  the autofluorescence/bone marrow mask in which the holes have been closed. - This mask will be used in the segmentation and analysis of CD105 and MK channel. Exported parameters - Volume of bone marrow from the “*_AF_filled.tif” files Scripts used - For splitting into 5-9 overlapping regions: o Note: The small vessel system and its properties with respect to MK and intervessel space was analysed in 9 overlapping regions. o 00_5slices.py o 00_4slices_inbetween.py - For analysis of bone marrow volume: o 01_ExtractVolumes.py - In the analysis of CD105 and MK channel properties, such as intervessel distance or volume: o 07_Distances_MK-vessel.ijm o 07_Distances_Vessel_border-border.ijm. 5 Dr. Katherina Hemmen & Vishnu Manoj ~ CU Imaging ~ RVZ ~University Würzburg Megakaryocytes  Megakaryocytes are irregularly shaped cells with a minimal size of 16 µm in diameter  Challenge: „by eye“: very differing resolution/blurriness/contrast of images o In 3D view, contrast seems good, however, in 2D/slice view it is very difficult to differentiate MKs from background  One tile from each of the different biological groups (young, young blood-loss, and aged mice) was selected and trained simultaneously with Ilastik using a pixel classification workflow: o https://www.ilastik.org/  Note that due to the low (intensity) contrast, the data was preprocessed prior to feeding it into the pixel classification algorithm. Image Preprocessing  Contrast enhancement was performed in Fiji on the whole shaft of the small vessel ROI  Different approaches were tested, and the following was found to yield the best results: o Median filter with a 1px radius o Unsharp mask with a 5 px radius and a weight of 0.5  The preprocessing step was done with a Fiji macro and saved as “*_Median_UM.tif” o 03_MK_preprocessing.ijm Ilastik pixel classifier Training the pixel classifier  The following files were selected as training examples: o VK-AA498_4-1, VK-AA758_4-1, VK-AA764_4-1  Ilastik was opened and a new workflow “pixel classification” was selected.  Next, the selected training files were loaded, and training features were selected. o Note: All features in all sizes were used  The “background” and “foreground” (= MKs) were marked in all three trainings examples until a nice background-foreground segmentation was found.  The ilastik project was saved as: o \\HC1008\users\AG Stegner\Femur-Gefaessbaum\09_MKs\Ilastik\MKs.ilp Whole shaft processing  The exported pre-processed tif-files were converted to ilastik h5-files o Note: Ilastik cannot work with tif-files larger than 4GB, use the ilastik file converter plugin in Fiji to convert your files to .h5-files and to extract ilastik processed .h5-files o https://www.ilastik.org/documentation/fiji_export/plugin  Next, the converted h5-files were opened in the batch processing mode of the ilastik project and the classification was run on the whole shaft region  The data was exported using the following settings: o Export probabilities o Convert to 16-bit unsigned integer o Renormalize intensity from 0 – 65’535 to 0 -10’000 (range 0 -10’000 corresponding to 0 – 100.00 %) o Save as “*_probabilities.h5”  The files were saved, converted first to tif files and next to Imaris using an Fiji macro and the Imaris file converter o 03_Convert_h5_to_tif.ijm 6 Dr. Katherina Hemmen & Vishnu Manoj ~ CU Imaging ~ RVZ ~University Würzburg Imaris segmentation  The exported and into Imaris file format converted probabilities were imported into Imaris as new channel o Note: The probabilities dataset contains two channels: (1) probability foreground and (2) probability background. Delete the probability background channel, you only need the foreground probability channel.  Use the filled autofluorescence surface as a mask to remove all MK-probability information outside the shaft region.  Next, add a new surface to segment the MK-probability channel o Parameters:  No smoothing  Intensity (≙ probability of being a foreground/MK pixel) = 2* automatic/proposed number  Minimal size = 2000 µm³ (i.e. sphere with 16 µm diameter, assumed as smallest possible size of an MK)  These were the used intensity/probability thresholds: 498 499 500 501 502 758 759 760 761 762 763 764 765 766 767 MK 3224 2634 3028 2212 3210 2412 2430 2620 3016 2104 2424 2216 2622 3214 3028 464 465 46 6 467 468 469 470 471 472 47 3 MK 3028 1792 3028 3404 2618 3410 3030 1810 3210 3612 o Note that for the red-marked bone, the original proposed automatic threshold was used.  Mask the resulting surface on the MK-probability channel as a new binary channel, i.e. pixel inside the surface have the value 65’535 and pixel outside the surface have a value of 0.  Save the results. Imaris segmentation: Estimating the number of MKs While individual MKs cannot be resolved by our light sheet setup, we aim to estimate the total number of MKs and the number of CD105 touching MKs by using the above generated segmentation and assuming an average MK diameter of 26 µm. We will split the generated MK surface into MKsized pieces based on the probability distribution inside the surface and count all MKs, whose outside is closer than 2 µm as “CD105 touching MKs”.  Open Imaris and duplicate the surface generated above o E.g. by either repeating the segmentation with the same settings or by using the “Filter” tab, then selecting all objects and choosing “Duplicate to new surface”  In the duplicated surface choose re-do “surfaces from seed points” and set an intensity (i.e. probability-based) split size of 26 µm o Note this split-size generated objects with a diameter roughly between +/- 50%, i.e. in the range of 13 – 39 µm  In the next step, adjust the “quality” parameter such that ~ 50% of the objects are above the threshold.  Keep the minimal size of 2000 µm³ as size threshold in the next step  Save the Imaris session.  Switch to the CD105 surface (see below). o In the “edit” tab, select “mask all”. o In the pop-up window, tick the box for “distance transform” and press ok.  Here, a new image is generated in which for each pixel the distance to the CD105 surface is generated: Pixel at the surface boundary will have a value 7 Dr. Katherina Hemmen & Vishnu Manoj ~ CU Imaging ~ RVZ ~University Würzburg of 0, while pixel inside the surface boundary show negative values and pixel outside the surface will have positive values. o Save the session and switch back to the newly generated MK-split-surface. o Go to the statistics tab and export the following two parameter:  “Intensity Min Ch=1 Img=2”  “Position Y” Exported data For further analysis, you need to export the firstly created binary MK channel as 8-bit tif file as described above using e.g. the Fiji-Imaris bridge. Exported parameters - Total volume of MKs from the binary MK files - Distances to vessel based on local contrast based Imaris segmentation (pixel-based) - Number of touching MKs (based on the split-based MK surface) The number of touching MKs was sorted in excel by using the “Position Y” to determine to which of the 9 sections an MK belonged to. In the next step, all MKs within the specified Y-range were counted. To define the fraction of touching MKs, the “Intensity Min Ch=1 Img=2” information was used: The exported intensity values reflect the shortest distance to the CD105 surface (in micrometer); if the value for an MK was below 2, the MK was counted as a “touching MK”. Scripts used - For splitting into 5-9 pieces: o 00_5slices.py o 00_4slices_inbetween.py - For exporting MK volume: o 01_ExtractVolumes.py - For evaluating MK volume:surface ratio o 02_SurfaceVolumeObjects.ijm o 02_MK_SurfaceVolumeRatio.ipynb - For evaluating MK-vessel distance: o 07_Distances_MK-vessel.ijm o 08_OverlayHistogramsVessel-MK.ipynb 8 Dr. Katherina Hemmen & Vishnu Manoj ~ CU Imaging ~ RVZ ~University Würzburg CD31 positive vessels (“Large vessel system”) The CD31 staining stains the large vessels strongly and the small, CD105-positive vessel more lightly. To improve the contrast between the weakly and strongly stained vessel, I have determined in a first step the ratio between the CD31 and CD105 channel. This ratio channel has a high intensity, when there is low intensity in the CD105 channel and low intensity at the regions of the small vessels, where there is a co-staining of CD105 and CD31. Note: If you would like to rotate the bones into a specific position, such that they are oriented alike, you must perform the ratio calculations before rotating else the noise is randomly amplified as well. Image preprocessing As described above, to enhance the contrast for the large vessel system, the CD31 channel was divided by the CD105 channel. - Use the ratio calculation script and calculate the ratio between the two channels: o Note: Input are the original fluorescence intensities (no background subtraction) of the fused tiff-files from both channels: o 04_CalculateRatioA647A546.py - The results are saved and converted into the Imaris file format - Crop the large vessel region to reduce the file size for the next steps. o Note, the detailed crop coordinates are given on page 2. - Add the newly generated ratio channel to the Imaris session file containing the other cropped channels (Large file ROI!). - Subtract the background from the ratio channel, if necessary. Filament tracer: Manual and final  The filaments of the large vessel are nicely visible for the human eye, but show low-intensity regions, which disconnect the vessel when trying to segment either with intensity-based methods such as absolute or local contrast intensities or with Labkit/Ilastik pixel classifiers.  To solve the problem of disconnected pieces, I finally decided to manually trace the filaments and thus connect all the traces, which my eye could trace but the computer not.  For manual tracing, add a new filament tracer surface and select “skip automatic generation, create manually”.  Set the filament diameter to 20 µm and select the ratio image as input channel in the “Draw” tab.  Trace all filaments inside the bone shaft area (i.e. skip those vessels in the “comb-like” region). Note, here it is advisable to first start with the bright vessels and in a second step to increase the contrast to also be able to trace the dimmer/thinner vessels towards the knee region. o Handling information: Remember to regularly delete the segment starting points (In the “Edit” tab) else Imaris creates weird results.  Once all vessel branches have been traced, fit the diameter of the vessels (in the “Edit” tab).  Go to the “Tools” tab and select “create new channel”. In the Matlab pop-up window tick “no” when asked whether the intensity should the interpolated along the filament diameter.  Once the new channel – which should be a binary channel with only 0 and 255 as intensity values – has been generated, save the Imaris session.  Next, send the image to Fiji via “Fiji” -> “Image to Fiji”. 9 Dr. Katherina Hemmen & Vishnu Manoj ~ CU Imaging ~ RVZ ~University Würzburg o Due to the manual tracing with many small connections, the filament tracer analysis tools fail to deliver a good statistical analysis. I.e. every small trace is considered a branch, and it is simply not feasible to draw a single long trace from top to bottom of the vessel tree due to the dimensions of the image.  Once the image has opened in Fiji (be patient – this might take a few minutes!), split the image into the individual color channels (Image -Color -Split channels)  Select the binary channel of the manual filament tracing and convert to 8-bit.  Dilate the binary image via Plugins -> BioVoxxel -> EDM binary operations. Set the value to 10 round of dilations. o https://imagej.net/plugins/biovoxxel-toolbox#edm-binary-operations  Divide the dilated image by 255 to obtain an image with only 0 and 1 as intensity values.  Multiply the ratio channel (C1) with the above generated 0-1 images based on the manual tracing.  Save the result as “VK-AAXXX_ratio_ROI_clean.tif” (must be a 16-bit image!) and convert to Imaris. o In the above steps, we generate a dilated mask of the vessel tree to be applied on the ratio image. This masked image will be used in the steps below to automatically trace the vessel and thus obtain correct statistical analysis from the filament tracer tools.  Load the “ratio_ROI_clean.ims” as new channel into the Imaris session.  Add a new filament tracer surface using the “Autopath (no loops)” model and manually set a single starting point (diameter ~ 40 -70 µm) at the beginning of the vessel tree.  Further settings: o Do not calculate soma model o Do not classify seed points or segments o Adjust the threshold for seed points such that it lies in the “dip” of the histogram (or even slightly on the left side/lower values of dip). o Diameter smoothing strength = position 2 o Segment seed point diameter: 5 – 100 µm o Filter all segments shorter than 50 µm (10 px)  Once the automatic tracing is completed, check the results carefully – sometimes some pieces got connected which should not be connected. Remove them.  Save the result.  Go to the “Tools” tab and run two different Matlab extensions: (1) Branch hierarchy and (2) Create channel. o Note 1: For the branch hierarchy to be correctly generated, a single segment starting point must be placed at the beginning of the vessel tree – please check this beforehand and verfiy later that only a single filament is present (you can find this information in the exported statistics).  Sometimes vessels pieces are clearly visible but no connection can be made to the vessel tree. Include this vessel (will be its own filament in the exported statistics) in the total vessel length/volume. However, it will not show up in the branch hierarchy or branch depth. o Note 2: The new channel should again be generated as binary channel, i.e. no intensity interpolation.  Export all statistics from the final filament tracer surface and the generated branch hierarchy surface. 16 Dr. Katherina Hemmen & Vishnu Manoj ~ CU Imaging ~ RVZ ~University Würzburg Circular objects - To export the circular objects, open the “06_CircularObjects.ijm” Fiji macro and change the filenames as required. - Run the Fiji macro. It will save a list of all found object fulfilling the search criteria in three different csv files according the search plane (*_xy.csv, *_zy.csv and *_xz.csv). - Next, summarize the parameters such as area, diameter or the total number of objects using the following Jupyter Notebook: “06_CircularProperties.ipynb” - Collect the results for all three orientations in an excel table to calculate the fraction of parallel and perpendicular running vessels. o Note: The values for perpendicular are pooled from both yx and yz analysis. - Finally, use the “08_OverlayHistogramsDiameter.ipynb” Jupyter Notebook to generate the histograms of the vessel diameter. Elliptical Objects - To export the elliptical objects, open the “06_EllipticalObjects.ijm” Fiji macro and change the filenames as required. - Run the Fiji macro. It will save a list of all found object fulfilling the search criteria in three different csv files according to the search plane (*_xy.csv, *_yz.csv and *_xz.csv). - Next, use the “06_VesselEllipsoid_parperp.ipynb” Jupyter Notebook and the *_xy.csv and *_yz.csv files to sort out how many objects are oriented perpendicular to the central vein (- 70° - +70° with respect to images’ x-axis) and how many run perpendicular to the central vein (-20° - +20° with respect to images’ x-axis) - Finally, use the “06_AngularDistribution_EllipsoidObjects.ipynb” and “06_Radiality_EllipsoidObjects.ipynb” Jupyter Notebook to generate the histograms of the angular distribution of the ellipsoid objects (based on *_xy.csv and *_yz.csv) and the radial distribution of the vessels around the central vein (based on *_zx.csv). Inter-vessel distance To determine the intervessel distance, several steps are required, which are summarized in the “07_Distances_Vessel_border-border.ijm” Fiji macro. Make sure you have the MorphoLibJ plugin installed in your Fiji environment: https://github.com/ijpb/MorphoLibJ/tree/master It can be installed via the Fiji plugin updater, tick the box for “IJPB” in the updater. 1. Load the CD105 binary mask, convert to 8-bit, and fill holes if required 2. Invert small vessel mask 3. Load autofluorescence mask 17 Dr. Katherina Hemmen & Vishnu Manoj ~ CU Imaging ~ RVZ ~University Würzburg a. Convert to 8-bit b. Division by 255 to obtain image of 0 and 1 4. Multiply inverted small vessel mask with autofluorescence ROI 5. Scale multiplied image to obtain equal voxel dimension in x, y and z a. Results of MorphoLibJ are reported in pixel! 6. Generate skeleton from inverted, resampled mask in ROI & divide by 255 a. Be patient, this process might take up to 1 hr 7. Run distance transform using MorphoLibJ 8. Multiply distance transform with skeleton from inverted-resampled ROI The steps 1-8 are performed in the Fiji macro “07_Distances_Vessel_border-border.ijm”. However, note that the obtained intensity values are distances in units of pixel and represent only the half distance. To obtain vessel border to vessel border distance multiply the x-axis by 2.6 µm and by a factor of two. 9. Use the “08_OverlayHistogramsVessel-Vessel.ipynb” Jupyter Notebook to load the csv files and to generate histograms of the distance distribution. The following sketch shows the approach of how the vessel-border-border distance was extracted: MK-vessel distance The MK border to vessel border was determined using a similar approach using the “07_Distances_MK-vessel.ijm” Fiji macro. However, please note that the vessel-vessel distance script must be run first as some intermediate images are also required here and to avoid performing calculations twice, the necessary images are saved in the above script and reused here. 1. Load MK binary mask and convert to 8-bit 18 Dr. Katherina Hemmen & Vishnu Manoj ~ CU Imaging ~ RVZ ~University Würzburg 2. Multiply with autofluorescence ROI (0-1 containing file from above step) 3. Scale the multiplied image to obtain equal voxel dimension in x, y, and z 4. Generate outlines of MKs & divide by 255  for vessel border to MK border distance 5. Multiply outlines with distance transform from inverted, resampled ROI of small vessel 6. Manually create the histogram from the final image and save it as csv file The steps 1-7 are performed in the Fiji macro “07_Distances_MK-vessel.ijm”. However, note that also here the obtained intensities are distances in units of pixel 7. Use the “08_OverlayHistogramsVessel-MK.ipynb” Jupyter Notebook to load the csv files and to generate histograms of the distance distribution. The following sketch shows the approach of how the vessel-border-border distance was extracted: Skeletonization of the vessel system - Skeletonize the small vessel system using the Fiji macro “05_Skeletonize.ijm”, next run the “05_AnalyseSkeleton.ijm” script to get the skeleton statistics. o Note that automatic saving of all results does not work, and you must manually save parts of the results: 19 Dr. Katherina Hemmen & Vishnu Manoj ~ CU Imaging ~ RVZ ~University Würzburg  Tagged skeleton.tif => automatically saved  Branch Information.csv => save manually, will be used later  Results.csv => save manually, not used so far. - In a first step the exported results are summarized in histograms such as branch length distribution using the following Jupyter Notebooks: o 05_VesselSkeleton.ipynb o 08_OverlayHistogramsBranchLength.ipynb o 08_OverlayHistogramsTortuosity.ipynb - Note that only branches longer than 25 µm are included in the analysis (i.e. the branches must be longer than the diameter of the vessel. - 05_VesselSkeleton.ipynb also calculates the tortuosity of the branches as a ratio branch length : Euclidean distance between branch end points. - Furthermore, the total vessel length (sum of all branches above 25 µm) is reported. Detailed skeleton analysis Number of branching points, end points & branching degree - To determine the branching density and the branching degree, the Branch Information.csv was used. - In a first step all segments shorter than 25 µm were removed from the list. - Next, the remaining vertices, V1 and V2 (defining the end points of each segment) were sorted to generate a list of unique entries, i.e. the coordinates were appended to a single list and duplicates were removed. - To gain the branch point density in µm³ or mm³ the number of unique end points was divided by the volume of the bone marrow in that tile. - To determine the branching degree of each segment, the amount of how often each unique entry appeared in the unsorted list of V1 and V2 was determined. - For the Branching degree, all the coordinates in the V1 and V2 column are concatenated together and the frequency of repetition of particular branching points are calculated. This is done using the “collections” library in python with the ‘Count’ function that is imported from this library. - The number of repetitions for a particular branching point within this concatenated V1 and V2 column represents the branching degree of this branching point. This is done for every unique branching point and stored as a histogram for a skeletonized microvascular region of the femur. o We defined points as branch points, if they occurred at least 3 times in this list (i.e. one incoming branch splitting into two branches). o We defined end points as points occurring only a single time in this list. - These operations are performed in the following Jupyter Notebooks: “05_BranchingDegree.ipynb” “05_BranchPointsSorting_sorting.ipynb” - The distribution of branch and end points with respect to the border of the bone was visualized in two steps. In a first step, a binary image containing a “1” at the extracted coordinates of the branch points and end points were multiplied with the distance transformation map of the filled autofluorescence mask in Fiji. Thus, the intensity of the coordinates now reflected the distance (in pixel) to the bone marrow border. o 05_CalculateEP_BP_distances.ijm 20 Dr. Katherina Hemmen & Vishnu Manoj ~ CU Imaging ~ RVZ ~University Würzburg - In a next step, an intensity histogram from these coordinate images was generated. Here, additionally a correction had to be made to count also those points which were replaced by a “0” (i.e. those points lying exactly on the bone marrow border). o 08_OverlayHistogramsBP.ipynb Branching angle - To assess branching angles, the Branch_information.csv from the skeletonization Is used. A network is also generated from the skeletonized mask (“Tagged skeleton.tif”) using the graph generation module derived from VesselExpress. o Spangenberg P, Hagemann N, Squire A, Förster N, Krauß SD, Qi Y, Yusuf AM, Wang J, Grüneboom A, Kowitz L, Korste S. Rapid and fully automated blood vasculature analysis in 3D light-sheet image volumes of different organs. Cell Reports Methods. 2023 Mar 27;3(3). https://doi.org/10.1016/j.crmeth.2023.100436 - The Branch_information.csv file is used to preselect branching points within the calculated network. Here, in the first step of branch selection, all branching points with segments shorter than 25 µm were removed from the list given by Branch_information.csv. - From the remaining branching point vertices, the V1 and V2 columns are selected. These columns are concatenated into one single column and if a starting point appears at least thrice in this combined column, i.e. this starting point is shared between 3 or more branches, it is considered a branch point. - The branching angle here is defined as the angle between two branches which share the same starting point, and we select all unique starting points from the Branch_information.csv file and append it to a list for use of querying the network. - To find the other endpoint that pairs with our selected starting point to complete the branch segment, the network is queried using a Depth First Search strategy which starts from the starting point and moves down 5 nodes to select an end point that is approximately 25 µm away from the starting point. o Tarjan R. Depth-first search and linear graph algorithms. SIAM journal on computing. 1972 Jun;1(2):146-60. https://doi.org/10.1137/0201010 - The length of these branching vectors was selected to be 25 µm to account for the curvature of the blood vessel. Below 25 µm (i.e. the diameter of the microvasculature), the vessel thickness compensates for the curvature allowing straight lines to be a good approximation. - These two branching points are then paired up together generating a list of branchpoint pairs defining branches that are A) longer than 25 µm and B) share a common starting point. - After vectors have been filtered based on their size threshold, then these vectors are pruned based on their proximity. This is done only for vectors that share a branching point. The precondition specifies that vectors closer than 25 µm are median averaged to give a resulting vector that is included instead. The distance was determined via the Euclidean norm of the difference of these vectors given by the following equation: (𝑥− 𝑥)+ (𝑦− 𝑦)+ (𝑧− 𝑧) - Where x1, y1, z1 and x2, y2, z2 are the displacements of vector 1 and vector 2 in the x, y and z directions in space respectively. This is done because only one vector should represent a blood vessel segment, not multiple as it is assumed that multiple vessels within a proximity close to 25 µm is assumed to originate from the same blood vessel segment as the average diameter of microvasculature was found to be near 25 µm. - To calculate the branching angles, we calculate angles between those vectors which share an endpoint. 21 Dr. Katherina Hemmen & Vishnu Manoj ~ CU Imaging ~ RVZ ~University Würzburg - The branching angle is calculated by capturing the dot product between the two vectors given by the following equation: 𝜃 = cos 𝑥𝑥+ 𝑦𝑦+ 𝑧𝑧 𝑥+ 𝑦+ 𝑧𝑥+ 𝑦+ 𝑧 - where here (x1, y1, z1) and (x2, y2, z2) correspond to the displacements of the starting point and ending point of a branch segment respectively. - The angles are reported in radians and are converted into degrees. - Angles above 180 degrees are clipped to remove the incorporation of complementary angles as cos(ϴ) can map to two branching angles that are separated by 360-2ϴ degrees. All necessary angles lie between 0 and 180 degrees. - The calculation was performed in the following Jupyter Notebook: “08_BranchingAngles.ipynb” 22 Dr. Katherina Hemmen & Vishnu Manoj ~ CU Imaging ~ RVZ ~University Würzburg List of scripts Name Input Output Purpose 00_5slices.py Binary files of whole shaft from AF, MK and CD105 segmentations Sliced binary files (non-overlapping) To cut bone marrow region in 5 equally sized pieces 00_4slices_inbetween.py Binary files of whole shaft from AF, MK and CD105 segmentations Sliced binary files, overlapping the other 5 tiles Added to get a finer grid of parameter long the bone 01_ExtractVolumes.py Binary, sliced AF file Volume in px /µm³ Determine bone marrow volume 02_SurfaceVolumeObjects.ijm Binary, sliced MK and CD105 segmentation Csv file with list of surface and volume per object Get the surface and volume of each object 02_SurfaceVolumeRatio.ipynb Csv file with list of surface and volume per object Summarized values To summarize 03_MK_preprocessing.ijm Background-corrected MK fluorescence channel Preprocessed MK channel increase contrast of MK channel 03_Convert_tif_to_h5.ijm Preprocessed MK channel in tif-format Preprocessed MK channel in ilastik .h5 format File format conversion 03_Convert_h5_to_tif.ijm MK probabilities in ilastik - h5 format MK probabilities in tif format File format conversion 04_CalculateRatioA647A546.py Original fluorescence intensities of CD31 and CD105 channel Ratio image To calculate the ratio image 05_Skeletonize.ijm Binary, sliced CD105 channel Skeleton Skeletonizes the binary CD105 channel 05_AnalyseSkeleton.ijm Skeleton Csv file with properties Analyses the skeleton 05_VesselSkeleton.ipynb Csv file from “AnalyseSkeleton” Summarized values, total vessel length To summarize 05_BranchingDegree.ipynb Csv file from “AnalyseSkeleton” Summary branching degree Creates a distribution of branching degrees for a given skeletonized microvascular region. 05_BranchPointsSorting_sorting.i pynb Csv file from “AnalyseSkeleton” Counts branching points & end points To summarize 05_CalculateEP_BP_distances.ijm Image of Branching & End points, fille autofluorescence mask Calculates distance between branch and end points to bone marrow border To visualize & to get the distance distribution 08_OverlayHistogramsBP.ipynb06 _CircularObjects.ijm Binary, sliced CD105 mask Csv file with objects Find circular objects 06_CircularProperties.ipynb Csv file with objects Summarized values To summarize 06_EllipticalObjects.ijm Binary, sliced CD105 mask Csv file with objects Find elliptical objects 06_VesselEllipsoid_parperp.ipynb Csv file with objects Summarized values To summarize 23 Dr. Katherina Hemmen & Vishnu Manoj ~ CU Imaging ~ RVZ ~University Würzburg 06_AngularDistribution_Ellipsoid Objects.ipynb Csv file with objects Histogram To summarize 06_Radiality_EllipsoidObjects.ipy nb Csv file with objects Histogram To summarize 07_Distances_Vessel_borderborder.ijm Binary sliced CD105 and AF mask Distance map (tifimage) Vessel-borderborder distance 07_Distances_MK-vessel.ijm Binary sliced CD105, MK and AF mask Distance map (tifimage) Vessel-MKborder distance 08_OverlayHistogramsDiameter.ip ynb Csv file with objects Histogram To summarize csv file 08_OverlayHistogramsBranchLeng th.ipynb Csv file with properties of all bones Summarizing histogram overlays To summarize 08_OverlayHistogramsVesselVessel.ipynb Distance map (tif-image) Histogram To summarize 08_OverlayHistogramsVesselMK.ipynb Distance map (tif-image), MK outlines (tif - image) Histogram To summarize 08_OverlayHistogramsTortuosity.i pynb Txt file with branch length, Euclidean distance and tortuosity Histogram To summarize 08_BranchingAngles.ipynb Skeleton, Csv file from “AnalyseSkeleton” Summary branching angle Creates a distribution of branching angles for a given skeletonized microvascular region. 08_OverlayHistogramsBP.ipynb Image with distance values for branch and end points Summarizing histogram overlays To summarize