]> Creatis software - clitk.git/blobdiff - vv/vvImageReader.h
Add EPID conversion (2^16 - value)/alpha
[clitk.git] / vv / vvImageReader.h
index 702af66dc18777bfb04eb15d890410bfa7b8b056..cbe7d1607e62b63c1bca49cdaeb93fd8cf8ed909 100644 (file)
 #include "vvImage.h"
 #include "vvConstants.h"
 
-class vvImageReader : public QThread {
+class vvImageReader : public itk::LightObject, public QThread {
 
 public:
-    vvImageReader();
-    ~vvImageReader();
+  typedef vvImageReader Self;
+  typedef itk::SmartPointer<Self> Pointer;
+  itkNewMacro(Self);
 
-    void SetInputFilename(const std::string & filename);
-    void SetInputFilenames(const std::vector<std::string> & filenames);
+  void SetInputFilename(const std::string & filename);
+  void SetInputFilenames(const std::vector<std::string> & filenames);
 
-    vvImage::Pointer GetOutput() {
-        return mImage;
-    }
+  vvImage::Pointer GetOutput() {
+      return mImage;
+  }
 
-    std::string GetLastError() {
-        return mLastError;
-    }
+  std::string GetLastError() {
+      return mLastError;
+  }
 
-    //====================================================================
-    // Main function
-    void Update();
-    void Update(LoadedImageType type);
-    void Update(int dim, std::string InputPixelType, LoadedImageType type);
-    //void Extract(int dim, std::string InputPixelType, int slice);
+  void SetSlice(unsigned int i) { mSlice = i; }
 
-protected:
-    void run();
-    //====================================================================
-    std::vector<std::string> mInputFilenames;
-    ///Method used to load the image, see vvConstants.h for definition
-    LoadedImageType mType;
-    itk::Command::Pointer mObserver;
-
-    std::string mLastError;
-
-    //====================================================================
-    template<unsigned int VImageDimension>
-    void UpdateWithDim(std::string inputPixelType);
-
-    //====================================================================
-    /*template<unsigned int VImageDimension>
-    void ExtractWithDim(std::string inputPixelType, int slice);*/
-
-    //====================================================================
-    template<class InputPixelType, unsigned int VImageDimension>
-    void UpdateWithDimAndInputPixelType();
-    ///Input dimension and pixel type
-    int mDim;
-    std::string mInputPixelType;
+  //====================================================================
+  // Main function
+  void Update();
+  void Update(LoadedImageType type);
+  void Update(int dim, std::string InputPixelType, LoadedImageType type);
 
+protected:
+  void run();
+  //====================================================================
+  std::vector<std::string> mInputFilenames;
+  ///Method used to load the image, see vvConstants.h for definition
+  LoadedImageType mType;
+  unsigned int mSlice;
+  itk::Command::Pointer mObserver;
+
+  std::string mLastError;
+
+  //====================================================================
+  template<unsigned int VImageDimension>
+  void UpdateWithDim(std::string inputPixelType);
+
+  //====================================================================
+  /*template<unsigned int VImageDimension>
+  void ExtractWithDim(std::string inputPixelType, int slice);*/
+
+  //====================================================================
+  template<class InputPixelType, unsigned int VImageDimension>
+  void UpdateWithDimAndInputPixelType();
+  ///Input dimension and pixel type
+  int mDim;
+  std::string mInputPixelType;
+
+  //====================================================================
+  void ReadNkiImageTransform();
+  void ReadMatImageTransform();
 private:
-    vvImage::Pointer mImage;
+  vvImageReader();
+  ~vvImageReader();
 
+  vvImage::Pointer mImage;
 }; // end class vvImageReader
 
 #endif /* end #define CLITKvvImageReader_H */