Explorar o código

Fixed ROI region line positions

abd some other stuff
Unknown %!s(int64=7) %!d(string=hai) anos
pai
achega
7dd48e44d9
Modificáronse 29 ficheiros con 299 adicións e 14 borrados
  1. 11 0
      PhantomData/test_ROI.nrrd
  2. 11 0
      PhantomData/test_ct.nrrd
  3. 11 0
      PhantomData/test_seg.nrrd
  4. 5 0
      Slicer_imgs/2018-01-30-Scene.mrml
  5. 13 0
      Slicer_imgs/509092653 RTSTRUCT Plan_01.seg.vtm
  6. 26 0
      Slicer_imgs/509092653 RTSTRUCT Plan_01.seg/509092653 RTSTRUCT Plan_01.seg_0.vtp
  7. 26 0
      Slicer_imgs/509092653 RTSTRUCT Plan_01.seg/509092653 RTSTRUCT Plan_01.seg_1.vtp
  8. 26 0
      Slicer_imgs/509092653 RTSTRUCT Plan_01.seg/509092653 RTSTRUCT Plan_01.seg_2.vtp
  9. 26 0
      Slicer_imgs/509092653 RTSTRUCT Plan_01.seg/509092653 RTSTRUCT Plan_01.seg_3.vtp
  10. BIN=BIN
      Slicer_imgs/509092944 kVCT Image Set.nrrd
  11. BIN=BIN
      Slicer_imgs/Master Scene View.png
  12. 11 0
      TO-DO.txt
  13. 116 0
      WiscPlanPhotonkV125/PatientData/dosecalc_input.txt
  14. BIN=BIN
      WiscPlanPhotonkV125/PatientData/matlab_files/Geometry.mat
  15. BIN=BIN
      WiscPlanPhotonkV125/PatientData/matlab_files/dosecalcSetup.mat
  16. BIN=BIN
      WiscPlanPhotonkV125/PatientData/opt_input/ROI1DoseMinus.bin
  17. BIN=BIN
      WiscPlanPhotonkV125/PatientData/opt_input/ROI1DosePlus.bin
  18. BIN=BIN
      WiscPlanPhotonkV125/PatientData/opt_input/ROI2DoseMinus.bin
  19. BIN=BIN
      WiscPlanPhotonkV125/PatientData/opt_input/ROI2DosePlus.bin
  20. BIN=BIN
      WiscPlanPhotonkV125/PatientData/opt_input/ROIDoseMinus.bin
  21. BIN=BIN
      WiscPlanPhotonkV125/PatientData/opt_input/ROIDosePlus.bin
  22. BIN=BIN
      WiscPlanPhotonkV125/PatientData/opt_output/dosebatch0.img
  23. BIN=BIN
      WiscPlanPhotonkV125/PatientData/opt_output/dosebatch1.img
  24. 1 0
      WiscPlanPhotonkV125/PatientData/opt_output/objFunc.bin
  25. 0 0
      WiscPlanPhotonkV125/PatientData/opt_output/weightbatch0.img
  26. BIN=BIN
      WiscPlanPhotonkV125/PatientData/opt_output/weightbatch1.img
  27. 5 5
      WiscPlanPhotonkV125/matlab_frontend/lab/SliceViewerPanel.m
  28. 1 1
      WiscPlanPhotonkV125/matlab_frontend/lab/XTPS.m
  29. 10 8
      nrrd2geometry.m

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 11 - 0
PhantomData/test_ROI.nrrd


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 11 - 0
PhantomData/test_ct.nrrd


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 11 - 0
PhantomData/test_seg.nrrd


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 5 - 0
Slicer_imgs/2018-01-30-Scene.mrml


+ 13 - 0
Slicer_imgs/509092653 RTSTRUCT Plan_01.seg.vtm

