From: regrain Date: Mon, 3 May 2004 13:39:47 +0000 (+0000) Subject: * vtk/vtkGdcmReader.cxx : bug fix when loading a list of files using the X-Git-Tag: Version0.5.bp~197 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=fc845cfade351c5d9cf0aba8684e6a0ab93e9faa;p=gdcm.git * vtk/vtkGdcmReader.cxx : bug fix when loading a list of files using the file prefix (SetFilePrefix) -- BeNours --- diff --git a/ChangeLog b/ChangeLog index b07483f9..6e1161c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ 2004-05-03 Benoit Regrain * vtk/vtkGdcmReader.cxx : bug fix when loading a list of files using the - file pattern (SetFilePattern) + file prefix (SetFilePrefix) 2004-05-02 Mathieu Malaterre * Add a new test: ShowDicom, for now this is just the c++ version of diff --git a/vtk/vtkGdcmReader.cxx b/vtk/vtkGdcmReader.cxx index 7708dee3..4b6685e0 100644 --- a/vtk/vtkGdcmReader.cxx +++ b/vtk/vtkGdcmReader.cxx @@ -123,6 +123,7 @@ void vtkGdcmReader::SetFileName(const char *name) // (see vtkGdcmReader::AddFileName), we additionaly need to purge // this list when we manually positionate the filename. vtkDebugMacro("Clearing all files given with AddFileName"); + this->SetFilePattern(""); this->FileNameList.clear(); this->Modified(); } @@ -329,16 +330,16 @@ void vtkGdcmReader::BuildFileListFromPattern() return; } - if ((! this->FileNameList.empty()) && this->FilePattern ) + if ((! this->FileNameList.empty()) && this->FilePrefix ) { - vtkErrorMacro("Both AddFileName and SetFilePattern schemes were used"); + vtkErrorMacro("Both AddFileName and SetFilePrefix schemes were used"); vtkErrorMacro("No images loaded ! "); return; } - if (this->FileName && this->FilePattern) + if (this->FileName && this->FilePrefix) { - vtkErrorMacro("Both SetFileName and SetFilePattern schemes were used"); + vtkErrorMacro("Both SetFileName and SetFilePrefix schemes were used"); vtkErrorMacro("No images loaded ! "); return; } @@ -350,10 +351,10 @@ void vtkGdcmReader::BuildFileListFromPattern() return; } - if (!this->FileName && !this->FilePattern) + if (!this->FileName && !this->FilePrefix) { vtkErrorMacro("FileNames are not set. Either use AddFileName() or"); - vtkErrorMacro("specify a FileName or FilePattern."); + vtkErrorMacro("specify a FileName or FilePrefix."); return; }