<?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: TRealMatrix::GetElementFrom3D</title>
		<link>http://www.k-wave.org/forum/topic/trealmatrixgetelementfrom3d</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 23:01: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/trealmatrixgetelementfrom3d" rel="self" type="application/rss+xml" />

		<item>
			<title>Jiri Jaros on "TRealMatrix::GetElementFrom3D"</title>
			<link>http://www.k-wave.org/forum/topic/trealmatrixgetelementfrom3d#post-2257</link>
			<pubDate>Fri, 12 Apr 2013 16:11:50 +0000</pubDate>
			<dc:creator>Jiri Jaros</dc:creator>
			<guid isPermaLink="false">2257@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi jwjs.&#60;/p&#62;
&#60;p&#62;It's quite easy. All matrices follow the same element layout. So there is no rotation in ux, uy and uz. The function GetElementFrom3D takes an element's coordinates in the sequence of X, Y, Z.&#60;br /&#62;
So, If you wanted to read an element of ux, uy and uz which sits in the middle of the domain you'd write:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;ux-&#38;gt;GetElementFrom3D(300/2,200/2,100/2);
uy-&#38;gt;GetElementFrom3D(300/2,200/2,100/2);
uz-&#38;gt;GetElementFrom3D(300/2,200/2,100/2);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Jiri
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jwjs on "TRealMatrix::GetElementFrom3D"</title>
			<link>http://www.k-wave.org/forum/topic/trealmatrixgetelementfrom3d#post-2076</link>
			<pubDate>Mon, 08 Apr 2013 16:15:51 +0000</pubDate>
			<dc:creator>jwjs</dc:creator>
			<guid isPermaLink="false">2076@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Jari,&#60;/p&#62;
&#60;p&#62;I have a question about accessing data correctly in the c++ version.  If I plot my ultrasound transducer in matlab (e.g. trasducer.plot) it shows that the transducer transmits along the x-axis so that the y-z plane is normal to the transmission.  This makes sense because I initially apply my velocity along the x-axis and note that ux produces the largest velocity values.  Now inside the c++ code at runtime I've managed to get a bit confused as how to map this to accessing locations I want.  As an example lets say I have a medium defined by,&#60;/p&#62;
&#60;p&#62;Nx = 300;&#60;br /&#62;
Ny = 200;&#60;br /&#62;
Nz = 100;&#60;/p&#62;
&#60;p&#62;dx = dy = dz = some number;&#60;/p&#62;
&#60;p&#62;and my probe sits on my medium parallel to the y-z plane, thus the ultrasound transmission axis is along the x-axis.  Let's also say that my focus is some distance, F, and assume the elevation and azimuthal focus are the same. If I want to access an element in the velocity matrix (ux, uy, or uz) that is exactly at that focal distance, how should that be done correctly?  Specifically, if I calculate the array index based upon F and dx, this results in elem_x.  If my transducer is centered in my medium elem_y and elem_z are found easily as well.  Now, how to properly access that location?  Is it as simple as ux-&#38;gt;GetElementFrom3D(elem_x, elem_y, elem_z) (assuming ux points to raw data)?  Or is there a rotation I need to take into account (e.g. ux-&#38;gt;GetElementFrom3D(elem_z, elem_y, elem_x))?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
