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

		<item>
			<title>Jiri Jaros on "TInputHDF5Stream::ReadData(...) ???"</title>
			<link>http://www.k-wave.org/forum/topic/tinputhdf5streamreaddata#post-1076</link>
			<pubDate>Mon, 26 Nov 2012 04:02:44 +0000</pubDate>
			<dc:creator>Jiri Jaros</dc:creator>
			<guid isPermaLink="false">1076@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Chao,&#60;/p&#62;
&#60;p&#62;1) All matrices are physically stored as Z, Y, X, and also, HDF5 library takes the dimension in Z, Y, X order. &#60;/p&#62;
&#60;p&#62;2) However, the class &#60;code&#62;TDimensionSizes&#60;/code&#62; has a constructor that takes dimension sizes in the order of X, Y, Z. It’s just to help me keep the dimension sizes under control and in the same order as in MATLAB when registering the matrices in C++ code. So, in your case you should use &#60;code&#62;TDimensionSizes(sensor_size, Nt, 1)&#60;/code&#62;.&#60;br /&#62;
You can alternatively create a variable of &#60;code&#62;TDimensionSezes&#60;/code&#62; and set properties it's properties manually e.g.&#60;br /&#62;
&#60;code&#62;&#60;br /&#62;
TDimensionSizes Dims;&#60;br /&#62;
Dims.X = sensor_size;&#60;br /&#62;
Dims.Y = Nt;&#60;br /&#62;
Dims.Z = 1;&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;3) To zero a matrix, you can call method &#60;code&#62;ZeroMatrix()&#60;/code&#62;. This method also compiles with NUMA page placement.&#60;/p&#62;
&#60;p&#62;Jiri
&#60;/p&#62;</description>
		</item>
		<item>
			<title>huangchao on "TInputHDF5Stream::ReadData(...) ???"</title>
			<link>http://www.k-wave.org/forum/topic/tinputhdf5streamreaddata#post-1075</link>
			<pubDate>Mon, 26 Nov 2012 03:22:32 +0000</pubDate>
			<dc:creator>huangchao</dc:creator>
			<guid isPermaLink="false">1075@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Jiri,&#60;/p&#62;
&#60;p&#62;You mentioned that the dimension sizes of the matrices are written in (Z, Y, X) order. However, I find that the size of 'pml_x' is defined by using 'TDimensionSizes(FullDim.X, 1, 1)', so I wonder why the order is not '(1, 1, FullDim.X)' here.&#60;/p&#62;
&#60;p&#62;And if I want to define a matrix with size 'sensor_size x Nt', and I want the 'sensor_size' being the first dimension, should I use 'TDimensionSizes(1, Nt, sensor_size)' or 'TDimensionSizes(sensor_szie, Nt, 1)'?&#60;/p&#62;
&#60;p&#62;Also, I want to set some matrices to be zero matrices, do you have any recommendation, like 'bzero' or 'memset'? &#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
Chao
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jwjs on "TInputHDF5Stream::ReadData(...) ???"</title>
			<link>http://www.k-wave.org/forum/topic/tinputhdf5streamreaddata#post-1043</link>
			<pubDate>Tue, 20 Nov 2012 22:43:22 +0000</pubDate>
			<dc:creator>jwjs</dc:creator>
			<guid isPermaLink="false">1043@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Jiri,&#60;/p&#62;
&#60;p&#62;Thanks for the detailed response, it clears up some confusion I had with the layout of the data.  Seems pretty straightforward, so I'm gonna go ahead and code it.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Jiri Jaros on "TInputHDF5Stream::ReadData(...) ???"</title>
			<link>http://www.k-wave.org/forum/topic/tinputhdf5streamreaddata#post-1037</link>
			<pubDate>Tue, 20 Nov 2012 03:54:54 +0000</pubDate>
			<dc:creator>Jiri Jaros</dc:creator>
			<guid isPermaLink="false">1037@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi jwjs&#60;br /&#62;
It’s quite easy. What you need to do is to select a Hyperslab and then read data from it. &#60;/p&#62;
&#60;p&#62;The 'p', 'ux', 'uy', 'uz' variables are stored as 3D arrays in the output file with dimension sizes of (1, Nt, sensor_size ). Please note that the dimension sizes are written in (Z, Y, X) order in the C++ code.&#60;/p&#62;
&#60;p&#62;If you want for example the sensor data from the 10th timestep you’d write:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;int offset[] = {1, 10, sensor_size};  // !dims in Z, Y, X order!
int count [] = {1,  1, sensor_size};  // !dims in Z, Y, X order!
H5Sselect_hyperslab (dataspace, H5S_SELECT_SET, offset, NULL, count, NULL);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This returns a single slab containing data recorded in the 10th timestep, which you can read then.&#60;br /&#62;
You can find more details on how to select a hyperslab at &#60;a href=&#34;http://www.hdfgroup.org/HDF5/Tutor/select.html&#34; rel=&#34;nofollow&#34;&#62;http://www.hdfgroup.org/HDF5/Tutor/select.html&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;You can use the function &#60;code&#62;THDF5_File::WriteHyperSlab&#60;/code&#62; to write the function you need (just replace &#60;code&#62;H5Dwrite&#60;/code&#62; with &#60;code&#62;H5Dread&#60;/code&#62;).
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jwjs on "TInputHDF5Stream::ReadData(...) ???"</title>
			<link>http://www.k-wave.org/forum/topic/tinputhdf5streamreaddata#post-1036</link>
			<pubDate>Tue, 20 Nov 2012 00:26:31 +0000</pubDate>
			<dc:creator>jwjs</dc:creator>
			<guid isPermaLink="false">1036@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad/Jiri,&#60;/p&#62;
&#60;p&#62;I started digging through the code a little bit today and was hoping to find something that would allow me to read data back in from the output file (much like the input settings are read in).  Unfortunately I didn't find anything, but maybe I'm missing something obvious?  &#60;/p&#62;
&#60;p&#62;What I was wanting is to read sensor data back in based on time steps of the simulation (i.e. for each time step read in its corresponding sensor data).  I'm producing extremely large amounts of data in my simulations (constant out of memory issues with Matlab) and was wanting to read in sensor data, per time step, in order to get around this issue and hopefully leave behind Matlab all together.  It seems like there is still a lot of work going on with this and wanted to see if this was planned or already underway before I started implementing this.&#60;/p&#62;
&#60;p&#62;I'm guessing it would just be something along the lines of reading in HyperSlabs much like they're written out?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
