Hello,
I don't understand the new "transducer.combine_sensor_data" method. I modified "example_us_bmode_linear_transducer" to additionally generate sensor data using kspaceFirstOrder3DC and to combine the sensor data from kspaceFirstOrder3DC using the above mentioned transducer.combine_sensor_data method. However, the combined sensor data does not appear to match up with the sensor data generated by kspaceFirstOrder3D. For example, when scan_line_index = 60, mean(abs(combined_sensor_data_3DC(:))) = 10504 whereas mean(abs(sensor_data_3D(:))) = 5270.4.
Am I missing a step when processing the sensor_data output by kspaceFirstOrder3DC?
here are the modifications I made to the example:
% preallocate the storage
scan_lines_3D = zeros(number_scan_lines, kgrid.Nt);
scan_lines_3DC = zeros(number_scan_lines, kgrid.Nt);
% set the input settings
input_args = {...
'PMLInside', false, 'PMLSize', [pml_x_size, pml_y_size, pml_z_size], ...
'DataCast', DATA_CAST, 'DataRecast', true, 'PlotSim', false};
% run the simulation if set to true, otherwise, load previous results from disk
if RUN_SIMULATION
% set medium position
medium_position = 1;
for scan_line_index = 1:number_scan_lines
% update the command line status
disp('');
disp(['Computing scan line ' num2str(scan_line_index) ' of ' num2str(number_scan_lines)]);
% load the current section of the medium
medium.sound_speed = sound_speed_map(:, medium_position:medium_position + Ny - 1, :);
medium.density = density_map(:, medium_position:medium_position + Ny - 1, :);
% run the simulation
sensor_data_3D = kspaceFirstOrder3D(kgrid, medium, transducer, transducer, input_args{:});
sensor_data_3DC = kspaceFirstOrder3DC(kgrid, medium, transducer, transducer, input_args{:});
combined_sensor_data_3DC = transducer.combine_sensor_data(sensor_data_3DC);
% extract the scan line from the sensor data
scan_lines_3D(scan_line_index, :) = transducer.scan_line(sensor_data_3D);
scan_lines_3DC(scan_line_index, :) = transducer.scan_line(combined_sensor_data_3DC);
% update medium position
medium_position = medium_position + transducer.element_width;
end
Thanks, Shawn
k-wave version 1.1
compiled binary file, SSE3
MATLAB R2013a Student
Ubuntu 13.10