This repository has been archived by the owner on May 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Superimpose RTCT and RTDose #24
Comments
` if size(varargin{2}.data,1) ~= size(varargin{1}.data,1) ...
end outputArg1 = varargin{2}.data; end I have solved the problem ! I got a hint from your other codes. |
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
code
{mso-style-priority:99;
font-family:"Courier New";}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
-->Hi Wonjoong, Great to hear! I’m also happy to see you are finding value in this code. Kind regards, Mark Sent from Mail for Windows From: WonjoongCheonSent: Thursday, December 15, 2022 4:11 AMTo: mwgeurts/dicom_toolsCc: SubscribedSubject: Re: [mwgeurts/dicom_tools] Superimpose RTCT and RTDose (Issue #24) `function [outputArg1] = doseRegiste2CT(varargin)%UNTITLED3 Summary of this function goes here% Detailed explanation goes hereif size(varargin{2}.data,1) ~= size(varargin{1}.data,1) ...|| size(varargin{2}.data,2) ~= size(varargin{1}.data,2) ...|| size(varargin{2}.data,3) ~= size(varargin{1}.data,3) ...|| isequal(varargin{2}.width, varargin{1}.width) == 0 ...|| isequal(varargin{2}.start, varargin{1}.start) == 0% Create 3D mesh for reference image[refX, refY, refZ] = meshgrid(single(varargin{1}.start(2) + ... varargin{1}.width(2) * (size(varargin{1}.data,2) - 1): ... -varargin{1}.width(2):varargin{1}.start(2)), single(varargin{1}.start(1): ... varargin{1}.width(1):varargin{1}.start(1) + varargin{1}.width(1)... * (size(varargin{1}.data,1) - 1)), single(varargin{1}.start(3):... varargin{1}.width(3):varargin{1}.start(3) + varargin{1}.width(3)... * (size(varargin{1}.data,3) - 1))); % Create GPU 3D mesh for secondary dataset[secX, secY, secZ] = meshgrid(single(varargin{2}.start(2) + ... varargin{2}.width(2) * (size(varargin{2}.data,2) - 1):... -varargin{2}.width(2):varargin{2}.start(2)), single(varargin{2}.start(1): ... varargin{2}.width(1):varargin{2}.start(1) + varargin{2}.width(1) ... * (size(varargin{2}.data,1) - 1)), single(varargin{2}.start(3):... varargin{2}.width(3):varargin{2}.start(3) + varargin{2}.width(3) ... * (size(varargin{2}.data,3) - 1))); % Attempt to use GPU to interpolate dose to image/structure% coordinate system. If a GPU compatible device is not% available, any errors will be caught and CPU interpolation% will be used instead.try % Initialize and clear GPU memory gpuDevice(1); % Interpolate the dose to the reference coordinates using % GPU linear interpolation, and store back to % varargin{2}.data varargin{2}.data = gather(interp3(gpuArray(secX), ... gpuArray(secY), gpuArray(secZ), ... gpuArray(varargin{2}.data), gpuArray(refX), ... gpuArray(refY), gpuArray(refZ), 'linear', 0)); % Clear GPU memory gpuDevice(1); % Catch any errors that occured and attempt CPU interpolation % insteadcatch % Interpolate the dose to the reference coordinates using % linear interpolation, and store back to varargin{2}.data varargin{2}.data = interp3(secX, secY, secZ, ... varargin{2}.data, refX, refY, refZ, '*linear', 0);end % Clear temporary variablesclear refX refY refZ secX secY secZ;endoutputArg1 = varargin{2}.data;end`I have solved the problem ! I got a hint from your other codes.—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Dear mwheurts,
First of all, I am a big fan of you :)
I have a quesntion, I have read RT image and RT dose by using your codes.
The shape of RTCT is [ 512, 512, 131] and RTDose is [201, 101, 131].
I want to fusion or superimpose RTDOSE to RTCT with size of [512 512 131]
Please, any advice.
and I hope to see you someday as offline.
Best regards
Wonjoong Cheon,
The text was updated successfully, but these errors were encountered: