Calculation of proximal femur bone density

The codes in this repository are used to quantify the 2D & 3D bone density of the proximal femur from CT images. 2D bone density of the neck region can also be measured.

Requirements

  • MATLAB

Pre-processing

Required input information for each case (saved in json file)

For a sample of json file, please see sample_setup.json

  • CT images (saved as .mhd)
  • Segmented label (from U-net, saved as .mhd)
  • Eight landmarks (from 3D slicer, saved as .fcsv)
    Head neck junction (superior, inferior, anterior, posterior)
    Shaft (2cm distal from the lesser trochanter, 5cm distal from the lesser trochanter)
    Head center
    Neck center
  • Side of interest ('L' or 'R')
  • Slope and intercept of the regression model (if BMD conversion is necessary. If conversion is not needed, put 0 for both parameters)

For full-automated measurement

Usage

2D analysis (CT-aHU and CT-aBMD)

Two_dimensional_pipeline.m
  • Required functions
    mhdread.m
    RegTools (can be downloaded from https://github.com/YoshitoOtake/RegTools)
    import_data.m
    isolate_bone_of_interest.m
    calculate_rotation_angles.m
    generate_proximal_femur_DRR.m
    select_DXA_region_DRR_label.m
    calculate_pixel_density.m

2D analysis (CT-aHU(neck) and CT-aBMD(neck))

Two_dimensional_pipeline_neck.m
  • Required functions
    mhdread.m
    RegTools (can be downloaded from https://github.com/YoshitoOtake/RegTools)
    import_data.m
    isolate_bone_of_interest.m
    calculate_rotation_angles.m
    generate_proximal_femur_DRR.m
    select_neck_region_DRR_label.m
    calculate_pixel_density.m

3D analysis (CT-vHU and CT-vBMD)

Three_dimensional_pipeline.m 
  • Required functions
    mhdread.m
    import_data.m
    isolate_bone_of_interest.m
    select_DXA_region_volume_label.m
    calculate_voxel_density.m

Licence

Codes can be used for research purpose or for educational purpose.

For details, please see LICENCE.txt