cerr / CERR

Matlab/Octave based platform for Radiological Research.
https://cerr.github.io/CERR/
GNU Lesser General Public License v2.1
191 stars 102 forks source link

DVH #739

Open MohHu opened 2 years ago

MohHu commented 2 years ago

Dear developer,

When I try to compare DVHs of two plans, one DVH of a structure run without problem, but another is not displayed and mean, min and max dose are always 0.5 Gy as in the attachment below.

Is there any suggestion to overcome this problem?

Yours sincerely

https://docs.google.com/document/d/1PlCbTehJwHnsXnnkp8Rcz5a_uEHC1Nmc/edit?usp=sharing&ouid=109260202965405500031&rtpof=true&sd=true

adityaapte commented 2 years ago

It looks like the dose might not be aligned with the scan or the structure you are analyzing. Couple of checks: (1) verify the dose overlay from the viewer (2) how was dose imported? Maybe the grid alignment was incorrect.

On Thu, Aug 4, 2022, 5:51 PM MohHu @.***> wrote:

Dear developer,

When I try to compare DVHs of two plans, one DVH of a structure run without problem, but another is not displayed and mean, min and max dose are always 0.5 Gy as in the attachment below.

Is there any suggestion to overcome this problem?

Yours sincerely

https://docs.google.com/document/d/1PlCbTehJwHnsXnnkp8Rcz5a_uEHC1Nmc/edit?usp=sharing&ouid=109260202965405500031&rtpof=true&sd=true

— Reply to this email directly, view it on GitHub https://github.com/cerr/CERR/issues/739, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGNJB3BMVGDMAAQZZH4EXLVXQ3OFANCNFSM55UAYTZQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

MohHu commented 2 years ago

Thanks for your prompt reply, 1- It seems to be there is no problem in the dose overlay as in the link below. 2- I selected ''DICOM'' format, and then went to the ''Go''. In the directory of DICOM files, I chose the directory that contains files of scan, structure and dose. Therefore, it was converted to CERR format.

https://docs.google.com/document/d/1USv50t3TR16JwvEMkTQi-pkfIc1gKuZZ/edit?usp=sharing&ouid=109260202965405500031&rtpof=true&sd=true

adityaapte commented 2 years ago

Any chance you can share anonymized dicom?

On Thu, Aug 4, 2022, 11:38 PM MohHu @.***> wrote:

Thanks for your prompt reply, 1- It seems to be there is no problem in the dose overlay as in the link below. 2- I selected ''DICOM'' format, and then went to the ''Go''. In the directory of DICOM files, I chose the directory that contains files of scan, structure and dose. Therefore, it was converted to CERR format.

https://docs.google.com/document/d/1USv50t3TR16JwvEMkTQi-pkfIc1gKuZZ/edit?usp=sharing&ouid=109260202965405500031&rtpof=true&sd=true

— Reply to this email directly, view it on GitHub https://github.com/cerr/CERR/issues/739#issuecomment-1206007169, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGNJB7ACLTKHKDYRTL6LATVXSEDPANCNFSM55UAYTZQ . You are receiving this because you commented.Message ID: @.***>

MohHu commented 2 years ago

Yes, of course,

They have just been sent to your email.

Yours sincerely

adityaapte commented 2 years ago

The two plans are not aligned as seen in the attached image. These will have to be registered, followed by dose deformation and then calculate DVH.

[image: image.png]

On Thu, Aug 4, 2022 at 11:53 PM MohHu @.***> wrote:

Yes, of course,

They have just been sent to your email.

Yours sincerely

— Reply to this email directly, view it on GitHub https://github.com/cerr/CERR/issues/739#issuecomment-1206013290, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGNJB5UOFIGQDAL2IWRC4DVXSF3ZANCNFSM55UAYTZQ . You are receiving this because you commented.Message ID: @.***>

adityaapte commented 2 years ago

On further investigation, it seems there is a bug. If the two plans contain a structure with identical name, then the first occurrence gets picked even when selecting the second occurrence from the DVH GUI. I will fix and let you know when it is pushed to GitHub.

On Fri, Aug 5, 2022 at 10:42 AM Aditya Apte @.***> wrote:

The two plans are not aligned as seen in the attached image. These will have to be registered, followed by dose deformation and then calculate DVH.

[image: image.png]

On Thu, Aug 4, 2022 at 11:53 PM MohHu @.***> wrote:

Yes, of course,

They have just been sent to your email.

Yours sincerely

— Reply to this email directly, view it on GitHub https://github.com/cerr/CERR/issues/739#issuecomment-1206013290, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGNJB5UOFIGQDAL2IWRC4DVXSF3ZANCNFSM55UAYTZQ . You are receiving this because you commented.Message ID: @.***>

adityaapte commented 2 years ago

This issue is now fixed and pushed to https://github.com/cerr/CERR. Please try out and let me know in case of any issues.

On Fri, Aug 5, 2022 at 11:03 AM Aditya Apte @.***> wrote:

On further investigation, it seems there is a bug. If the two plans contain a structure with identical name, then the first occurrence gets picked even when selecting the second occurrence from the DVH GUI. I will fix and let you know when it is pushed to GitHub.

