cutright / DVH-Analytics

A DICOM Database Application for Radiation Oncology
Other
82 stars 30 forks source link

Request: Import DICOM files associated by directory #106

Closed cutright closed 3 years ago

cutright commented 3 years ago

A number of users have requested to be able to import DICOM files assuming that all DICOM files in a directory should be linked. This could more easily lead to duplicated data if users are not careful, but I also want to accommodate those using DVHA for research who may not be using clinically approved plans.

I think the compromise is to provide a script to generate new StudyInstanceUID's by directory. I have this written, I just need to add it to the GUI. The intent is to run this prior to going to the Import DICOM window in DVHA. Here is the compromise, it actually edits your DICOM files to contain the new StudyInstanceUID's. So if you don't want to edit your DICOM files, make sure you run this on a copy of your data.

cutright commented 3 years ago
Screen Shot 2020-11-09 at 11 03 42 AM

v0.8.9 will have a "Pre-Process DICOM" button on the Import DICOM window. This will prompt you to select a directory, all DICOM files in each directory (and sub-directory) will get a StudyInstanceUID unique to that directory. It will also ensure the new StudyInstanceUID is not in your current DVHA database.

I don't think I need to edit the SOPInstanceUID's, but this needs some testing.

@lharzee, perhaps you could test this out for me? You'll need to switch to the v0.8.9 branch. If needed, I could create a pre-release executable.

@kiragroh this might be of interest to you as well?

cutright commented 3 years ago

@kiragroh pre-release Windows7 build here: https://github.com/cutright/DVH-Analytics/releases/tag/v0.8.9-dev1

cutright commented 3 years ago

Also, note that the you'll need to click "Browse..." again after and have the DICOM tree rebuild. Eventually I'll add a prompt or something to jump to that.

And just to doubly sure, this edits your DICOM files - so make a copy of your files before testing this.

cutright commented 3 years ago

Not sure why this commit isn't showing up in this thread: https://github.com/cutright/DVH-Analytics/commit/00c180429de438f71de188c924c5df1354dbc586

I removed the stop_before_pixels flag in pydicom.read_file. I'm not sure if the difference in behavior between my macOS and MSW7 machines is OS or python environment related. Either way, it makes more sense to remove the flag.

I also set up a proper threading queue since v0.8.9.dev1, which should address potential memory leaks if you're editing a LOT of files.

Kiragroh commented 3 years ago

I could replicate the problem from dev1 with my Mac, too. But dev2 seems to work. Thank you. 👍🏻

cutright commented 3 years ago

Feature complete in v0.8.9 branch

lharzee commented 3 years ago

HI With the version v0.8.9 and the Pre-Process DICOM, it works fine. Thanks

lharzee commented 3 years ago

Hi Dan

Your program works fine with my cyber's data.

Just one point, it's possible for you to integrate, when you analyse on roi, also the standard deviation.

it's important to see the quality of ours data with this parameter.

Thanks

Ludovic


