<?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: After getArrayBinaryMask,voxelPlot visualize the overlap problem</title>
		<link>http://www.k-wave.org/forum/topic/after-getarraybinarymaskvoxelplot-visualize-the-overlap-problem</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 22:20:11 +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/after-getarraybinarymaskvoxelplot-visualize-the-overlap-problem" rel="self" type="application/rss+xml" />

		<item>
			<title>HYH on "After getArrayBinaryMask,voxelPlot visualize the overlap problem"</title>
			<link>http://www.k-wave.org/forum/topic/after-getarraybinarymaskvoxelplot-visualize-the-overlap-problem#post-9071</link>
			<pubDate>Sat, 30 Mar 2024 03:42:49 +0000</pubDate>
			<dc:creator>HYH</dc:creator>
			<guid isPermaLink="false">9071@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;The added rectangular elements are 1 mm wide, 1 mm long, and 1.2 mm apart. However, after using the voxelPlot function to visualize, the red cubes are all overlapped, and after adjusting the interval to separate them, when the dx is 0.5mm, it is found that there are 20*20 red cubes in each rectangular array in voxelPlot. How can I solve this problem, my code is as follows。 Looking forward to your answer！&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;element_num_x = 8;
element_num_y = 8;
element_width = 1e-3;
element_length = 1e-3;
element_pitch =  1.2e-3;
rotation = [0, 0, 0];

x_pos = (0:element_pitch:(element_num_x)*element_pitch);
y_pos = (0:element_pitch:(element_num_x)*element_pitch);

karray = kWaveArray();

for ind = 1:element_num_x
    for k = 1:element_num_y
        karray.addRectElement([x_pos(ind) ,y_pos(k) ,kgrid.z_vec(1)+ z_compensate], element_width, element_length, rotation);
    end
end

sensor.mask = karray.getArrayBinaryMask(kgrid);

voxelPlot(sensor.mask, &#38;#39;Color&#38;#39;, [1 0 0], &#38;#39;Transparency&#38;#39;, 0.5);&#60;/code&#62;&#60;/pre&#62;</description>
		</item>

	</channel>
</rss>