On Fri, Aug 5, 2022 at 10:42 AM Aditya Apte @.***> wrote:

The two plans are not aligned as seen in the attached image. These will have to be registered, followed by dose deformation and then calculate DVH.

[image: image.png]

On Thu, Aug 4, 2022 at 11:53 PM MohHu @.***> wrote:

Yes, of course,

They have just been sent to your email.

Yours sincerely

— Reply to this email directly, view it on GitHub https://github.com/cerr/CERR/issues/739#issuecomment-1206013290, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGNJB5UOFIGQDAL2IWRC4DVXSF3ZANCNFSM55UAYTZQ . You are receiving this because you commented.Message ID: @.***>

MohHu commented 2 years ago

Dear Dr. Aditya,

Thank you very much dear for your efforts,

I pulled the CERR toolkit, and it is working very well.

Actually, now I am trying to use ''gamma analysis'', but gamma analysis also has errors as shown below:

Error using image NaN is not supported. Error in imagesc (line 52) hh = image(varargin{:}, 'CDataMapping', 'scaled'); Error in CERRColorBar (line 158) ud.handle.colorbarImageH = imagesc([.5 .5], [upLim-margin lowLim+margin], cB, 'parent', hAxis, 'hittest', 'on', 'buttondownfcn', 'CERRColorBar(''ColorbarAxisClicked'')','Tag',tag); Error in CERRColorBar (line 65) CERRColorBar('INIT_HANDLES', hAxis); Error in CERRRefresh (line 107) CERRColorBar('init', stateS.handle.doseColorbar.trans); Error in sliceCallBack (line 3589) CERRRefresh Error in createGammaDose (line 73) sliceCallBack('selectDose', num2str(newDoseNum)); Error in CERRGammafnc (line 262) createGammaDose(baseDose,refDose,structNum,doseDiffIN,DTA,... Error while evaluating UIControl Callback.

adityaapte commented 2 years ago

Looks like the dose contains NaN. Can you please change NaN to 0 as follows and re-run the gamma calculation:

nanIndV = isnan(planC{indexS.dose}(doseNum).doseArray); planC{indexS.dose}(doseNum).doseArray(nanIndV) = 0;

On Wed, Aug 10, 2022 at 3:58 PM MohHu @.***> wrote:

Dear Dr. Aditya,

Thank you very much dear for your efforts,

I pulled the CERR toolkit, and it is working very well.

Actually, now I am trying to use ''gamma analysis'', but gamma analysis also has errors as shown below:

Error using image NaN is not supported. Error in imagesc (line 52) hh = image(varargin{:}, 'CDataMapping', 'scaled'); Error in CERRColorBar (line 158) ud.handle.colorbarImageH = imagesc([.5 .5], [upLim-margin lowLim+margin], cB, 'parent', hAxis, 'hittest', 'on', 'buttondownfcn', 'CERRColorBar(''ColorbarAxisClicked'')','Tag',tag); Error in CERRColorBar (line 65) CERRColorBar('INIT_HANDLES', hAxis); Error in CERRRefresh (line 107) CERRColorBar('init', stateS.handle.doseColorbar.trans); Error in sliceCallBack (line 3589) CERRRefresh Error in createGammaDose (line 73) sliceCallBack('selectDose', num2str(newDoseNum)); Error in CERRGammafnc (line 262) createGammaDose(baseDose,refDose,structNum,doseDiffIN,DTA,... Error while evaluating UIControl Callback.

— Reply to this email directly, view it on GitHub https://github.com/cerr/CERR/issues/739#issuecomment-1211203358, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGNJB7S5N2NG7PABLHDA2DVYQCWJANCNFSM55UAYTZQ . You are receiving this because you commented.Message ID: @.***>

MohHu commented 2 years ago

Thank you for your reply,

I used the code for both plans as following, but the error is still the same.
doseNum = 1; indexS = planC{end}; nanIndV = isnan(planC{indexS.dose}(doseNum).doseArray); planC{indexS.dose}(doseNum).doseArray(nanIndV) = 0;

adityaapte commented 2 years ago

The resulting gamma has NaNs for the part of the image that is not included in calculation. However, the viewer complains about it while displaying gamma. A temporary workaround would be to change NaN gamma values to numeric type.

nanIndV = isnan(planC{indexS.dose}(end).doseArray); planC{indexS.dose}(end).doseArray(nanIndV) = 0;

-Aditya

On Thu, Aug 11, 2022, 1:34 AM MohHu @.***> wrote:

Thank you for your reply,

I used the codes for both plans as following, but the error is still the same. doseNum = 1; indexS = planC{end}; nanIndV = isnan(planC{indexS.dose}(doseNum).doseArray); planC{indexS.dose}(doseNum).doseArray(nanIndV) = 0;

— Reply to this email directly, view it on GitHub https://github.com/cerr/CERR/issues/739#issuecomment-1211568465, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGNJBZJ2APEMVKZMZEVGDLVYSGG3ANCNFSM55UAYTZQ . You are receiving this because you commented.Message ID: @.***>