-void BrukerObjectVaryingProperties::setPositionS(std::map<std::string, BrukerFieldData> & BrukerHM){
+void BrukerObjectVaryingProperties::computePositionS(std::map<std::string, BrukerFieldData> & BrukerHM){
std::vector<double> PosiS =BrukerHM[(std::string) "ACQ_slice_offset"].GetDoubleValue();
PositionS =PosiS;
};
-void BrukerObjectVaryingProperties::setPositionR(std::map<std::string, BrukerFieldData> & BrukerHM){
+void BrukerObjectVaryingProperties::computePositionR(std::map<std::string, BrukerFieldData> & BrukerHM){
PositionR =BrukerHM[(std::string) "ACQ_read_offset"].GetDoubleValue() ;
};
-void BrukerObjectVaryingProperties::setPositionP(std::map<std::string, BrukerFieldData> & BrukerHM){
+void BrukerObjectVaryingProperties::computePositionP(std::map<std::string, BrukerFieldData> & BrukerHM){
PositionP =BrukerHM[(std::string) "ACQ_phase1_offset"].GetDoubleValue();
};
-void BrukerObjectVaryingProperties::setTE(std::map<std::string, BrukerFieldData> & BrukerHM){
+void BrukerObjectVaryingProperties::computeTE(std::map<std::string, BrukerFieldData> & BrukerHM){
TE = BrukerHM[(std::string) "ACQ_echo_time"].GetDoubleValue();
};
else throw 0;
}
-/*void BrukerObjectVaryingProperties::setTE(const std::vector< double >& theValue)
+/*void BrukerObjectVaryingProperties::computeTE(const std::vector< double >& theValue)
{
TE = theValue;
}*/
else throw 1;
}
-/*void BrukerObjectVaryingProperties::setPositionP(const std::vector< double >& theValue)
+/*void BrukerObjectVaryingProperties::computePositionP(const std::vector< double >& theValue)
{
PositionP = theValue;
}*/
else throw 2;
}
-/*void BrukerObjectVaryingProperties::setPositionR(const std::vector< double >& theValue)
+/*void BrukerObjectVaryingProperties::computePositionR(const std::vector< double >& theValue)
{
PositionP = theValue;
}*/
else throw 3;
}
-/*void BrukerObjectVaryingProperties::setPositionS(const std::vector< double >& theValue)
+/*void BrukerObjectVaryingProperties::computePositionS(const std::vector< double >& theValue)
{
PositionP = theValue;
}*/
else throw 4;
}
-/*void BrukerObjectVaryingProperties::setAcquisitionOrder(const std::vector< int >& theValue1, const std::vector< int >& theValue2)
+/*void BrukerObjectVaryingProperties::computeAcquisitionOrder(const std::vector< int >& theValue1, const std::vector< int >& theValue2)
{
AcquisitionOrder.clear();
if (theValue1.size() != theValue2[3]*theValue2[1]) throw 5;
for (int i =0 ;i<theValue2[3];i++)AcquisitionOrder.push_back()=(int) theValue1[i*theValue2[1]]/theValue2[1];
}*/
-void BrukerObjectVaryingProperties::setAcquisitionOrder(std::map<std::string, BrukerFieldData> & BrukerHM, std::vector<int> & LoopStruct){
+void BrukerObjectVaryingProperties::computeAcquisitionOrder(std::map<std::string, BrukerFieldData> & BrukerHM, std::vector<int> & LoopStruct){
std::vector<int> AcqOrder;
if (BrukerHM[(std::string) "ACQ_obj_order"].GetIntValue().size() != LoopStruct[3]*LoopStruct[1]) throw 7;
if (LoopStruct.size() < 4 ) throw 8;
else throw 9;
}
-/*void BrukerObjectVaryingProperties::setOrientation( std :: vector < double > & theValue1,const std::vector< int >& theValue2)
+/*void BrukerObjectVaryingProperties::computeOrientation( std :: vector < double > & theValue1,const std::vector< int >& theValue2)
{
if (theValue1.size() != theValue2[3]*9) throw 10;
if (theValue2.size() < 4 ) throw 11;
}
}*/
-void BrukerObjectVaryingProperties::setOrientation(std::map<std::string, BrukerFieldData> & BrukerHM, std::vector<int> & LoopStruct){
+void BrukerObjectVaryingProperties::computeOrientation(std::map<std::string, BrukerFieldData> & BrukerHM, std::vector<int> & LoopStruct){
if (BrukerHM[(std::string) "ACQ_grad_matrix"].GetDoubleValue().size() != LoopStruct[3]*9) throw 12;
if (LoopStruct.size() < 4 ) throw 13;
Orientation=Temp3D;
};
-double BrukerObjectVaryingProperties::getPositionTimePerNR(unsigned int theValue) const{
+double BrukerObjectVaryingProperties::getPositionTimePerNR(unsigned int theValue) const{
if (theValue <PositionTimePerNR.size() ) return PositionTimePerNR[theValue];
else throw 14;
}
-void BrukerObjectVaryingProperties::setPositionTimePerNR(std::map<std::string, BrukerFieldData> & BrukerHM, std::vector<int> & LoopStruct){
+void BrukerObjectVaryingProperties::computePositionTimePerNR(std::map<std::string, BrukerFieldData> & BrukerHM, std::vector<int> & LoopStruct){
double FloatPositionTimePerNR=BrukerHM[(std::string) "ACQ_repetition_time"].GetDoubleValue()[0];
int i=0;
int NA=BrukerHM[(std::string) "NA"].GetIntValue()[0];
*/
bool BrukerObjectVaryingProperties::init(std::map<std::string, BrukerFieldData> & BrukerHM, std::vector<int> & LoopStruct)
{
- setAcquisitionOrder( BrukerHM, LoopStruct);
- setOrientation(BrukerHM, LoopStruct);
- setPositionP(BrukerHM);
- setPositionR(BrukerHM);
- setPositionS(BrukerHM);
- setPositionTimePerNR(BrukerHM, LoopStruct);
- setTE(BrukerHM);
+ computeAcquisitionOrder( BrukerHM, LoopStruct);
+ computeOrientation(BrukerHM, LoopStruct);
+ computePositionP(BrukerHM);
+ computePositionR(BrukerHM);
+ computePositionS(BrukerHM);
+ computePositionTimePerNR(BrukerHM, LoopStruct);
+ computeTE(BrukerHM);
return true;
}
private:
- void setPositionTimePerNR (std::map<std::string, BrukerFieldData> &BrukerHM, std::vector<int> &LoopStruct);
- void setOrientation (std::map<std::string, BrukerFieldData> &BrukerHM, std::vector<int> &LoopStruct);
- void setAcquisitionOrder (std::map<std::string, BrukerFieldData> &BrukerHM, std::vector<int> &LoopStruct);
- void setPositionS (std::map<std::string, BrukerFieldData> &BrukerHM);
- void setPositionR (std::map<std::string, BrukerFieldData> &BrukerHM);
- void setPositionP (std::map<std::string, BrukerFieldData> &BrukerHM);
- void setTE (std::map<std::string, BrukerFieldData> &BrukerHM);
+ void computePositionTimePerNR (std::map<std::string, BrukerFieldData> &BrukerHM, std::vector<int> &LoopStruct);
+ void computeOrientation (std::map<std::string, BrukerFieldData> &BrukerHM, std::vector<int> &LoopStruct);
+ void computeAcquisitionOrder (std::map<std::string, BrukerFieldData> &BrukerHM, std::vector<int> &LoopStruct);
+ void computePositionS (std::map<std::string, BrukerFieldData> &BrukerHM);
+ void computePositionR (std::map<std::string, BrukerFieldData> &BrukerHM);
+ void computePositionP (std::map<std::string, BrukerFieldData> &BrukerHM);
+ void computeTE (std::map<std::string, BrukerFieldData> &BrukerHM);
std::vector<double> TE;
std::vector<double> PositionR;
std::vector<double> PositionP;