From: jean-pierre roux Date: Wed, 27 May 2009 12:44:03 +0000 (+0000) Subject: replace unapropriate names 'setXXX' by 'computeXXX' X-Git-Tag: CREATOOLS.2-0-3~47 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=6c51f991a56cc139369c0ec133093dac70fa02b4;p=creaBruker.git replace unapropriate names 'setXXX' by 'computeXXX' --- diff --git a/lib/src1/brukerobjectvaryingproperties.cpp b/lib/src1/brukerobjectvaryingproperties.cpp index cbdac4e..67f649b 100644 --- a/lib/src1/brukerobjectvaryingproperties.cpp +++ b/lib/src1/brukerobjectvaryingproperties.cpp @@ -24,20 +24,20 @@ BrukerObjectVaryingProperties::~BrukerObjectVaryingProperties() -void BrukerObjectVaryingProperties::setPositionS(std::map & BrukerHM){ +void BrukerObjectVaryingProperties::computePositionS(std::map & BrukerHM){ std::vector PosiS =BrukerHM[(std::string) "ACQ_slice_offset"].GetDoubleValue(); PositionS =PosiS; }; -void BrukerObjectVaryingProperties::setPositionR(std::map & BrukerHM){ +void BrukerObjectVaryingProperties::computePositionR(std::map & BrukerHM){ PositionR =BrukerHM[(std::string) "ACQ_read_offset"].GetDoubleValue() ; }; -void BrukerObjectVaryingProperties::setPositionP(std::map & BrukerHM){ +void BrukerObjectVaryingProperties::computePositionP(std::map & BrukerHM){ PositionP =BrukerHM[(std::string) "ACQ_phase1_offset"].GetDoubleValue(); }; -void BrukerObjectVaryingProperties::setTE(std::map & BrukerHM){ +void BrukerObjectVaryingProperties::computeTE(std::map & BrukerHM){ TE = BrukerHM[(std::string) "ACQ_echo_time"].GetDoubleValue(); }; @@ -46,7 +46,7 @@ double BrukerObjectVaryingProperties::getTE(unsigned int theValue) const{ else throw 0; } -/*void BrukerObjectVaryingProperties::setTE(const std::vector< double >& theValue) +/*void BrukerObjectVaryingProperties::computeTE(const std::vector< double >& theValue) { TE = theValue; }*/ @@ -56,7 +56,7 @@ double BrukerObjectVaryingProperties::getPositionP(unsigned int theValue) const else throw 1; } -/*void BrukerObjectVaryingProperties::setPositionP(const std::vector< double >& theValue) +/*void BrukerObjectVaryingProperties::computePositionP(const std::vector< double >& theValue) { PositionP = theValue; }*/ @@ -66,7 +66,7 @@ double BrukerObjectVaryingProperties::getPositionR(unsigned int theValue) const else throw 2; } -/*void BrukerObjectVaryingProperties::setPositionR(const std::vector< double >& theValue) +/*void BrukerObjectVaryingProperties::computePositionR(const std::vector< double >& theValue) { PositionP = theValue; }*/ @@ -76,7 +76,7 @@ double BrukerObjectVaryingProperties::getPositionS(unsigned int theValue) const else throw 3; } -/*void BrukerObjectVaryingProperties::setPositionS(const std::vector< double >& theValue) +/*void BrukerObjectVaryingProperties::computePositionS(const std::vector< double >& theValue) { PositionP = theValue; }*/ @@ -86,7 +86,7 @@ int BrukerObjectVaryingProperties::getAcquisitionOrder(unsigned int theValue) c 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; @@ -94,7 +94,7 @@ int BrukerObjectVaryingProperties::getAcquisitionOrder(unsigned int theValue) c for (int i =0 ;i & BrukerHM, std::vector & LoopStruct){ +void BrukerObjectVaryingProperties::computeAcquisitionOrder(std::map & BrukerHM, std::vector & LoopStruct){ std::vector AcqOrder; if (BrukerHM[(std::string) "ACQ_obj_order"].GetIntValue().size() != LoopStruct[3]*LoopStruct[1]) throw 7; if (LoopStruct.size() < 4 ) throw 8; @@ -108,7 +108,7 @@ std :: vector < std :: vector < double > > BrukerObjectVaryingProperties::getOr 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; @@ -123,7 +123,7 @@ std :: vector < std :: vector < double > > BrukerObjectVaryingProperties::getOr } }*/ -void BrukerObjectVaryingProperties::setOrientation(std::map & BrukerHM, std::vector & LoopStruct){ +void BrukerObjectVaryingProperties::computeOrientation(std::map & BrukerHM, std::vector & LoopStruct){ if (BrukerHM[(std::string) "ACQ_grad_matrix"].GetDoubleValue().size() != LoopStruct[3]*9) throw 12; if (LoopStruct.size() < 4 ) throw 13; @@ -149,12 +149,12 @@ void BrukerObjectVaryingProperties::setOrientation(std::map & BrukerHM, std::vector & LoopStruct){ +void BrukerObjectVaryingProperties::computePositionTimePerNR(std::map & BrukerHM, std::vector & LoopStruct){ double FloatPositionTimePerNR=BrukerHM[(std::string) "ACQ_repetition_time"].GetDoubleValue()[0]; int i=0; int NA=BrukerHM[(std::string) "NA"].GetIntValue()[0]; @@ -199,13 +199,13 @@ void BrukerObjectVaryingProperties::setPositionTimePerNR(std::map & BrukerHM, std::vector & 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; } diff --git a/lib/src1/brukerobjectvaryingproperties.h b/lib/src1/brukerobjectvaryingproperties.h index 8e7d76a..625e62f 100644 --- a/lib/src1/brukerobjectvaryingproperties.h +++ b/lib/src1/brukerobjectvaryingproperties.h @@ -45,13 +45,13 @@ public: private: - void setPositionTimePerNR (std::map &BrukerHM, std::vector &LoopStruct); - void setOrientation (std::map &BrukerHM, std::vector &LoopStruct); - void setAcquisitionOrder (std::map &BrukerHM, std::vector &LoopStruct); - void setPositionS (std::map &BrukerHM); - void setPositionR (std::map &BrukerHM); - void setPositionP (std::map &BrukerHM); - void setTE (std::map &BrukerHM); + void computePositionTimePerNR (std::map &BrukerHM, std::vector &LoopStruct); + void computeOrientation (std::map &BrukerHM, std::vector &LoopStruct); + void computeAcquisitionOrder (std::map &BrukerHM, std::vector &LoopStruct); + void computePositionS (std::map &BrukerHM); + void computePositionR (std::map &BrukerHM); + void computePositionP (std::map &BrukerHM); + void computeTE (std::map &BrukerHM); std::vector TE; std::vector PositionR; std::vector PositionP;