My apologies for not posing the problem properly.
Actually, fRTEI(...) is a function from a third party library and so, I can not really modify that.
This function uses reference to different objects:
sRfMSat_RECT and
sRfMSat_GAUSS depending on the following condition:
1 2 3 4 5
|
if(SelectionBox_Ind == 1){ //Rectangular
fRTEI(lT, &sRfMSatSet, &sRfMSat_RECT, 0, 0, 0, 0, 0);
}else{ // SIEMENS' GAUSSIAN
fRTEI(lT, &sRfMSatSet, &sRfMSat_GAUSS, 0, 0, 0, 0, 0);
}
|
Alos,
sRfMSat_RECT and
sRfMSat_GAUSS are objects from third party libraries. So, I can not modify them as well.
However, I would like to have a single statement like:
1 2
|
RFBaseDK* sRfMSat;
fRTEI(lT, &sRfMSatSet, reinterpret_cast<RFBaseDK&>(*sRfMSat), 0, 0, 0, 0, 0);
|
Ideally, rather than
RFBaseDK* sRfMSat;, I would like something like
RFBaseDK sRfMSat; and then I can use the function
fRTEI.
Also, declaration of fRTEI is as:
1 2 3 4 5 6 7 8 9 10 11
|
__IMP_EXP NLSStatus fRTEI
(
long lRelTime, // IMP: relative start time of event
sFREQ_PHASE * pFREQ_PHASE, // IMP: freq/phase definition
sRF_PULSE * pRF_PULSE, // IMP: RF definition
sREADOUT * pREADOUT, // IMP: readout definition
sGRAD_PULSE_BASE * pGRAD_PULSEGP, // IMP: gradient pulse definition for GP
sGRAD_PULSE_BASE * pGRAD_PULSEGR, // IMP: gradient pulse definition for GR
sGRAD_PULSE_BASE * pGRAD_PULSEGS, // IMP: gradient pulse definition for GS
sSYNC * pSYNC // IMP: synchonization definition
);
|
I tried to modify my wrapper classes : WrapRF_Gauss_DK and WrapRF_Rect_DK around sRF_PULSE_GAUSS and sRF_PULSE_RECT respectively. However, I could not succeed and any help would be appreciated.
Regards,
Dushyant