pixel_dataset.h

Go to the documentation of this file.
00001 //--------------------------------------------------
00011 //---------------------------------------------------
00012 
00013 #ifndef PIXEL_DATASET_H
00014 #define PIXEL_DATASET_H
00015 
00016 #include "dataset.h"
00017 #include "../global/global_definitions.h"
00018 #include "../exceptions/null_pointer_exception.h"
00019 #include "../exceptions/index_out_of_bounds_exception.h"
00020 
00021 #include <vector>
00022 #include <boost/shared_array.hpp>
00023 
00024 #include <itkImage.h>
00025 #include <itkIntensityWindowingImageFilter.h>
00026 
00027 
00028 namespace imedgine 
00029 {
00030 
00031   //--------------------------------------------------
00046   //--------------------------------------------------
00047 
00048   class PixelDataset: public Dataset
00049   {
00050   public:
00051     
00052     //--------------------------------------------------
00059     
00060     PixelDataset(dataset_type type, dataset_key_type dataset_key, 
00061                  unsigned char num_dimensions, 
00062                  unsigned char num_bytes_per_pixel);
00063     
00064     //--------------------------------------------------
00067     
00068     virtual ~PixelDataset();
00069     
00070     //--------------------------------------------------
00074     
00075     metadata_pointer_type getMetadata() const;
00076     
00077     //--------------------------------------------------
00081     
00082     virtual external_data_pointer_type getData() const
00083         throw(NullPointerException) = 0;
00084     
00085     //--------------------------------------------------
00089     
00090     virtual unsigned char getNumDimensions() const;
00091     
00092     //--------------------------------------------------
00095 
00096     unsigned char getNumBytesPerPixel() const;
00097     
00098     //--------------------------------------------------
00103 
00104     dataset_position_type const& getSize() const;
00105     
00106     //--------------------------------------------------
00111   
00112     void setFocusPoint(dataset_position_type const& focus_point);
00113     
00114     //--------------------------------------------------
00120     
00121     void setFocusPointAt(unsigned char dimension, index_type index)
00122         throw(IndexOutOfBoundsException);
00123     
00124     //--------------------------------------------------
00131     
00132     dataset_position_type const& getFocusPoint() const;
00133     
00134     //--------------------------------------------------
00138     
00139     void setSpacings(std::vector<double> spacings);
00140     
00141     //--------------------------------------------------
00145     virtual size_type getNumElements() const;
00146     
00147     //----------------------------------------------------
00152 
00153     virtual void setIntensity(double window, double level) = 0;
00154 
00155     //----------------------------------------------------
00159  
00160     virtual double getIntensityWindow() const
00161         throw(NullPointerException) = 0;
00162 
00163     //----------------------------------------------------
00167     
00168     virtual double getIntensityLevel() const
00169         throw(NullPointerException) = 0;
00170 
00171     //----------------------------------------------------
00175     double getMinPixelValue() const;
00176 
00177     //----------------------------------------------------
00181     double getMaxPixelValue() const;
00182     
00183     //----------------------------------------------------
00189     
00190     void setTransformationMatrix(matrix_type const& matrix);
00191     
00192     //----------------------------------------------------
00198     
00199     matrix_type const& getTransformationMatrix() const;
00200     
00201     //----------------------------------------------------
00207     
00208     void setOffsetVector(offset_vector_type const& offset);
00209     
00210     //----------------------------------------------------
00216     
00217     offset_vector_type const& getOffsetVector() const;
00218     
00219   protected:
00220     
00221     //--------------------------------------------------
00224     
00225     unsigned char num_dimensions_;
00226     
00227     //--------------------------------------------------
00230     
00231     unsigned char num_bytes_per_pixel_;
00232     
00233     //--------------------------------------------------
00236 
00237     dataset_position_type dataset_size_;
00238         
00239     //--------------------------------------------------
00242     
00243     dataset_position_type current_focus_point_;
00244     
00245     //--------------------------------------------------
00248     
00249     std::vector<double> spacings_;
00250     
00251     //--------------------------------------------------
00254     
00255     double min_pixel_value_;
00256     
00257     
00258     //--------------------------------------------------
00261     
00262     double max_pixel_value_;
00263     
00264      //--------------------------------------------------
00267     
00268     matrix_type transformation_matrix_;
00269     
00270     //--------------------------------------------------
00273     
00274     offset_vector_type offset_vector_;
00275 
00276   protected:
00277   
00278     //--------------------------------------------------
00281     
00282     PixelDataset(PixelDataset const&);
00283     
00284   private:
00285     
00286     //--------------------------------------------------
00289     
00290     PixelDataset& operator = (PixelDataset const&) { return(*this); }
00291   };
00292 
00293 }
00294 
00295 #endif // IMEDGINEPixelDataset_H

Generated on Sun Aug 13 18:19:39 2006 for iMEDgine by  doxygen 1.4.6