@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<VTKFile type="vtkMultiBlockDataSet" version="1.0" byte_order="LittleEndian" header_type="UInt32" compressor="vtkZLibDataCompressor">
+  <vtkMultiBlockDataSet>
+    <DataSet index="0" file="509092653 RTSTRUCT Plan_01.seg/509092653 RTSTRUCT Plan_01.seg_0.vtp">
+    </DataSet>
+    <DataSet index="1" file="509092653 RTSTRUCT Plan_01.seg/509092653 RTSTRUCT Plan_01.seg_1.vtp">
+    </DataSet>
+    <DataSet index="2" file="509092653 RTSTRUCT Plan_01.seg/509092653 RTSTRUCT Plan_01.seg_2.vtp">
+    </DataSet>
+    <DataSet index="3" file="509092653 RTSTRUCT Plan_01.seg/509092653 RTSTRUCT Plan_01.seg_3.vtp">
+    </DataSet>
+  </vtkMultiBlockDataSet>
+</VTKFile>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 26 - 0
Slicer_imgs/509092653 RTSTRUCT Plan_01.seg/509092653 RTSTRUCT Plan_01.seg_0.vtp


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 26 - 0
Slicer_imgs/509092653 RTSTRUCT Plan_01.seg/509092653 RTSTRUCT Plan_01.seg_1.vtp


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 26 - 0
Slicer_imgs/509092653 RTSTRUCT Plan_01.seg/509092653 RTSTRUCT Plan_01.seg_2.vtp


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 26 - 0
Slicer_imgs/509092653 RTSTRUCT Plan_01.seg/509092653 RTSTRUCT Plan_01.seg_3.vtp


BIN=BIN
Slicer_imgs/509092944 kVCT Image Set.nrrd


BIN=BIN
Slicer_imgs/Master Scene View.png


+ 11 - 0
TO-DO.txt

@@ -0,0 +1,11 @@
+
+
+- something isn't perfect for displaying the contours...
+
+- make it optimize for the segmentations
+
+
+
+
+
+- Change optimization maths

+ 116 - 0
WiscPlanPhotonkV125/PatientData/dosecalc_input.txt

@@ -0,0 +1,116 @@
+#######################################################################
+## Proton dose calculator input file for: C:-work_localGit#######################################################################
+
+# Text entries not preceeded by comments must not be changed!!
+
+# GEOMETRY DATA
+
+# CT density grid file
+rhomw_grid_file
+C:\010-work\003_localGit\WiscPlan_v2\WiscPlanPhotonkV125\PatientData\geometry_files\rhomw.bin
+
+# Stopping power ratio grid file
+Smw_grid_file
+C:\010-work\003_localGit\WiscPlan_v2\WiscPlanPhotonkV125\PatientData\geometry_files\Smw.bin
+
+# Tumor mask file
+mask_file
+C:\010-work\003_localGit\WiscPlan_v2\WiscPlanPhotonkV125\PatientData\geometry_files\target_mask.bin
+
+# Grid containing 2D scaling F^2 factors
+Fmw2_grid_file
+C:\010-work\003_localGit\WiscPlan_v2\WiscPlanPhotonkV125\PatientData\geometry_files\Fmw2.bin
+
+# Output dose file
+batch_dose_file
+C:\010-work\003_localGit\WiscPlan_v2\WiscPlanPhotonkV125\PatientData\batch_dose.bin
+
+# Beam specification file
+beam_spec_file
+C:\010-work\003_localGit\WiscPlan_v2\WiscPlanPhotonkV125\PatientData\beam_spec_DAVE.txt
+
+# Data grid dimensions (Xdim,Ydim,Zdim)
+grid_dimensions
+32 32 40
+
+# Voxel dimensions (dx,dy,dz) [cm]
+voxel_dimensions
+1.568296 1.568296 0.500000
+
+# Grid start coordinates (shifted) (x0,y0,z0) [cm]
+start_coordinates
+-23.964371 -24.964371 -18.646500
+
+# Tumor Z coordinates (tumor_zstart, tumor_zend) [cm]
+tumor_coordinates
+0.000000 1.000000
+
+# USER DEFINED BEAM DATA
+
+# Calculation mode
+treat_mode
+SS
+
+# DET margin
+det_margin
+0.100000
+
+# Load beam specification file [1 for yes, 0 for no]
+read_beam_spec_file
+0
+
+# Write beam specification file [1 for yes, 0 for no]
+write_beam_spec_file
+1
+
+# Use 2D scaling method [1 for yes, 0 for no]
+use_2D_scaling
+1
+
+# Gaussian spread parameters (sig_xp,sig_yp) [cm]
+spread_parameters
+0.500000 0.500000
+
+# Gaussian spacing parameters (xSpace,ySpace,zSpace) [cm]
+spacing_parameters
+0.500000 0.500000 0.300000
+
+# Rectangular aperture size in beams eye view (del_xp,del_yp) [cm]
+aperture_size
+4.000000 4.000000
+
+# Number of beam angles
+num_beam_angles
+2
+
+# Beam angles for calculation [degrees]
+gantry_angles
+-90.000000
+90.000000
+
+# Couch angles for calculation [degrees]
+couch_angles
+0.000000
+0.000000
+
+# Number of beamlets filling each beam angle aperture (Mxp,Nyp)
+number_beamlets
+512 512
+
+# Source to axis distance (SAD) [cm]
+SAD
+100.000000
+
+# PENCIL BEAM DATA
+
+# Number of pencil beam energies
+number_energies
+576
+
+# Pencil beam filenames file
+pencil_beam_filenames
+pencil_beam_files/pencil_beam_filenames.txt
+
+# Location of pencil beam files
+pencil_beam_path
+pencil_beam_files

