Go to the documentation of this file.00001 #ifndef vil3d_slice_list_h_
00002 #define vil3d_slice_list_h_
00003 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00004 #pragma interface
00005 #endif
00006
00007
00008
00009
00010
00011 #include <vcl_vector.h>
00012 #include <vil3d/vil3d_file_format.h>
00013 #include <vil3d/vil3d_image_resource.h>
00014 #include <vil/vil_image_resource.h>
00015
00016
00017
00018
00019
00020
00021
00022
00023 class vil3d_slice_list_format : public vil3d_file_format
00024 {
00025 public:
00026 vil3d_slice_list_format();
00027 virtual ~vil3d_slice_list_format();
00028
00029 virtual vil3d_image_resource_sptr make_input_image(const char *) const;
00030
00031
00032
00033 virtual vil3d_image_resource_sptr make_output_image(const char* filename,
00034 unsigned ni,
00035 unsigned nj,
00036 unsigned nk,
00037 unsigned nplanes,
00038 enum vil_pixel_format)const;
00039
00040
00041 virtual const char * tag() const {return "slice_list";}
00042 };
00043
00044
00045
00046
00047
00048 vil3d_image_resource_sptr
00049 vil3d_slice_list_to_volume(const vcl_vector<vil_image_resource_sptr> &);
00050
00051
00052
00053
00054 class vil3d_slice_list_image: public vil3d_image_resource
00055 {
00056
00057 vcl_vector<vil_image_resource_sptr> slices_;
00058
00059 friend vil3d_image_resource_sptr
00060 vil3d_slice_list_to_volume(const vcl_vector<vil_image_resource_sptr> &);
00061 friend class vil3d_slice_list_format;
00062
00063 protected:
00064 vil3d_slice_list_image(const vcl_vector<vil_image_resource_sptr>&);
00065
00066 public:
00067 virtual ~vil3d_slice_list_image();
00068
00069
00070
00071 virtual unsigned nplanes() const;
00072
00073
00074 virtual unsigned ni() const;
00075
00076
00077 virtual unsigned nj() const;
00078
00079
00080 virtual unsigned nk() const;
00081
00082
00083 virtual enum vil_pixel_format pixel_format() const;
00084
00085
00086
00087
00088
00089
00090 virtual vil3d_image_view_base_sptr get_copy_view(unsigned i0, unsigned ni,
00091 unsigned j0, unsigned nj,
00092 unsigned k0, unsigned nk) const;
00093
00094
00095
00096
00097
00098
00099
00100 virtual bool put_view(const vil3d_image_view_base& im,
00101 unsigned i0, unsigned j0, unsigned k0);
00102
00103
00104
00105 virtual char const* file_format() const { return "slice_list"; }
00106
00107
00108
00109 virtual bool get_property(char const* tag, void* property_value = 0) const;
00110 };
00111
00112 #endif // vil3d_slice_list_h_