De : Dan Cutright notifications@github.com Envoyé : mardi 10 novembre 2020 15:42:44 À : cutright/DVH-Analytics Cc : Harzée Ludovic; Mention Objet : Re: [cutright/DVH-Analytics] Request: Import DICOM files associated by directory (#106)

Not sure why this commit isn't showing up in this thread: 00c1804https://github.com/cutright/DVH-Analytics/commit/00c180429de438f71de188c924c5df1354dbc586

I removed the stop_before_pixels flag in pydicom.read_file. I'm not sure if the difference in behavior between my macOS and MSW7 machines is OS or python environment related. Either way, it makes more sense to remove the flag.

I also set up a proper threading queue since v0.8.9.dev1, which should address potential memory leaks if you're editing a LOT of files.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/cutright/DVH-Analytics/issues/106#issuecomment-724745461, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARMXVVFJ6ZCWUON3KZKXVFTSPFGOJANCNFSM4TPPKMNQ.

cutright commented 3 years ago

Hi Dan Your program works fine with my cyber's data. Just one point, it's possible for you to integrate, when you analyse on roi, also the standard deviation. it's important to see the quality of ours data with this parameter. Thanks Ludovic

Most likely... but standard deviation of what?

Also keep in mind there is a lot more flexibility from the python console. It might be worthwhile to become comfortable with that (Section 6 of the manual).

lharzee commented 3 years ago

Ok i see in the manual and i try with the python langage

Just for information..(min mean max and maybe SD 😃)

[cid:3edf4011-bfc8-4e1b-b6c6-4b18368816fd]


De : Dan Cutright notifications@github.com Envoyé : mercredi 18 novembre 2020 15:39:47 À : cutright/DVH-Analytics Cc : Harzée Ludovic; Mention Objet : Re: [cutright/DVH-Analytics] Request: Import DICOM files associated by directory (#106)

Hi Dan Your program works fine with my cyber's data. Just one point, it's possible for you to integrate, when you analyse on roi, also the standard deviation. it's important to see the quality of ours data with this parameter. Thanks Ludovic …

Most likely... but standard deviation of what?

Also keep in mind there is a lot more flexibility from the python console. It might be worthwhile to become comfortable with that (Section 6 of the manual).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/cutright/DVH-Analytics/issues/106#issuecomment-729722530, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARMXVVAHXRNVUJZ6GMRYJELSQPMDHANCNFSM4TPPKMNQ.

cutright commented 3 years ago

Ok i see in the manual and i try with the python langage Just for information..(min mean max and maybe SD 😃) [cid:3edf4011-bfc8-4e1b-b6c6-4b18368816fd]

Standard deviation of dose?

lharzee commented 3 years ago

For both :dose and Volume

De : Dan Cutright notifications@github.com Envoyé : mercredi 18 novembre 2020 16:13 À : cutright/DVH-Analytics DVH-Analytics@noreply.github.com Cc : Harzée Ludovic ludovic.harzee@baclesse.lu; Mention mention@noreply.github.com Objet : Re: [cutright/DVH-Analytics] Request: Import DICOM files associated by directory (#106)

Ok i see in the manual and i try with the python langage Just for information..(min mean max and maybe SD 😃) [cid:3edf4011-bfc8-4e1b-b6c6-4b18368816fd] …

Standard deviation of dose?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/cutright/DVH-Analytics/issues/106#issuecomment-729744567, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARMXVVGKW5BJ3M2XGPLFNBDSQPQAJANCNFSM4TPPKMNQ.

cutright commented 3 years ago

For both :dose and Volume De : Dan Cutright notifications@github.com Envoyé : mercredi 18 novembre 2020 16:13 À : cutright/DVH-Analytics DVH-Analytics@noreply.github.com Cc : Harzée Ludovic ludovic.harzee@baclesse.lu; Mention mention@noreply.github.com Objet : Re: [cutright/DVH-Analytics] Request: Import DICOM files associated by directory (#106) Ok i see in the manual and i try with the python langage Just for information..(min mean max and maybe SD 😃) [cid:3edf4011-bfc8-4e1b-b6c6-4b18368816fd] … Standard deviation of dose? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub<#106 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARMXVVGKW5BJ3M2XGPLFNBDSQPQAJANCNFSM4TPPKMNQ.

Oh OK, I think I understand better now. You mean in the "Summary" block in the bottom left after you perform a query? I was thinking on a per patient basis when importing the DICOM. image

If so, that's actually much easier to add. The text for that block comes from here: https://github.com/cutright/DVH-Analytics/blob/4e5c3e1e14d4f2b6fd1d7fdce0d84d3b7057ff76/dvha/models/dvh.py#L353-L376

Maybe I'm too picky, but I'm not sure there's a one-size-fits-all method for standard deviation of that data. I suppose I could just report the square root of the variance, or whatever numpy reports, and call it a day, but it's not always appropriate. Might make more sense to report quartiles?

lharzee commented 3 years ago

Yes in the summary block…

De : Dan Cutright notifications@github.com Envoyé : mercredi 18 novembre 2020 16:44 À : cutright/DVH-Analytics DVH-Analytics@noreply.github.com Cc : Harzée Ludovic ludovic.harzee@baclesse.lu; Mention mention@noreply.github.com Objet : Re: [cutright/DVH-Analytics] Request: Import DICOM files associated by directory (#106)

For both :dose and Volume De : Dan Cutright notifications@github.commailto:notifications@github.com Envoyé : mercredi 18 novembre 2020 16:13 À : cutright/DVH-Analytics DVH-Analytics@noreply.github.commailto:DVH-Analytics@noreply.github.com Cc : Harzée Ludovic ludovic.harzee@baclesse.lumailto:ludovic.harzee@baclesse.lu; Mention mention@noreply.github.commailto:mention@noreply.github.com Objet : Re: [cutright/DVH-Analytics] Request: Import DICOM files associated by directory (#106https://github.com/cutright/DVH-Analytics/issues/106) Ok i see in the manual and i try with the python langage Just for information..(min mean max and maybe SD 😃) [cid:3edf4011-bfc8-4e1b-b6c6-4b18368816fd] … Standard deviation of dose? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub<#106 (comment)https://github.com/cutright/DVH-Analytics/issues/106#issuecomment-729744567>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARMXVVGKW5BJ3M2XGPLFNBDSQPQAJANCNFSM4TPPKMNQ.

Oh OK, I think I understand better now. You mean in the "Summary" block in the bottom left after you perform a query? I was thinking on a per patient basis when importing the DICOM. [image]https://user-images.githubusercontent.com/4778878/99549713-9017db00-297f-11eb-8631-e0b6b024cf69.png

If so, that's actually much easier to add. The text for that block comes from here: https://github.com/cutright/DVH-Analytics/blob/4e5c3e1e14d4f2b6fd1d7fdce0d84d3b7057ff76/dvha/models/dvh.py#L353-L376

Maybe I'm too picky, but I'm not sure there's a one-size-fits-all method for standard deviation of that data. I suppose I could just report the square root of the variance, or whatever numpy reports, and call it a day, but it's not always appropriate. Might make more sense to report quartiles?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/cutright/DVH-Analytics/issues/106#issuecomment-729765439, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARMXVVDMW4JPRNBMUVZOPW3SQPTURANCNFSM4TPPKMNQ.