BIN=BIN
WiscPlanPhotonkV125/PatientData/matlab_files/Geometry.mat


BIN=BIN
WiscPlanPhotonkV125/PatientData/matlab_files/dosecalcSetup.mat


BIN=BIN
WiscPlanPhotonkV125/PatientData/opt_input/ROI1DoseMinus.bin


BIN=BIN
WiscPlanPhotonkV125/PatientData/opt_input/ROI1DosePlus.bin


BIN=BIN
WiscPlanPhotonkV125/PatientData/opt_input/ROI2DoseMinus.bin


BIN=BIN
WiscPlanPhotonkV125/PatientData/opt_input/ROI2DosePlus.bin


BIN=BIN
WiscPlanPhotonkV125/PatientData/opt_input/ROIDoseMinus.bin


BIN=BIN
WiscPlanPhotonkV125/PatientData/opt_input/ROIDosePlus.bin


BIN=BIN
WiscPlanPhotonkV125/PatientData/opt_output/dosebatch0.img


BIN=BIN
WiscPlanPhotonkV125/PatientData/opt_output/dosebatch1.img


+ 1 - 0
WiscPlanPhotonkV125/PatientData/opt_output/objFunc.bin

@@ -0,0 +1 @@
+£‡EEÛ%E

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
WiscPlanPhotonkV125/PatientData/opt_output/weightbatch0.img


BIN=BIN
WiscPlanPhotonkV125/PatientData/opt_output/weightbatch1.img


+ 5 - 5
WiscPlanPhotonkV125/matlab_frontend/lab/SliceViewerPanel.m

@@ -430,7 +430,7 @@ classdef SliceViewerPanel < handle
                                     B_I = B{contourI};
                                     clear C
                                     % up-down (+ high)
-                                    yshift= obj.hSVPS.Geometry.start(2) - 1.5*obj.hSVPS.Geometry.voxel_size(2);
+                                    yshift= obj.hSVPS.Geometry.start(2) - 1.0*obj.hSVPS.Geometry.voxel_size(2);
                                     zshift= obj.hSVPS.Geometry.start(3) - 1.0*obj.hSVPS.Geometry.voxel_size(3);
 
                                     C(:,1)= yshift + (B_I(:,1))*obj.hSVPS.Geometry.voxel_size(2);
