contrib/mul/vil3d/file_formats/vil3d_dicom.h
Go to the documentation of this file.
00001 #ifndef vil3d_dicom_format_h_
00002 #define vil3d_dicom_format_h_
00003 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00004 #pragma interface
00005 #endif
00006 //:
00007 // \file
00008 // \brief Reader/Writer for DICOM format images.
00009 // \author Ian Scott, Chris Wolstenholme - Manchester
00010 
00011 #include <vcl_vector.h>
00012 #include <vil3d/vil3d_file_format.h>
00013 #include <vil3d/vil3d_image_resource.h>
00014 #include <vil3d/file_formats/vil3d_slice_list.h>
00015 #include <vil/vil_image_resource.h>
00016 
00017 
00018 #if 0
00019 //: Format class for a volume made up of a sequence of dicom slices.
00020 class vil3d_dicom_format : public vil3d_file_format
00021 {
00022  public:
00023   vil3d_dicom_format();
00024   virtual ~vil3d_dicom_format();
00025 
00026   virtual vil3d_image_resource_sptr make_input_image(const char *) const;
00027 
00028   //: Make a "generic_image" on which put_view may be applied.
00029   // The file may be opened immediately for writing so that a header can be written.
00030   virtual vil3d_image_resource_sptr make_output_image(const char* filename,
00031                                                       unsigned ni,
00032                                                       unsigned nj,
00033                                                       unsigned nk,
00034                                                       unsigned nplanes,
00035                                                       enum vil_pixel_format)const;
00036 
00037   //: default filename tag for this image.
00038   virtual const char * tag() const {return "dicom";}
00039 };
00040 #endif
00041 
00042 
00043 //: A DICOM volume on disk
00044 // You can't create one of these yourself.
00045 // Use vil3d_slice_list_format instead.
00046 class vil3d_dicom_image: public vil3d_slice_list_image
00047 {
00048  public:
00049   //: default filename tag for this image.
00050   virtual const char * file_format() const {return "dicom";}
00051   friend class vil3d_slice_list_format;
00052  protected:
00053 
00054   vil3d_dicom_image(const vcl_vector<vil_image_resource_sptr>& slices):
00055     vil3d_slice_list_image(slices) {}
00056 };
00057 
00058 
00059 #endif