//
//
#include "brukerobjectvaryingproperties.h"
-
+//#include "brukerexception.h"
BrukerObjectVaryingProperties::BrukerObjectVaryingProperties()
double BrukerObjectVaryingProperties::getPositionP(unsigned int theValue) const{
if (theValue < PositionP.size() ) return PositionP[theValue];
- else throw 0;
+ else throw 1;
}
/*void BrukerObjectVaryingProperties::setPositionP(const std::vector< double >& theValue)
double BrukerObjectVaryingProperties::getPositionR(unsigned int theValue) const{
if (theValue < PositionR.size() ) return PositionR[theValue];
- else throw 0;
+ else throw 2;
}
/*void BrukerObjectVaryingProperties::setPositionR(const std::vector< double >& theValue)
double BrukerObjectVaryingProperties::getPositionS(unsigned int theValue) const{
if (theValue < PositionS.size() ) return PositionS[theValue];
- else throw 0;
+ else throw 3;
}
/*void BrukerObjectVaryingProperties::setPositionS(const std::vector< double >& theValue)
int BrukerObjectVaryingProperties::getAcquisitionOrder(unsigned int theValue) const{
if (theValue <AcquisitionOrder.size()) return AcquisitionOrder[theValue];
- else throw 0;
+ else throw 4;
}
/*void BrukerObjectVaryingProperties::setAcquisitionOrder(const std::vector< int >& theValue1, const std::vector< int >& theValue2)
{
AcquisitionOrder.clear();
- if (theValue1.size() != theValue2[3]*theValue2[1]) throw 0;
- if (theValue2.size() < 4 ) throw 0;
+ if (theValue1.size() != theValue2[3]*theValue2[1]) throw 5;
+ if (theValue2.size() < 4 ) throw 6;
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){
std::vector<int> AcqOrder;
- if (BrukerHM[(std::string) "ACQ_obj_order"].GetIntValue().size() != LoopStruct[3]*LoopStruct[1]) throw 0;
- if (LoopStruct.size() < 4 ) throw 0;
+ if (BrukerHM[(std::string) "ACQ_obj_order"].GetIntValue().size() != LoopStruct[3]*LoopStruct[1]) throw 7;
+ if (LoopStruct.size() < 4 ) throw 8;
for (int i =0 ;i<LoopStruct[3];i++)
AcqOrder.push_back((int) BrukerHM[(std::string) "ACQ_obj_order"].GetIntValue()[i*LoopStruct[1]]/LoopStruct[1]);
AcquisitionOrder=AcqOrder;
};
std :: vector < std :: vector < double > > BrukerObjectVaryingProperties::getOrientation(unsigned int theValue) const{
- if (theValue <Orientation.size())return Orientation[theValue];
- else throw 0;
+ if (theValue < Orientation.size())return Orientation[theValue];
+ else throw 9;
}
/*void BrukerObjectVaryingProperties::setOrientation( std :: vector < double > & theValue1,const std::vector< int >& theValue2)
{
- if (theValue1.size() != theValue2[3]*9) throw 0;
- if (theValue2.size() < 4 ) throw 0;
+ if (theValue1.size() != theValue2[3]*9) throw 10;
+ if (theValue2.size() < 4 ) throw 11;
int counter=0;
for(int i=0;i<theValue2[3];i++){
for(int j=0;j<3;j++){
}*/
void BrukerObjectVaryingProperties::setOrientation(std::map<std::string, BrukerFieldData> & BrukerHM, std::vector<int> & LoopStruct){
- if (BrukerHM[(std::string) "ACQ_grad_matrix"].GetDoubleValue().size() != LoopStruct[3]*9) throw 0;
- if (LoopStruct.size() < 4 ) throw 0;
+ if (BrukerHM[(std::string) "ACQ_grad_matrix"].GetDoubleValue().size() != LoopStruct[3]*9) throw 12;
+ if (LoopStruct.size() < 4 ) throw 13;
std::vector<double> Temp1D(3,0.0);
std::vector<std::vector<double> > Temp2D;
double BrukerObjectVaryingProperties::getPositionTimePerNR(unsigned int theValue) const{
if (theValue <PositionTimePerNR.size() ) return PositionTimePerNR[theValue];
- else throw 0;
+ else throw 14;
}
void BrukerObjectVaryingProperties::setPositionTimePerNR(std::map<std::string, BrukerFieldData> & BrukerHM, std::vector<int> & LoopStruct){
if (BrukerHM[(std::string) "ACQ_temporal_delay"].GetDoubleValue().size()!=1&& BrukerHM[(std::string) "ACQ_temporal_delay"].GetDoubleValue().size()!=(LoopStruct.back()-1))
{
- throw 0;
+ throw 15;
}
if (BrukerHM[(std::string) "ACQ_temporal_delay"].GetDoubleValue().size()!=1&& BrukerHM[(std::string) "ACQ_temporal_delay"].GetDoubleValue().size()==(LoopStruct.back()-1))
{