@@ -457,7 +457,7 @@ classdef SliceViewerPanel < handle
                                     B_I = B{contourI};
                                     clear C
                                     % up-down (+ high)
-                                    xshift= obj.hSVPS.Geometry.start(1) - 1.5*obj.hSVPS.Geometry.voxel_size(1);
+                                    xshift= obj.hSVPS.Geometry.start(1) - 1.0*obj.hSVPS.Geometry.voxel_size(1);
                                     zshift= obj.hSVPS.Geometry.start(3) - 1.0*obj.hSVPS.Geometry.voxel_size(3);
 
                                     C(:,1)= xshift + (B_I(:,1))*obj.hSVPS.Geometry.voxel_size(1);
@@ -484,14 +484,14 @@ classdef SliceViewerPanel < handle
                                     B_I = B{contourI};
                                     clear C
                                     % up-down (+ high)
-                                    yshift= obj.hSVPS.Geometry.start(2) - 1.5*obj.hSVPS.Geometry.voxel_size(2);
-                                    xshift= obj.hSVPS.Geometry.start(1) - 1.5*obj.hSVPS.Geometry.voxel_size(1);
+                                    yshift= obj.hSVPS.Geometry.start(2) - 1.0*obj.hSVPS.Geometry.voxel_size(2);
+                                    xshift= obj.hSVPS.Geometry.start(1) - 1.0*obj.hSVPS.Geometry.voxel_size(1);
 
                                     C(:,1)= yshift + (B_I(:,1))*obj.hSVPS.Geometry.voxel_size(1);
                                     C(:,2)= xshift + (B_I(:,2))*obj.hSVPS.Geometry.voxel_size(2);
                                     obj.hROIs(end+1) = plot(obj.hAxis, ...
                                         C(:,2), C(:,1), ...
-                                        '--', 'LineWidth', 2, 'Color', obj.hSVPS.Geometry.ROIS{i}.color);
+                                        '-', 'LineWidth', 2, 'Color', obj.hSVPS.Geometry.ROIS{i}.color);
                                 end
                             end
                         end % end of IF

+ 1 - 1
WiscPlanPhotonkV125/matlab_frontend/lab/XTPS.m

@@ -422,7 +422,7 @@ classdef XTPS < handle
             obj.load_geometry();
             
             
-            disp('NRRD1 called!')
+            disp('NRRD geometry loaded!')
         end
 %-------------------------------------------------------------------------------
 % Grozomah

+ 10 - 8
nrrd2geometry.m

@@ -36,16 +36,18 @@ function [Geometry patient_dir] = nrrd2geometry
     [Geometry.Smw Geometry.Fmw2] = dens2mstp(Geometry.rhomw);
     
     % Geometry.voxel_size
-    VoxSizeString = meta.spacedirections;
-    C=textscan(VoxSizeString(2:end-1), '%f', 9,'Delimiter',{',',') ('});
-    C= C{1};
-    Geometry.voxel_size = [C(1), C(5), C(9)];
+%     VoxSizeString = meta.spacedirections;
+%     C=textscan(VoxSizeString(2:end-1), '%f', 9,'Delimiter',{',',') ('});
+%     C= C{1};
+%     Geometry.voxel_size = [C(1), C(5), C(9)];
+    Geometry.voxel_size = meta.spacedirections;
     
     % Geometry.start
-    StartString = meta.spaceorigin;
-    C=textscan(StartString(2:end-1), '%f', 3,'Delimiter',',');
-    Geometry.start=C{1};
-    Geometry.start=Geometry.start';
+%     StartString = meta.spaceorigin;
+%     C=textscan(StartString(2:end-1), '%f', 3,'Delimiter',',');
+%     Geometry.start=C{1};
+%     Geometry.start=Geometry.start';
+    Geometry.start=meta.spaceorigin';
     
     % Geometry.ROIS
     

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio