contrib/mul/vil3d/file_formats/vil3d_dicom.cxx
Go to the documentation of this file.
00001 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00002 #pragma implementation
00003 #endif
00004 //:
00005 // \file
00006 // \brief Reader/Writer for DICOM format images.
00007 // \author Ian Scott, Chris Wolstenholme - Manchester
00008 
00009 #include "vil3d_dicom.h"
00010 
00011 #if 0
00012 
00013 #include <vcl_cstdlib.h>
00014 #include <vil3d/vil3d_image_view.h>
00015 
00016 
00017 vil3d_dicom_format::vil3d_dicom_format() {}
00018 
00019 vil3d_dicom_format::~vil3d_dicom_format() {}
00020 
00021 
00022 vil3d_image_resource_sptr vil3d_dicom_format::make_input_image(const char * filename) const
00023 {
00024   vil2_smart_ptr<vil2_stream> is = vil2_open(filename);
00025   if (!is || !is->ok())
00026     return 0;
00027 
00028   vil_dicom_format dicom_reader;
00029   vil_image_resource_sptr im = dicom_reader.make_input_image(is.as_pointer());
00030   if (!im) return 0;
00031 
00032   // Now deduce filename numbering format.
00033   // start at the front and find all continuous groups of numeric characters.
00034   // For each group, search for all contiguously numbered files
00035   // Try and load each group of contiguously
00036 
00037   return 0;
00038 }
00039 
00040 
00041 //: Make a "generic_image" on which put_section may be applied.
00042 // The file may be opened immediately for writing so that a header can be written.
00043 // The width/height etc are explicitly specified, so that file_format implementors
00044 // know what they need to do...
00045 vil3d_image_resource_sptr vil3d_dicom_format::make_output_image
00046                    (const char* filename, unsigned ni, unsigned nj,
00047                     unsigned nk, unsigned nplanes, enum vil_pixel_format) const
00048 {
00049   vcl_cerr <<"vil3d_dicom_format::make_output_image() NYI\n";
00050   vcl_abort();
00051   return 0;
00052 }
00053 
00054 #endif // 0