110110 evalin(' base' ,' clear ct cst pln stf dij resultGUI' );
111111 delete(h );
112112
113+ function test_PlanWidget_multiisocenter
114+ evalin(' base' ,' load protons_testData.mat' );
115+
116+ % Modify to have multiple isocenters
117+ pln = evalin(' base' ,' pln' );
118+ pln .propStf .isoCenter(2 ,: ) = [0 0 0 ];
119+ iso = pln .propStf .isoCenter ;
120+ assignin(' base' ,' pln' ,pln );
121+
122+ h = matRad_PlanWidget();
123+
124+ % check correct value in isocenter edit field
125+ str = get(h .handles .editIsoCenter ,' String' );
126+ assertEqual(str ,' multiple isoCenter' );
127+
128+ % Now force an update by changing a value and executing the callback
129+ set(h .handles .editBixelWidth ,' String' ,' 1' );
130+ cb = get(h .handles .editBixelWidth ,' Callback' );
131+ cb(h .handles .editBixelWidth ,[]);
132+
133+ str = get(h .handles .editIsoCenter ,' String' );
134+ assertEqual(str ,' multiple isoCenter' );
135+ pln = evalin(' base' ,' pln' );
136+ assertEqual(pln .propStf .isoCenter ,iso );
137+
138+ evalin(' base' ,' clear ct cst pln stf dij resultGUI' );
139+ delete(h );
140+
141+
113142
114143% TODO: Test Buttons
0 commit comments