]> Creatis software - creaBruker.git/commitdiff
replace unapropriate names 'setXXX' by 'computeXXX'
authorjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Wed, 27 May 2009 12:44:03 +0000 (12:44 +0000)
committerjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Wed, 27 May 2009 12:44:03 +0000 (12:44 +0000)
lib/src1/brukerobjectvaryingproperties.cpp
lib/src1/brukerobjectvaryingproperties.h

index cbdac4e1d5246c3d9eaf93e714bf4a3e0b7290e3..67f649b65c2530aca6246ba169f579bfce82b10f 100644 (file)
@@ -24,20 +24,20 @@ BrukerObjectVaryingProperties::~BrukerObjectVaryingProperties()
 
 
 
-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();
 };
 
@@ -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<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;
@@ -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<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;
 
@@ -149,12 +149,12 @@ void BrukerObjectVaryingProperties::setOrientation(std::map<std::string, BrukerF
    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];
@@ -199,13 +199,13 @@ void BrukerObjectVaryingProperties::setPositionTimePerNR(std::map<std::string, B
  */
 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;
 } 
index 8e7d76ad02ff7c74354314c60d9b8ed0033f5716..625e62f219de0ba5b3e0dfe8eb0a242393bf9e8e 100644 (file)
@@ -45,13 +45,13 @@ public:
 
 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;