]> Creatis software - clitk.git/commitdiff
Merge branch 'master' of /home/dsarrut/clitk3.server
authorSimon Rit <simon.rit@creatis.insa-lyon.fr>
Thu, 10 Nov 2011 15:11:58 +0000 (16:11 +0100)
committerSimon Rit <simon.rit@creatis.insa-lyon.fr>
Thu, 10 Nov 2011 15:11:58 +0000 (16:11 +0100)
itk/clitkRelativePositionDataBase.cxx
itk/clitkRelativePositionDataBase.h
itk/itkBSplineInterpolateImageFunctionWithLUT.h
tools/CMakeLists.txt
tools/clitkGammaIndex.cxx
tools/clitkGammaIndex.ggo

index a9b73273387f9beafc94934425fc58649292500a..1512e4c9059cfa1c9466d308473960cdfb4214bf 100644 (file)
@@ -231,7 +231,14 @@ namespace clitk {
     return true;
   }
   //--------------------------------------------------------------------
-  
+
+  //--------------------------------------------------------------------
+  std::ostream& operator<<(std::ostream & os, const clitk::RelativePositionInformationType & rp)
+  {
+    rp.Print(os);
+    return os;
+  }
+  //--------------------------------------------------------------------
 
 } // end namespace clitk
 //--------------------------------------------------------------------
index 57cdcec3f2ea70c93f6c5814b7d176efddaf420a..fa83a3ea3b3fe8dd9c07db2eabd5ffca8f50a010 100644 (file)
@@ -109,6 +109,7 @@ namespace clitk {
       os << std::endl;
     }
   };
+  std::ostream& operator<<(std::ostream & os, const clitk::RelativePositionInformationType & rp);
   //--------------------------------------------------------------------
 
 
index 5903828d9b7e38885eec3203ed4080dbf4f231a5..7fd7ab81e0686efcb26a4035d487958eaebaed22 100644 (file)
@@ -61,6 +61,14 @@ namespace itk {
     /** Set the input image.  This must be set by the user. */
     virtual void SetInputImage(const TImageType * inputData);
     
+    /** Evaluate the function at a ContinuousIndex position.
+  Overwritten for taking LUT into account (RP: multi-threading-compatible version, 
+  the threadID is actually ignored) */  
+    virtual OutputType EvaluateAtContinuousIndex(const ContinuousIndexType & index, unsigned int /* threadID */ ) const
+    {
+      return this->EvaluateAtContinuousIndex( index );
+    }
+
     /** Evaluate the function at a ContinuousIndex position.
        Overwritten for taking LUT into account */  
     virtual OutputType EvaluateAtContinuousIndex(const ContinuousIndexType & index ) const;
index bd565421b4a05493b26ef8bcf3df9b1466c75b4b..2484c48ed5c8c478db63e1cdda7cdbd22c23bcee 100644 (file)
@@ -321,7 +321,7 @@ IF (CLITK_BUILD_TOOLS)
   SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkLabelImageOverlapMeasure)
 
   WRAP_GGO(clitkRelativePositionAnalyzer_GGO_C clitkRelativePositionAnalyzer.ggo)
-  ADD_EXECUTABLE(clitkRelativePositionAnalyzer clitkRelativePositionAnalyzer.cxx ${clitkRelativePositionAnalyzer_GGO_C})
+  ADD_EXECUTABLE(clitkRelativePositionAnalyzer ../itk/clitkRelativePositionDataBase.cxx clitkRelativePositionAnalyzer.cxx ${clitkRelativePositionAnalyzer_GGO_C})
   TARGET_LINK_LIBRARIES(clitkRelativePositionAnalyzer clitkSegmentationGgoLib clitkCommon ${ITK_LIBRARIES})
   SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkRelativePositionAnalyzer)
 
@@ -331,7 +331,7 @@ IF (CLITK_BUILD_TOOLS)
   SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkRelativePositionDataBaseAnalyzer)
 
   WRAP_GGO(clitkRelativePositionDataBaseBuilder_GGO_C clitkRelativePositionDataBaseBuilder.ggo)
-  ADD_EXECUTABLE(clitkRelativePositionDataBaseBuilder clitkRelativePositionDataBaseBuilder.cxx ${clitkRelativePositionDataBaseBuilder_GGO_C})
+  ADD_EXECUTABLE(clitkRelativePositionDataBaseBuilder ../itk/clitkRelativePositionDataBase.cxx clitkRelativePositionDataBaseBuilder.cxx ${clitkRelativePositionDataBaseBuilder_GGO_C})
   TARGET_LINK_LIBRARIES(clitkRelativePositionDataBaseBuilder clitkSegmentationGgoLib clitkCommon ${ITK_LIBRARIES})
   SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkRelativePositionDataBaseBuilder)
 
index be0f8072218330f4b82a99ddc7c1b7f50419698e..7e5a92eba7cf32d67775e1910d596290c8f5eee9 100644 (file)
@@ -224,6 +224,17 @@ int main(int argc,char * argv[])
     // load reference
     vtkImageData* reference = loadImage(reference_filename);
     assert(reference);
+    // translate target with arguments values
+    // reference is translated instead of target so that the output space stay the same as target
+    {
+       double reference_origin[3];
+        reference->GetOrigin(reference_origin);
+       reference_origin[0] -= args_info.translation_x_arg;
+       reference_origin[1] -= args_info.translation_y_arg;
+       reference_origin[2] -= args_info.translation_z_arg;
+       reference->SetOrigin(reference_origin);
+    }
 
     // intensity normalisation
     if (!use_dose_margin) {
@@ -246,6 +257,7 @@ int main(int argc,char * argv[])
     vtkImageData* target = loadImage(target_filename);
     assert(target);
 
+
     // allocate output
     OutputImageType::Pointer output = OutputImageType::New();
     {
index 20c87f97b31c0fa99f6f6455411e7c83f2404e86..b41ba75472dde24713cb1f5c5808d054db0e2ba3 100644 (file)
@@ -12,4 +12,7 @@ option "output"    o  "Output image filename"   string   yes
 option "spatial-margin"   s    "Spatial margin [mm]"     double   yes
 option "relative-dose-margin"   r      "Dose margin relative to max dose in reference [%]"       double   no
 option "absolute-dose-margin"   d      "Absolute dose margin [Gray]"     double   no
+option "translation-x"   x     "Target relative position x [mm]"         double   default="0" no
+option "translation-y"   y     "Target relative position y [mm]"         double   default="0" no
+option "translation-z"   z     "Target relative position z [mm]"         double   default="0" no