Skip to content

Commit

Permalink
Fixed issue where complex images could not be sent to client.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristoffer Langeland Knudsen committed Jun 24, 2020
1 parent 6926aa2 commit b792f93
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion +gadgetron/+external/+writers/write_image.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,14 @@ function write_attribute_string(socket, attribute_string)
end

function write_data(socket, data)
write(socket, reshape(data, 1, []));

if isreal(data)
output = data;
else
output = zeros([2, size(data)], class(data));
output(1, :, :, :, :) = real(data);
output(2, :, :, :, :) = imag(data);
end

write(socket, reshape(output, 1, []));
end
2 changes: 1 addition & 1 deletion gadgetron.prj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<param.description>This Gadgetron interface is based on ISMRMRD Datatypes, fascilitating direct communication with Gadgetron, or other ISMRMRD-based applications.
NOTE: Requires Gadgetron 4.1 or newer.</param.description>
<param.screenshot>${PROJECT_ROOT}/gadgetron-logo.png</param.screenshot>
<param.version>2.0.13</param.version>
<param.version>2.0.14</param.version>
<param.output>${PROJECT_ROOT}/gadgetron.mltbx</param.output>
<param.products.name />
<param.products.id />
Expand Down

0 comments on commit b792f93

Please sign in to comment.