]> Creatis software - clitk.git/commitdiff
- essai pour compiler plus vite
authordsarrut <dsarrut>
Tue, 2 Mar 2010 12:20:50 +0000 (12:20 +0000)
committerdsarrut <dsarrut>
Tue, 2 Mar 2010 12:20:50 +0000 (12:20 +0000)
common/CMakeLists.txt
common/clitkImageToImageGenericFilter.h
common/vvFromITK.h
filters/clitkGuerreroVentilationGenericFilter.cxx
filters/clitkGuerreroVentilationGenericFilter.h
filters/clitkImageResampleGenericFilter.cxx
filters/clitkImageResampleGenericFilter.h

index 38eb7e11a75864c483597d89788faaeeb73b3f58..e2a679508f181ca9bd9b812ff96ab92e1f7a4c4b 100644 (file)
@@ -6,7 +6,7 @@ INCLUDE(${PROJECT_SOURCE_DIR}/cmake/common.cmake)
 #=========================================================
 
 #=========================================================
-# make clitk libraries
+# make clitk libraries*
 
 SET(clitkCommon_SRC
   clitkCommon.cxx 
@@ -25,7 +25,7 @@ SET(clitkCommon_SRC
   clitkXdrImageIOFactory.cxx
   clitkOrientation.cxx
   vvImage.cxx
-  clitkImageToImageGenericFilter.cxx
+  clitkImageToImageGenericFilterBase.cxx
   clitkSignal.cxx  
 )  
 
index eb244b8e5bdf724060a3ef2ba64c25f2a6ede9e9..a27ce67292f68e168760760cc519b00f55eb48c2 100644 (file)
@@ -3,8 +3,8 @@
   Program:   clitk
   Module:    $RCSfile: clitkImageToImageGenericFilter.h,v $
   Language:  C++
-  Date:      $Date: 2010/02/09 14:40:55 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2010/03/02 12:20:50 $
+  Version:   $Revision: 1.8 $
   Author :   Joel Schaerer <joel.schaerer@creatis.insa-lyon.fr>
              David Sarrut <david.sarrut@creatis.insa-lyon.fr>
 
 #define CLITKIMAGETOIMAGEGENERICFILTER_H
 
 // clitk include
-#include "clitkCommon.h"
-#include "clitkImageCommon.h"
-#include "clitkCommonGenericFilter.h"
-#include <itkImage.h>
-
-// vv include
-#include <vvImage.h>
-#include <vvFromITK.h>
-#include <vvToITK.h>
-#include <list>
-#include <set>
+#include "clitkImageToImageGenericFilterBase.h"
 
 namespace clitk {
   
-  //--------------------------------------------------------------------
-  class ImageToImageGenericFilterBase: public itk::Object {
-    
-  public: 
-    // constructor - destructor
-    ImageToImageGenericFilterBase(std::string filterName);
-    virtual ~ImageToImageGenericFilterBase() {}
-
-    // Types
-    typedef ImageToImageGenericFilterBase Self;
-    typedef Object                        Superclass;
-    typedef itk::SmartPointer<Self>       Pointer;
-    typedef itk::SmartPointer<const Self> ConstPointer;
-
-    // Filters information
-    const std::string & GetFilterName() { return mFilterName; }
-    void SetFilterName(std::string & n) { mFilterName = n; }
-
-    // Generic IO
-    /// Returns the dimension and pixel type of the *first* input
-    void GetInputImageDimensionAndPixelType(unsigned int& dim, std::string& pixeltype,unsigned int & components);
-
-    // File IO
-    void SetInputFilename(const std::string & filename);
-    void AddInputFilename(const std::string & filename);
-    void SetInputFilenames(const std::vector<std::string> & filenames);
-    void SetOutputFilename(const std::string & filename);
-    void AddOutputFilename(const std::string & filename);
-    void SetOutputFilenames(const std::vector<std::string> & filenames);
-    std::string GetOutputFilename();
-    void SetIOVerbose(bool b) { mIOVerbose = b; }
-
-    // VVImage IO
-    void SetInputVVImage (vvImage::Pointer input);
-    void SetInputVVImages (std::vector<vvImage::Pointer> input);
-    void AddInputVVImage (vvImage::Pointer input);
-    vvImage::Pointer GetOutputVVImage ();
-    std::vector<vvImage::Pointer> GetOutputVVImages ();
-
-    // Information on available image types
-    void PrintAvailableImageTypes();
-    virtual std::string GetAvailableImageTypes() = 0;
-
-    virtual bool CheckImageType(unsigned int dim,unsigned int ncomp, std::string pixeltype) = 0;
-    virtual bool CheckImageType() = 0;
-
-    // Main function to call for using the filter. 
-    virtual bool Update() = 0;
-
-  protected:  
-    /// Call this function to dispatch an output towards the correct sink
-    template<class ImageType> 
-    void SetNextOutput(typename ImageType::Pointer output);
-
-    /// Call this function to get the nth itk input image, regardless of input source
-    template<class ImageType> 
-    typename ImageType::Pointer GetInput(unsigned int n);
-
-    std::vector<std::string> mInputFilenames;
-    std::list<std::string> mOutputFilenames;
-
-    bool mIOVerbose;
-    unsigned int mDim;
-    std::string mPixelTypeName;
-    unsigned int mNbOfComponents;
-    std::string mFilterName;
-
-    std::vector<vvImage::Pointer> mInputVVImages;
-    std::vector<vvImage::Pointer> mOutputVVImages;
-
-    void ImageTypeError();
-    void SetImageTypeError();
-    bool mFailOnImageTypeError;
-
-  }; // end class clitk::ImageToImageGenericFilter
-
-
-  //--------------------------------------------------------------------
+//--------------------------------------------------------------------
   template<class FilterType>
   class ImageToImageGenericFilter: public ImageToImageGenericFilterBase {
     
@@ -145,13 +58,7 @@ namespace clitk {
     
   }; // end class clitk::ImageToImageGenericFilter
 
-  // #define ADD_IMAGE_DIMENSION(DIM) Initialize<DIM>();
-
-#define ADD_VEC_IMAGE_TYPE(DIM, COMP, PT) this->mImageTypesManager.template AddNewDimensionAndPixelType<DIM,COMP, PT>();
-#define ADD_IMAGE_TYPE(DIM, PT) this->mImageTypesManager.template AddNewDimensionAndPixelType<DIM, PT>();
-
-
-#include "clitkImageToImageGenericFilter.txx"
+#include "clitkImageToImageGenericFilter.txx"  
 
 } // end namespace
 
index 4d43c61d22d386e7b79792981ac233c5fab98aac..9e1f7c1c61e8aee0d3eab373c1bdf012359efa9f 100644 (file)
@@ -22,13 +22,13 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 =========================================================================*/
 
-#ifndef vvImageFromITK_h
-#define vvImageFromITK_h
+#ifndef VVIMAGEFROMITK_H
+#define VVIMAGEFROMITK_H
 
 #include "vvImage.h"
-#include <itkImage.h>
+//#include <itkImage.h>
 #include <itkExtractImageFilter.h>
-#include "itkImageToVTKImageFilter.h"
+#include <itkImageToVTKImageFilter.h>
 
 /**Converts the itk image to vv, handling the 4D problem
  * The time_sequence boolean specifies that the image is to be interpreted as a time sequence,
index 1a2dcd66e74155daf09c5723165409d38cff9127..5df7bea4b3b38ba2f5da01577cdf734ae550e2bd 100644 (file)
@@ -19,8 +19,6 @@
  * @brief  
  -------------------------------------------------------------------*/
 
-#include <sstream>
-#include <vector>
 #include "clitkGuerreroVentilationGenericFilter.h"
 #include <itkBinaryGuerreroFilter.h>
 #include <itkImageDuplicator.h>
index 5d1062a54c9080c02fcc0719f7fc981e40d676fb..6b9ec7cca378c9bf4f20b15bb2b8820a069a40e0 100644 (file)
@@ -21,8 +21,6 @@
  -------------------------------------------------------------------*/
 
 // clitk include
-#include "clitkCommon.h"
-#include "clitkImageCommon.h"
 #include "clitkImageToImageGenericFilter.h"
 
 // itk include
index da510c6d1e50b712a3480fba1be7e92b668770c8..7302cbee6120c560ce7684e645457b8d21c163c3 100644 (file)
 
 #include "clitkImageResampleGenericFilter.h"
 
+// itk include
+#include "itkImage.h"
+#include "itkImageFileReader.h"
+#include "itkImageSeriesReader.h"
+#include "itkImageFileWriter.h"
+#include "itkRecursiveGaussianImageFilter.h"
+#include "itkResampleImageFilter.h"
+#include "itkAffineTransform.h"
+#include "itkNearestNeighborInterpolateImageFunction.h"
+#include "itkLinearInterpolateImageFunction.h"
+#include "itkBSplineInterpolateImageFunction.h"
+#include "itkBSplineInterpolateImageFunctionWithLUT.h"
+#include "itkCommand.h"
+
 //--------------------------------------------------------------------
 clitk::ImageResampleGenericFilter::ImageResampleGenericFilter():
   ImageToImageGenericFilter<Self>("ImageResample") {
index 5bd8972ab23da3900b295a94555887c1a486d8fd..f9ad50aa59d6ff9849bc8050109bdfe65bd6e196 100644 (file)
  -------------------------------------------------------------------*/
 
 // clitk include
-#include "clitkCommon.h"
-#include "clitkImageCommon.h"
 #include "clitkImageToImageGenericFilter.h"
 
-// itk include
-#include "itkImage.h"
-#include "itkImageFileReader.h"
-#include "itkImageSeriesReader.h"
-#include "itkImageFileWriter.h"
-#include "itkRecursiveGaussianImageFilter.h"
-#include "itkResampleImageFilter.h"
-#include "itkAffineTransform.h"
-#include "itkNearestNeighborInterpolateImageFunction.h"
-#include "itkLinearInterpolateImageFunction.h"
-#include "itkBSplineInterpolateImageFunction.h"
-#include "itkBSplineInterpolateImageFunctionWithLUT.h"
-#include "itkCommand.h"
-
 namespace clitk {
   
   //--------------------------------------------------------------------
@@ -76,7 +60,7 @@ namespace clitk {
   }; // end class ImageResampleGenericFilter
   //--------------------------------------------------------------------
     
-#include "clitkImageResampleGenericFilter.txx"
+  //#include "clitkImageResampleGenericFilter.txx"
 
 } // end namespace
 //--------------------------------------------------------------------