Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Error in matRad_interp1 #802

Open
ferdymercury opened this issue Dec 16, 2024 · 0 comments
Open

[BUG] Error in matRad_interp1 #802

ferdymercury opened this issue Dec 16, 2024 · 0 comments
Labels

Comments

@ferdymercury
Copy link
Contributor

ferdymercury commented Dec 16, 2024

Describe the bug
I am using this script https://github.com/SebastiaanBreedveld/TROTS/blob/master/Scripts%20matRad/readTROTSPatient.m to load the "Protons01.mat" dataset into matRad. https://zenodo.org/records/2708302/files/Protons.zip?download=1

Optimization works fine and I get sensible DVH results. But when I run matRad_calcQualityIndicators, I get an interpolation? error.

@tobiasbecher @wahln any help is welcome, thanks in advance.

Index in position 1 exceeds array bounds. Index must not exceed 1.

Error in matRad_interp1 (line 66)
        y = yi(ix1,:) + ( yi(ix2,:)-yi(ix1,:) ) * ( x - xi(ix1) ) / ( xi(ix2) - xi(ix1) );

Error in matRad_calcQualityIndicators>@(x)matRad_interp1(linspace(0,1,numOfVoxels),doseInVoi,(100-x)*0.01) (line 75)
        DX = @(x) matRad_interp1(linspace(0,1,numOfVoxels),doseInVoi,(100-x)*0.01);

Error in matRad_calcQualityIndicators (line 80)
            qi(runVoi).(strcat('D_',num2str(refVol(runDX)))) = DX(refVol(runDX));

Error in readTROTSPatient4 (line 272)
qi  = matRad_calcQualityIndicators(cst, pln, resultGUI.physicalDose);

To Reproduce
Steps to reproduce the behavior:

  1. Download https://zenodo.org/records/2708302/files/Protons.zip?download=1
  2. Extract Protons01 file
  3. Get https://github.com/SebastiaanBreedveld/TROTS/blob/master/Scripts%20matRad/readTROTSPatient.m
  4. Run script

Expected behavior
No error is shown.

Screenshots
image

Desktop (please complete the following information):

  • OS: Ubuntu 22
  • Matlab 2022b
  • matRad Version: git commit 5038481

Additional context
#695

If I update git to latest version, I get instead a different error earlier on:

Error using vertcat
Dimensions of arrays being concatenated are not consistent.
Error in matRad_fluenceOptimization (line 89)
@ferdymercury ferdymercury changed the title [BUG] [BUG] Error in matRad_interp1 Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant