Create margin for structure

30 views
Skip to first unread message

Kundan Singh Chufal

unread,
May 21, 2020, 5:34:38 AM5/21/20
to CERR FORUM
Is it possible to create margin along the given structure and save it as a new file.
I am using this script

dirPath = uigetdir(cd, 'Select directory with CERR formated file');

saveDirPath = uigetdir(cd, 'Select directory to save output file');

%Find all CERR files
fileC = {};
if strcmpi(dirPath,'\') || strcmpi(dirPath,'/')
filesTmp = getCERRfiles(dirPath(1:end-1));
else
filesTmp = getCERRfiles(dirPath);
end
fileC = [fileC filesTmp];

filesNotConvertedC = {};

for iFile = 1:length(fileC)

drawnow

try
planC = loadPlanC(fileC{iFile},tempdir);
planC = updatePlanFields(planC);
planC = quality_assure_planC(fileC{iFile}, planC);
indexS = planC{end};
rastersegs1 = planC{indexS.structures}(1).rasterSegments;
catch
continue
end
gtv_margin = structMargin(rastersegs1, 0.5, 1, planC);
end

It does have the values of newly created structure as gtv_margin(I presume)
but how to copy this object as an structure to the scan and save it as a new scan.
Is it possible to do this as an batch process?

ap...@mskcc.org

unread,
May 22, 2020, 11:54:16 AM5/22/20
to cerr-...@googlegroups.com
Hi Kundan,

Here is code sample to create "ring" structure:

%% ---------- code sample begin
structNum = 1; % define structure number

numStructs = length(planC{indexS.structures});

% Expand the test structure by amount equal to the devMargin
planC = createExpandedStructure(structNum, devMargin, planC);
expandedStructNum = numStructs + 1;

% Contract the test structure by amount equal to the devMargin
planC = createExpandedStructure(structNum, -devMargin, planC);
contracttructNum = numStructs + 2;

% Create a structure that's equal to the excess test volume
planC = createDifferenceStructure(contracttructNum,expandedStructNum, planC);
ringStructNum = numStructs + 3;

% save planC to file
planC = save_planC(planC,[],'passed', fileC{iFile});

%% ---------- code sample end
--
You received this message because you are subscribed to the Google Groups "CERR FORUM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cerr-forum+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cerr-forum/e49bc2f0-2bd0-4feb-b1d7-f83dbc155558%40googlegroups.com.



*** Only open attachments or links from trusted senders. Report phishing to inf...@mskcc.org ***

=====================================================================

Please note that this e-mail and any files transmitted from
Memorial Sloan Kettering Cancer Center may be privileged, confidential,
and protected from disclosure under applicable law. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any reading, dissemination, distribution,
copying, or other use of this communication or any of its attachments
is strictly prohibited. If you have received this communication in
error, please notify the sender immediately by replying to this message
and deleting this message, any attachments, and all copies and backups
from your computer.

Kundan Singh Chufal

unread,
May 24, 2020, 6:49:31 AM5/24/20
to CERR FORUM
thanks a lot
Reply all
Reply to author
Forward
0 new messages