Fix discretizePositions
This commit is contained in:
@@ -83,10 +83,22 @@ namespace Recon {
|
||||
result.res = calculateResolution(result.ddims, result.dims);
|
||||
int numDim = aVSenderCoordList.getDimSize(0);
|
||||
auto tempDdims = result.ddims.block(0,0,numDim-1);
|
||||
auto tempTransRes = repmat(transpose(result.res),1,2);
|
||||
auto tempDivRes = repmat(transpose(tempDdims / result.res),1,2);
|
||||
auto tempTransRes = repmat(transpose(result.res),1,aVSenderCoordList.getDimSize(1));
|
||||
auto tempDivRes = repmat(transpose(tempDdims / result.res),1,aVSenderCoordList.getDimSize(1));
|
||||
aVSenderCoordList = (aVSenderCoordList / tempTransRes) - tempDivRes + 1;
|
||||
aVReceiverCoordList = (aVReceiverCoordList / tempTransRes) - tempDivRes + 1;
|
||||
{
|
||||
float* temp = new float[aVReceiverCoordList.getDataSize()]{0};
|
||||
std::copy(aVReceiverCoordList.getData(),aVReceiverCoordList.getData()+aVReceiverCoordList.getDataSize(),temp);
|
||||
std::copy(temp,temp+aVReceiverCoordList.getDataSize(),aVReceiverCoordList.getData());
|
||||
delete [] temp;
|
||||
}
|
||||
{
|
||||
float* temp = new float[aVSenderCoordList.getDataSize()]{0};
|
||||
std::copy(aVSenderCoordList.getData(),aVSenderCoordList.getData()+aVSenderCoordList.getDataSize(),temp);
|
||||
std::copy(temp,temp+aVSenderCoordList.getDataSize(),aVSenderCoordList.getData());
|
||||
delete [] temp;
|
||||
}
|
||||
result.receiverCoordList = aVReceiverCoordList;
|
||||
result.senderCoordList = aVSenderCoordList;
|
||||
return result;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
namespace Recon {
|
||||
struct DiscretizePositionValues{
|
||||
Aurora::Matrix senderCoordList;
|
||||
Aurora::Matrix receiverCoordList;
|
||||
Aurora::Matrix receiverCoordList;
|
||||
Aurora::Matrix ddims;
|
||||
Aurora::Matrix dims;
|
||||
Aurora::Matrix res;
|
||||
|
||||
Reference in New Issue
Block a user