Hi Jari,
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,
Nx = 300;
Ny = 200;
Nz = 100;
dx = dy = dz = some number;
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->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->GetElementFrom3D(elem_z, elem_y, elem_x))?