Stratec pQCT cortical density distribution analysis failure on Fiji ImageJ 1.51u


#1

Dear Timo, @tjrantal

I am trying to analyse density distribution in the cortical bone in the Human Tibia. Using your density distribution plugin, I have selected “Analyse cortical results” and “Analyse density distribution”

Using Fiji/ImageJ 1.51h, Java 1.6.0_24 software this works (using both your default values and custom values) but doing exactly the same analysis parameters in 1.51u, I get “NaN” in the CoD [mg/cm3] results section, and no cortical density distribution results. The marrow density data is calculated. No cortical edge delimiting is seen in the analysed image.

Have attached screengrabs of Excel workbook with example.

Software platform details:

  • Fiji/ImageJ 1.51u Installed today with current pQCT plugin and Java 1.8.0_66 64-bit

  • Update manager enabled after initial installation, pQCT update selected

  • OS: Windows 10

  • Initially was running off external hard disk drive but same problem when running off computer hard disk

  • The BoneJ site (http://bonej.org/) currently specifies it needs Java 1.6 but your information from Feb 2018 on the ImageJ site (https://imagej.net/PQCT) does not say that is a requirement, so I have not added in the BoneJ._jar.

  • Image Filetype: Stratec XCT2000

Any explanation/advice greatly appreciated.

Julie


#2

Hello Julie,

No clue, will have to investigate. Thank you for including pertinent detail in your message!

Could be a change in Java (don’t think this is likely but many functions do get deprecated from version to version), or a bug introduced between the BoneJ versions (I think this is likely it). Haven’t stumbled upon this issue before. It’s been a while since I last updated BoneJ code so I will take a little bit of time to get on top of this.

Is it just this one file or all files exhibit similar behavior? It would help debugging if you were able to send me a sample file to timo.rantalainen@jyu.fi (unless it’s all files, I could just test on the files I already have).

Regards,
-Timo


#3

Hello Julie,

Took a look at this. This does not look like a java or ImageJ version issue. I was able to get the expected results with older and newer versions of ImageJ, and with the latest FIJI when using my personal version of the BoneJ density distribution plugin. Conversely, compiling the version from https://github.com/fiji/pQCT did not work on either of the ImageJ versions or FIJI.

@rimadoma, have you made any changes to the code related to identifying the bone borders (other than obviously imports) when refactoring? Particular suspects could be in interpreting the values when reading the file, I guess, would not have expected you to have worked with the algorithms tracking the bone edge. I haven’t taken a look at the change logs from git, thought I’d first check if you’d remember anything conspicuous as a starting point. On a related note, the maven build worked an absolute treat, thank you for adding that! I’ve had a personal ant build script but obviously that had to be manually maintained not to mention having to download the dependencies manually…

Regards,
-Timo


#4

UPDATE: I found some time to look at the code today, and turns out the current version does not work as intended.

@rimadoma The version at https://github.com/fiji/pQCT does not work as intended. I’ll work towards fixing it within the next month. I used several hours on it today, and looks like I’ll need to find a few more hours to get to a point where I can starting testing this version against the older versions, which I’d confirmed produce ‘correct’ results. I will keep you posted. In the meantime, could you please add some kind of notification on the BoneJ webpage to instruct against using the latest version for pQCT analysis for now?


#5

I think I did change bone border identification, but only in terms of simplifying the logic in if statements etc. I tried my best to ensure cleaning the code wouldn’t change behavior, but of course mistakes are possible. To compare my changes to the original state of the code see: https://github.com/fiji/pQCT/compare/10e21dc5c7142d33354f0f2e4f4fb18bbe860aab...master. The code was cloned from the BoneJ repository of mdoube, and it’s possible that change was already there.

One way to identify where the problematic commit was added would be to clone the repository, and then run git checkout 10e21dc, which is the commit of the cloned code before any of my changes.

In terms of warning against using the latest pQCT, I’ll add a notification on the wiki page. Also, it’d be great if you could document the problem (with steps to reproduce, and expected behaviour) as an issue on GitHub.

Best regards,
Richard


#6

Dear Julie,

Thank you for reporting this issue! I’ll do my best to help Timo solve this problem. BoneJ and pQCT are in the process of separating. There are still old versions where they are bundled together, but in the future they will have their own update sites. This means you can download one, the other or both, but they won’t need each other to work anymore. In short: you won’t need to download BoneJ for pQCT from the update site.

Best regards,
Richard


#7

Wiki page updated with notes about this issue and BoneJ & pQCT.


#8

FYI I’ve just made a pull-request in github (in case you don’t get notifications on that…).

Regards,
-Timo


#9

Hi @jbriody,

A patch from @tjrantal that addresses these issues is now available on the pQCT update site. Just run Help > Update… as usual.

Best regards,
Richard


#10

@rimadoma,

Thank you! I just checked the released version (sometimes redundancy is fine…), and it produced the expected results.

Regards,
-Timo


#11

Thanks! As they say, your software doesn’t work, until it runs on someone else’s computer…