X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Fsrc1%2Fbrukerobjectvaryingproperties.cpp;h=cbdac4e1d5246c3d9eaf93e714bf4a3e0b7290e3;hb=dc999ac989fde4e454da55bf7f12065b434ab445;hp=5e9b92cd9fdeb75e07aaa3b10dc03fed43f93eb2;hpb=745d14017342932762705cad88c3d4abf42cc9e3;p=creaBruker.git diff --git a/lib/src1/brukerobjectvaryingproperties.cpp b/lib/src1/brukerobjectvaryingproperties.cpp index 5e9b92c..cbdac4e 100644 --- a/lib/src1/brukerobjectvaryingproperties.cpp +++ b/lib/src1/brukerobjectvaryingproperties.cpp @@ -10,7 +10,7 @@ // // #include "brukerobjectvaryingproperties.h" - +//#include "brukerexception.h" BrukerObjectVaryingProperties::BrukerObjectVaryingProperties() @@ -53,7 +53,7 @@ double BrukerObjectVaryingProperties::getTE(unsigned int theValue) const{ 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) @@ -63,7 +63,7 @@ double BrukerObjectVaryingProperties::getPositionP(unsigned int theValue) const 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) @@ -73,7 +73,7 @@ double BrukerObjectVaryingProperties::getPositionR(unsigned int theValue) const 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) @@ -83,35 +83,35 @@ double BrukerObjectVaryingProperties::getPositionS(unsigned int theValue) const int BrukerObjectVaryingProperties::getAcquisitionOrder(unsigned int theValue) const{ if (theValue & 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 & BrukerHM, std::vector & LoopStruct){ std::vector 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 > BrukerObjectVaryingProperties::getOrientation(unsigned int theValue) const{ - if (theValue & 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 > BrukerObjectVaryingProperties::getOr }*/ void BrukerObjectVaryingProperties::setOrientation(std::map & BrukerHM, std::vector & 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 Temp1D(3,0.0); std::vector > Temp2D; @@ -151,7 +151,7 @@ void BrukerObjectVaryingProperties::setOrientation(std::map & BrukerHM, std::vector & LoopStruct){ @@ -181,7 +181,7 @@ void BrukerObjectVaryingProperties::setPositionTimePerNR(std::map