<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>k-Wave User Forum &#187; Topic: B-mode Imaging MATLAB vs OMP</title>
		<link>http://www.k-wave.org/forum/topic/b-mode-imaging-matlab-vs-omp</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 01:13:48 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.k-wave.org/forum/search.php</link>
		</textInput>
		<atom:link href="http://www.k-wave.org/forum/rss/topic/b-mode-imaging-matlab-vs-omp" rel="self" type="application/rss+xml" />

		<item>
			<title>Cyrill on "B-mode Imaging MATLAB vs OMP"</title>
			<link>http://www.k-wave.org/forum/topic/b-mode-imaging-matlab-vs-omp#post-7480</link>
			<pubDate>Tue, 05 May 2020 17:09:44 +0000</pubDate>
			<dc:creator>Cyrill</dc:creator>
			<guid isPermaLink="false">7480@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Thanks Brad for the help! With your advise I tracked down that all files were indeed identical (including sensor_data) and the problem was that I had not updated the transducer class on the readout:&#60;/p&#62;
&#60;p&#62;for angle_index = 1:number_scan_lines&#60;br /&#62;
% update the current steering angle&#60;br /&#62;
transducer.steering_angle = steering_angles(angle_index);&#60;br /&#62;
filename = sprintf('output_orig_%d.h5',angle_index);&#60;br /&#62;
sensor_data = h5read(filename,'/p');&#60;br /&#62;
sensor_data = transducer.combine_sensor_data(sensor_data);&#60;br /&#62;
scan_lines(angle_index, :) = transducer.scan_line(sensor_data);&#60;br /&#62;
end&#60;/p&#62;
&#60;p&#62;Everything works now - thanks!!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "B-mode Imaging MATLAB vs OMP"</title>
			<link>http://www.k-wave.org/forum/topic/b-mode-imaging-matlab-vs-omp#post-7478</link>
			<pubDate>Mon, 04 May 2020 16:36:59 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">7478@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Cyrill,&#60;/p&#62;
&#60;p&#62;Can you try the following:&#60;/p&#62;
&#60;p&#62;1. When you call &#60;code&#62;kspaceFirstOrder3DG&#60;/code&#62;, set the optional input &#60;code&#62;&#38;#39;DataPath&#38;#39;&#60;/code&#62; to save the input file somewhere you can access easily, and set &#60;code&#62;&#38;#39;DeleteData&#38;#39;, false&#60;/code&#62;.&#60;/p&#62;
&#60;p&#62;2. Use &#60;code&#62;h5compare&#60;/code&#62; to compare the input file created by &#60;code&#62;kspaceFirstOrder3DG&#60;/code&#62; and the file you create manually.&#60;/p&#62;
&#60;p&#62;They should be identical (both use &#60;code&#62;kspaceFirstOrder3D&#60;/code&#62; to create the input file).&#60;/p&#62;
&#60;p&#62;Also, have you set values for &#60;code&#62;sensor.record_start_index&#60;/code&#62;? If so, this should be passed to the code on the cluster using the &#60;code&#62;-s&#60;/code&#62; command line input.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Cyrill on "B-mode Imaging MATLAB vs OMP"</title>
			<link>http://www.k-wave.org/forum/topic/b-mode-imaging-matlab-vs-omp#post-7466</link>
			<pubDate>Fri, 01 May 2020 16:22:10 +0000</pubDate>
			<dc:creator>Cyrill</dc:creator>
			<guid isPermaLink="false">7466@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;I have been building on the example for B-mode Images Using A Phased Array. However, when using the C++ code (either CPU or CUDA) in MATLAB I get inconsistent results with the OMP results. Unfortunately, I don’t get either code to misbehave and even after hours in the forum I’m struggling to make any headway – but at least I learned a lot!!&#60;/p&#62;
&#60;p&#62;Running the C++ code directly from MATLAB:&#60;/p&#62;
&#60;p&#62;for angle_index = 1:number_scan_lines&#60;br /&#62;
      transducer.steering_angle = steering_angles(angle_index);&#60;br /&#62;
      sensor_data = kspaceFirstOrder3DG(kgrid, medium, transducer, transducer, input_args{:});&#60;br /&#62;
      scan_lines(angle_index, :) = transducer.scan_line(sensor_data);&#60;br /&#62;
end&#60;/p&#62;
&#60;p&#62;Running the OMP code:&#60;/p&#62;
&#60;p&#62;for angle_index = 1:number_scan_lines&#60;br /&#62;
     transducer.steering_angle = steering_angles(angle_index);&#60;br /&#62;
     filename=sprintf('input_orig_%d.h5',angle_index);&#60;br /&#62;
     kspaceFirstOrder3D(kgrid, medium, transducer, transducer, input_args{:},'SaveToDisk',filename);&#60;br /&#62;
end&#60;/p&#62;
&#60;p&#62;Run on cluster: kspaceFirstOrder-OMP -i input_orig_##.h5 -o output_orig_##.h5&#60;/p&#62;
&#60;p&#62;for angle_index = 1:number_scan_lines&#60;br /&#62;
      filename = sprintf('output_orig_%d.h5',angle_index);&#60;br /&#62;
      sensor_data = h5read(filename,'/p');&#60;br /&#62;
      sensor_data = transducer.combine_sensor_data(sensor_data);&#60;br /&#62;
      scan_lines(angle_index, :) = transducer.scan_line(sensor_data);&#60;br /&#62;
end
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
