volume_pixel_dataset.h

Go to the documentation of this file.
00001 //--------------------------------------------------
00011 //---------------------------------------------------
00012 
00013 #ifndef IMEDGINE_VOLUME_PIXEL_DATASET_H
00014 #define IMEDGINE_VOLUME_PIXEL_DATASET_H
00015 
00016 #include "../global/global_definitions.h"
00017 #include "dataset_definitions.h"
00018 #include "pixel_dataset.h"
00019 #include "../exceptions/null_pointer_exception.h"
00020 #include "../exceptions/index_out_of_bounds_exception.h"
00021 
00022 #include <boost/shared_ptr.hpp>
00023 
00024 #include <vector>
00025 #include <memory>
00026 #include <itkImage.h>
00027 #include <itkExtractImageFilter.h>
00028 #include <itkResampleImageFilter.h>
00029 #include <itkAffineTransform.h>
00030 
00031 namespace imedgine 
00032 {
00033   //--------------------------------------------------
00047   //--------------------------------------------------
00048   
00049   class VolumePixelDataset : public PixelDataset
00050   {
00051   public: 
00052 
00053     //--------------------------------------------------
00059     
00060     VolumePixelDataset(dataset_type type, dataset_key_type dataset_key,
00061                        unsigned char num_bytes_per_pixel);
00062     
00063     //--------------------------------------------------
00066     
00067     virtual ~VolumePixelDataset();
00068     
00069     //----------------------------------------------------
00075     
00076     void setTransformationMatrix(matrix_type const& matrix);
00077     
00078     //----------------------------------------------------
00084     
00085     void setOffsetVector(offset_vector_type const& offset);
00086     
00087     //--------------------------------------------------
00093       
00094     virtual external_data_pointer_type getSliceXY(index_type z_index)
00095       throw(NullPointerException, IndexOutOfBoundsException) = 0;
00096     
00097     //--------------------------------------------------
00103       
00104     virtual external_data_pointer_type getSliceXZ(index_type y_index)
00105       throw(NullPointerException, IndexOutOfBoundsException) = 0;
00106     
00107     //--------------------------------------------------
00113       
00114     virtual external_data_pointer_type getSliceYZ(index_type x_index)
00115       throw(NullPointerException, IndexOutOfBoundsException) = 0;
00116     
00117     //--------------------------------------------------
00124     
00125     virtual dataset_pointer_type getImageXY(index_type z_index, dataset_key_type image_key)
00126         throw(NullPointerException, IndexOutOfBoundsException) = 0;
00127     
00128     //--------------------------------------------------
00135       
00136     virtual dataset_pointer_type getImageXZ(index_type y_index, dataset_key_type image_key)
00137         throw(NullPointerException, IndexOutOfBoundsException) = 0;
00138     
00139     //--------------------------------------------------
00146       
00147     virtual dataset_pointer_type getImageYZ(index_type x_index, dataset_key_type image_key)
00148         throw(NullPointerException, IndexOutOfBoundsException) = 0;
00149     
00150     //--------------------------------------------------
00155     
00156     void setRegionsOfInterestForSliceXY(
00157         index_type z_index, std::vector<region_of_interest_type> const& regions_of_interest)
00158         throw(IndexOutOfBoundsException);
00159     
00160     //--------------------------------------------------
00165     
00166     void setRegionsOfInterestForSliceXZ(
00167         index_type y_index, std::vector<region_of_interest_type> const& regions_of_interest)
00168         throw(IndexOutOfBoundsException);
00169     
00170      //--------------------------------------------------
00175     
00176     void setRegionsOfInterestForSliceYZ(
00177         index_type x_index, std::vector<region_of_interest_type> const& regions_of_interest)
00178         throw(IndexOutOfBoundsException);
00179     
00180     //--------------------------------------------------
00185     
00186     std::vector<region_of_interest_type> const& getRegionsOfInterestForSliceXY(
00187         index_type z_index) const
00188         throw(IndexOutOfBoundsException);
00189     
00190     //--------------------------------------------------
00195     
00196     std::vector<region_of_interest_type> const& getRegionsOfInterestForSliceXZ(
00197         index_type y_index) const
00198         throw(IndexOutOfBoundsException);
00199     
00200     //--------------------------------------------------
00205     
00206     std::vector<region_of_interest_type> const& getRegionsOfInterestForSliceYZ(
00207         index_type x_index) const
00208         throw(IndexOutOfBoundsException);
00209 
00210     
00211   protected:
00212   
00213     //--------------------------------------------------
00216     
00217     VolumePixelDataset(VolumePixelDataset const& src);
00218     
00219     //--------------------------------------------------
00222     
00223     VolumePixelDataset& operator = (VolumePixelDataset const&) { return(*this); }
00224     
00225     //--------------------------------------------------
00228     typedef external_image_type slice_type;
00229     
00230     //--------------------------------------------------
00233     typedef itk::AffineTransform<double, 3> transform_type;
00234     
00235     //--------------------------------------------------
00238     transform_type::Pointer transform_;
00239     
00240     //--------------------------------------------------
00243     std::vector<std::vector<region_of_interest_type> > xy_slice_rois_;
00244     
00245     //--------------------------------------------------
00248     std::vector<std::vector<region_of_interest_type> > xz_slice_rois_;
00249     
00250     //--------------------------------------------------
00253     std::vector<std::vector<region_of_interest_type> > yz_slice_rois_;
00254     
00255   };
00256 
00257 }
00258 
00259 #endif // IMEDGINE3D_DATASET_H

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