diff -Naur dicom-0.1.1/src/dicomdict.cpp dicom-0.1.2/src/dicomdict.cpp
--- dicom-0.1.1/src/dicomdict.cpp	2011-12-20 21:52:53.000000000 +0100
+++ dicom-0.1.2/src/dicomdict.cpp	2016-07-20 09:28:16.432675522 +0200
@@ -27,9 +27,9 @@
 #include "octave/oct.h"
 #include "octave/load-path.h"
 
-#include "gdcm-2.0/gdcmDict.h"
-#include "gdcm-2.0/gdcmVR.h"
-#include "gdcm-2.0/gdcmVM.h"
+#include "gdcmDict.h"
+#include "gdcmVR.h"
+#include "gdcmVM.h"
 
 #include "dicomdict.h"
 
@@ -51,11 +51,11 @@
 }
 
 
-DEFUN_DLD (OCT_FN_NAME, args, nargout,
+DEFUN_DLD (dicomdict, args, nargout,
 		"-*- texinfo -*- \n\
-@deftypefn {Loadable Function} {@var{dictionary_name} =} "QUOTED(OCT_FN_NAME)" (@code{get}) \n\
-@deftypefnx {Loadable Function} {} "QUOTED(OCT_FN_NAME)" (@code{factory}) \n\
-@deftypefnx {Loadable Function} {} "QUOTED(OCT_FN_NAME)" (@code{set}, @var{dictionary_name}) \n\
+@deftypefn {Loadable Function} {@var{dictionary_name} =} dicomdict (@code{get}) \n\
+@deftypefnx {Loadable Function} {} dicomdict (@code{factory}) \n\
+@deftypefnx {Loadable Function} {} dicomdict (@code{set}, @var{dictionary_name}) \n\
 The first usage returns the filename of the dictionary that is currently being used.\n\
 Using @code{factory} resets the dictionary to the default.\n\
 Using @code{set} allows setting the dictionary for future operations.\n\
diff -Naur dicom-0.1.1/src/dicominfo.cpp dicom-0.1.2/src/dicominfo.cpp
--- dicom-0.1.1/src/dicominfo.cpp	2011-12-20 21:52:53.000000000 +0100
+++ dicom-0.1.2/src/dicominfo.cpp	2016-07-20 09:29:35.044322965 +0200
@@ -42,17 +42,17 @@
 #include "octave/ov-struct.h"
 
 //#include "gdcm-2.0/gdcmSystem.h"
-#include "gdcm-2.0/gdcmReader.h"
+#include "gdcmReader.h"
 //#include "gdcm-2.0/gdcmWriter.h"
 //#include "gdcm-2.0/gdcmAttribute.h"
-#include "gdcm-2.0/gdcmDataSet.h"
+#include "gdcmDataSet.h"
 //#include "gdcm-2.0/gdcmGlobal.h"
 //#include "gdcm-2.0/gdcmDicts.h"
-#include "gdcm-2.0/gdcmDict.h"
+#include "gdcmDict.h"
 //#include "gdcm-2.0/gdcmCSAHeader.h"
 //#include "gdcm-2.0/gdcmPrivateTag.h"
-#include "gdcm-2.0/gdcmVR.h"
-#include "gdcm-2.0/gdcmSequenceOfItems.h"
+#include "gdcmVR.h"
+#include "gdcmSequenceOfItems.h"
  
 #include "dicomdict.h" 
 
@@ -76,10 +76,10 @@
 char* byteval2string(char * d, int d_len_p, const gdcm::ByteValue *bv);
 char* name2Keyword(char *d, int *d_len_p, const char* s);
 Matrix str2DoubleVec(const char*);
-Octave_map dump(const char filename[], int chatty);
-void dumpDataSet(Octave_map *om, const gdcm::DataSet *ds, int chatty, int sequenceDepth);
+octave_map dump(const char filename[], int chatty);
+void dumpDataSet(octave_map *om, const gdcm::DataSet *ds, int chatty, int sequenceDepth);
 void getFileModTime(char *timeStr, const char *filename);
-void dumpElement(Octave_map *om, const gdcm::DataElement * elem, int chatty, int sequenceDepth);
+void dumpElement(octave_map *om, const gdcm::DataElement * elem, int chatty, int sequenceDepth);
 void dumpSequence(octave_value *ov, gdcm::SequenceOfItems *seq, int chatty, int sequenceDepth);
 int element2value(std::string & varname, octave_value *ov, const gdcm::DataElement * elem, int chatty, int sequenceDepth) ;
 
@@ -91,13 +91,13 @@
 	return 0;
 }
 #else
-DEFUN_DLD (OCT_FN_NAME, args, nargout,
+DEFUN_DLD (dicominfo, args, nargout,
 		"-*- texinfo -*- \n\
- @deftypefn {Loadable Function} {@var{info}} = "QUOTED(OCT_FN_NAME)" (@var{filename}) \n\
- @deftypefnx {Loadable Function} {@var{info}} = "QUOTED(OCT_FN_NAME)" (@var{filename}, @code{dictionary}, @var{dictionary-name}) \n\
- @deftypefnx  {Loadable Function} {} "QUOTED(OCT_FN_NAME)" (@var{filename}, @var{options}) \n\
- @deftypefnx {Command} {} "QUOTED(OCT_FN_NAME)" @var{filename} \n\
- @deftypefnx {Command} {} "QUOTED(OCT_FN_NAME)" @var{filename} @var{options} \n\
+ @deftypefn {Loadable Function} {@var{info}} = dicominfo (@var{filename}) \n\
+ @deftypefnx {Loadable Function} {@var{info}} = dicominfo (@var{filename}, @code{dictionary}, @var{dictionary-name}) \n\
+ @deftypefnx  {Loadable Function} {} dicominfo (@var{filename}, @var{options}) \n\
+ @deftypefnx {Command} {} dicominfo @var{filename} \n\
+ @deftypefnx {Command} {} dicominfo @var{filename} @var{options} \n\
  Get all data from a DICOM file, excluding any actual image. \n\
  @var{info} is a nested struct containing the data. \n\
  \n\
@@ -163,7 +163,7 @@
 		}
 	}
 	
-	Octave_map om=dump(filename.c_str(),chatty);
+	octave_map om=dump(filename.c_str(),chatty);
 	retval(0)=om;
 
 	load_dicom_dict(current_dict.c_str()); // reset dictionary to initial value
@@ -172,9 +172,9 @@
 #endif
 
 
-Octave_map dump(const char filename[], int chatty) {
+octave_map dump(const char filename[], int chatty) {
 	// output struct
-	Octave_map om;
+	octave_map om;
 	// Instantiate the reader:
 	gdcm::Reader reader;
 	reader.SetFileName( filename );
@@ -187,10 +187,10 @@
 	gdcm::DataSet &ds = file.GetDataSet();
 	gdcm::FileMetaInformation &hds=file.GetHeader();
 	
-	om.assign("Filename",filename);
+	om.assign("Filename", octave_value(filename));
 	char dateStr[TIME_STR_LEN+1];
 	getFileModTime(dateStr, filename);
-	om.assign("FileModDate", dateStr);
+	om.assign("FileModDate", octave_value(dateStr));
 	if(chatty) octave_stdout << "# file info\nFilename:" 
 		<< filename << "\nFileModDate:" << dateStr << '\n';
 	
@@ -202,7 +202,7 @@
 	return om;
 }
 
-void dumpDataSet(Octave_map *om, const gdcm::DataSet *ds, int chatty, int sequenceDepth) {
+void dumpDataSet(octave_map *om, const gdcm::DataSet *ds, int chatty, int sequenceDepth) {
 	
 	const gdcm::DataSet::DataElementSet DES=ds->GetDES(); // gdcm::DataSet::DataElementSet is a std::set
 	gdcm::DataSet::Iterator it;
@@ -212,7 +212,7 @@
 	}
 }
 
-void dumpElement(Octave_map *om, const gdcm::DataElement * elem, 
+void dumpElement(octave_map *om, const gdcm::DataElement * elem, 
 				int chatty, int sequenceDepth) {
 	std::string varname;
 	octave_value ov;
@@ -220,7 +220,7 @@
 		om->assign(varname.c_str(), ov);
 	} else {
 		if (0==varname.length()) return ;
-		om->assign(varname.c_str(), "not assigned");
+		om->assign(varname.c_str(), octave_value("not assigned"));
 	}
 }
 
@@ -453,10 +453,10 @@
 	const octave_idx_type nDataSet=seq->GetNumberOfItems(); // objects in sequence
 	if (chatty) octave_stdout << nDataSet << " object" << ((nDataSet==1)?"":"s") << std::endl;
 	char item_name_buf[16];
-	Octave_map om;
+	octave_map om;
 	for (octave_idx_type j=1; j<=nDataSet; j++ ) {
 		const gdcm::DataSet::DataElementSet des=seq->GetItem(j).GetNestedDataSet().GetDES() ;
-		Octave_map subom;
+		octave_map subom;
 		for (gdcm::DataSet::Iterator it=des.begin(); it != des.end(); it++) {
 			std::string key("");
 			octave_value subov;
@@ -464,7 +464,7 @@
 				subom.assign(key.c_str(), subov);
 			} else {
 				if (0==key.length()) continue ;
-				subom.assign(key.c_str(), "not assigned");
+				subom.assign(key.c_str(), octave_value("not assigned"));
 			}
 		}
 		snprintf(item_name_buf,15,"Item_%i",j);
diff -Naur dicom-0.1.1/src/dicomlookup.cpp dicom-0.1.2/src/dicomlookup.cpp
--- dicom-0.1.1/src/dicomlookup.cpp	2011-12-20 21:52:53.000000000 +0100
+++ dicom-0.1.2/src/dicomlookup.cpp	2016-07-20 09:30:19.644122941 +0200
@@ -20,9 +20,9 @@
 
 #include "octave/oct.h"
 
-#include "gdcm-2.0/gdcmDict.h"
-#include "gdcm-2.0/gdcmVR.h"
-#include "gdcm-2.0/gdcmVM.h"
+#include "gdcmDict.h"
+#include "gdcmVR.h"
+#include "gdcmVM.h"
 
 #include "dicomdict.h"
 
diff -Naur dicom-0.1.1/src/dicomread.cpp dicom-0.1.2/src/dicomread.cpp
--- dicom-0.1.1/src/dicomread.cpp	2011-12-13 23:12:42.000000000 +0100
+++ dicom-0.1.2/src/dicomread.cpp	2016-07-20 09:32:28.811543635 +0200
@@ -24,8 +24,68 @@
 
 #include "octave/oct.h"
 #include <octave/ov-struct.h>
-#include "gdcm-2.0/gdcmImageReader.h"
-              
+#include <octave/file-stat.h>
+
+#include "gdcmImageReader.h"
+using namespace gdcm;
+
+static bool
+isdicom (const std::string& filename)
+{
+  gdcm::Reader reader;
+  reader.SetFileName (filename.c_str ());
+  // gdcm::Reader.Read() will return false if the file does not exists but
+  // also prints to stderr so we check it first.
+  return file_stat (filename).exists () && reader.Read ();
+}
+
+// PKG_ADD: autoload ("isdicom", "dicomread.oct");
+// PKG_DEL: autoload ("isdicom", "dicomread.oct", "remove");
+DEFUN_DLD (isdicom, args, ,
+"-*- texinfo -*- \n\
+@deftypefn {Loadable Function} {} isdicom (@var{filename}) \n\
+Return true if @var{filename} is a valid DICOM file.\n\
+\n\
+@seealso{dicomdict, dicominfo, dicomread, dicomwrite} \n\
+@end deftypefn")
+{
+  const octave_idx_type nargin = args.length ();
+  if (nargin != 1)
+    {
+      print_usage ();
+      return octave_value_list ();
+    }
+
+  // Do NOT have this function accept a cell array of strings.
+  //
+  // This function should return true or false if its input is valid input
+  // for a function that reads a DICOM file.  While it is tempting, and very
+  // easy to implement, to have this function accept a cell array of strings
+  // and return a boolNDArray, a cell array is not valid and will cause any
+  // function that uses it to first check if it's a cell array.  It will also
+  // prevent it from being used by imformats and any other image IO function
+  // in Octave core
+
+  const std::string filename = args(0).string_value ();
+  if (error_state)
+    {
+      error ("isdicom: FILENAME must be a string");
+      return octave_value_list ();
+    }
+
+  return octave_value (isdicom (filename));
+}
+
+/*
+%!test
+%! fpath = tmpnam ();
+%! urlwrite ("http://imagej.nih.gov/ij/images/CT%20Scan.dcm", fpath);
+%! assert (isdicom (fpath), true);
+
+%!test
+%! assert (isdicom (which ("gray")), false);
+*/
+
 #define DICOM_ERR -1
 #define DICOM_OK 0
 
@@ -33,10 +93,10 @@
 #define QUOTED_(x) #x
 #define QUOTED(x) QUOTED_(x)
 
-DEFUN_DLD (OCT_FN_NAME, args, nargout,
+DEFUN_DLD (dicomread, args, nargout,
 		"-*- texinfo -*- \n\
- @deftypefn {Loadable Function} {} @var{image} = "QUOTED(OCT_FN_NAME)" (@var{filename}) \n\
- @deftypefnx {Loadable Function} {} @var{image} = "QUOTED(OCT_FN_NAME)" (@var{structure}) \n\
+ @deftypefn {Loadable Function} {} @var{image} = dicomread (@var{filename}) \n\
+ @deftypefnx {Loadable Function} {} @var{image} = dicomread (@var{structure}) \n\
  \n\
  Load the image from a DICOM file. \n\
  @var{filename} is a string (giving the filename).\n\
diff -Naur dicom-0.1.1/src/dicomwrite.cpp dicom-0.1.2/src/dicomwrite.cpp
--- dicom-0.1.1/src/dicomwrite.cpp	2011-12-20 21:52:53.000000000 +0100
+++ dicom-0.1.2/src/dicomwrite.cpp	2016-07-20 09:33:21.579306972 +0200
@@ -21,11 +21,11 @@
 #include "octave/oct.h"
 #include "octave/ov-struct.h"
 
-#include "gdcm-2.0/gdcmDictEntry.h"
-#include "gdcm-2.0/gdcmImage.h"
-#include "gdcm-2.0/gdcmImageWriter.h"
-#include "gdcm-2.0/gdcmFileDerivation.h"
-#include "gdcm-2.0/gdcmUIDGenerator.h"
+#include "gdcmDictEntry.h"
+#include "gdcmImage.h"
+#include "gdcmImageWriter.h"
+#include "gdcmFileDerivation.h"
+#include "gdcmUIDGenerator.h"
               
 #include "dicomdict.h"
               
@@ -43,12 +43,12 @@
 // TODO all fns here should throw exceptions, not use this "std::string & err" arg
 
 void struct2metadata(gdcm::ImageWriter *w, gdcm::File *file, const octave_value  & ov, bool trial, int sequenceDepth) ;
-void structarray2sequence(gdcm::SequenceOfItems & sq, Octave_map * om, bool trial, int sequenceDepth);
+void structarray2sequence(gdcm::SequenceOfItems & sq, octave_map * om, bool trial, int sequenceDepth);
 void value2element (gdcm::DataElement * de, const octave_value * ov, gdcm::Tag * tag, const std::string & keyword, bool trial, bool * handled, int sequenceDepth);
 void octaveVal2dicomImage(gdcm::ImageWriter *w, octave_value *pixval) ;
 void genMinimalMetaData(gdcm::ImageWriter *w, gdcm::File *file);
 
-DEFUN_DLD (OCT_FN_NAME, args, nargout,"\
+DEFUN_DLD (dicomwrite, args, nargout,"\
 dicomwrite(im, filename)\n\
 dicomwrite(im, filename, info)\n\
 im       image data or empty matrix, [], if only metadata save is required\n\
@@ -132,9 +132,9 @@
 	}
 	gdcm::DataSet ds;
 	gdcm::FileMetaInformation hds;
-	Octave_map om=ov.map_value();
+	octave_map om=ov.map_value();
 	uint32_t skipped = 0;
-	for (Octave_map::iterator it = om.begin(); it != om.end(); it++) {
+	for (octave_map::iterator it = om.begin(); it != om.end(); it++) {
 		std::string keyword(om.key(it));
 		Cell cell = om.contents(it);
 		if (!dicom_is_present(keyword)) {
@@ -179,17 +179,17 @@
 	return ;
 }
 
-void structarray2sequence(gdcm::SequenceOfItems & sq, Octave_map * om, bool trial, int sequenceDepth) {
-	for (Octave_map::iterator it = om->begin(); it != om->end(); it++) {
+void structarray2sequence(gdcm::SequenceOfItems & sq, octave_map * om, bool trial, int sequenceDepth) {
+	for (octave_map::iterator it = om->begin(); it != om->end(); it++) {
 		gdcm::Item item;
 		// item.SetVLToUndefined(); //TODO: does VL need to be set for items that contain datasets?
 		gdcm::DataSet &nds = item.GetNestedDataSet();
 		std::string itemname(om->key(it));
 		// TODO: test itemname is something like Item_n.
 		Cell cell = om->contents(it);
-		Octave_map subom = cell(0).map_value();
+		octave_map subom = cell(0).map_value();
 		// octave_stdout << itemname <<std::endl;
-		for (Octave_map::iterator subit = subom.begin(); subit != subom.end(); subit++) {
+		for (octave_map::iterator subit = subom.begin(); subit != subom.end(); subit++) {
 			std::string subkeyword(subom.key(subit));
 			gdcm::DataElement de;
 			gdcm::Tag tag;
@@ -289,7 +289,7 @@
 		}
 		octave_stdout << std::endl;
 		//int nObj = ov->numel() ;
-		Octave_map subom = ov->map_value();
+		octave_map subom = ov->map_value();
 		gdcm::SmartPointer<gdcm::SequenceOfItems> sq = new gdcm::SequenceOfItems();
 		try {
 			structarray2sequence(*sq, &subom, trial, ++sequenceDepth) ;
diff -Naur dicom-0.1.1/src/_gendicomdict.cpp dicom-0.1.2/src/_gendicomdict.cpp
--- dicom-0.1.1/src/_gendicomdict.cpp	2011-11-03 15:11:57.000000000 +0100
+++ dicom-0.1.2/src/_gendicomdict.cpp	2016-07-20 09:34:05.915108124 +0200
@@ -28,17 +28,17 @@
 
 #include "octave/oct.h"
 
-#include "gdcm-2.0/gdcmSystem.h"
-#include "gdcm-2.0/gdcmReader.h"
-#include "gdcm-2.0/gdcmWriter.h"
-#include "gdcm-2.0/gdcmAttribute.h"
-#include "gdcm-2.0/gdcmDataSet.h"
-#include "gdcm-2.0/gdcmGlobal.h"
-#include "gdcm-2.0/gdcmDicts.h"
-#include "gdcm-2.0/gdcmDict.h"
-#include "gdcm-2.0/gdcmCSAHeader.h"
-#include "gdcm-2.0/gdcmPrivateTag.h"
-#include "gdcm-2.0/gdcmVR.h"
+#include "gdcmSystem.h"
+#include "gdcmReader.h"
+#include "gdcmWriter.h"
+#include "gdcmAttribute.h"
+#include "gdcmDataSet.h"
+#include "gdcmGlobal.h"
+#include "gdcmDicts.h"
+#include "gdcmDict.h"
+#include "gdcmCSAHeader.h"
+#include "gdcmPrivateTag.h"
+#include "gdcmVR.h"
 
 #define OCT_FN_NAME _gendicomdict
 #define QUOTED_(x) #x
diff -Naur dicom-0.1.1/src/Makefile dicom-0.1.2/src/Makefile
--- dicom-0.1.1/src/Makefile	2011-12-10 20:55:26.000000000 +0100
+++ dicom-0.1.2/src/Makefile	2016-07-20 10:06:58.622512491 +0200
@@ -15,10 +15,13 @@
 #   Please see the file, "COPYING" for further details of GNU General 
 #   Public License version 3.
   
- 
 
-INCDIRFLAGS =	
-LIBDIRFLAGS =	-L/usr/local/lib
+# you MUST edit this line to the GDCM header folder (EB 20 Jul 2016) 
+GDCMINCLUDEDIR = /usr/local/include/gdcm-2.7
+# you MUST edit this line to the GDCM lib folder (EB 20 Jul 2016)
+GDCMLIBDIR = /usr/local/bin
+INCDIRFLAGS = -I$(GDCMINCLUDEDIR)
+LIBDIRFLAGS =	-L/usr/local/lib -L$(GDCMLIBDIR)
 GDCMLIBFLAGS =	-lgdcmcharls  -lgdcmjpeg8 -lgdcmjpeg12 \
 -lgdcmjpeg16 -lgdcmCommon \
 -lgdcmDICT -lgdcmDSED -lgdcmIOD -lgdcmMSFF  
@@ -46,7 +49,6 @@
 _gendicomdict.oct: _gendicomdict.cpp
 	mkoctfile $(INCDIRFLAGS) $(LIBDIRFLAGS) $(GDCMLIBFLAGS) $(DEBUGFLAG) _gendicomdict.cpp
 
-
 dicominfo.o: dicomdict.h dicominfo.cpp
 	mkoctfile -c $(INCDIRFLAGS) $(DEBUGFLAG) dicominfo.cpp
 
@@ -74,4 +76,4 @@
 	octave -q --eval "test dicomread.cpp"
 
 test_dicomlookup: dicomlookup.oct
-	octave -q --eval "test dicomlookup.cpp"
\ No newline at end of file
+	octave -q --eval "test dicomlookup.cpp"
