From: jpr Date: Tue, 5 Jun 2007 16:25:52 +0000 (+0000) Subject: Add more explanations on SerieHelper vs vtkGdcmReader X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=6e55dbca8ed17c48949d8ce226d3aaee099a02ff;p=gdcm.git Add more explanations on SerieHelper vs vtkGdcmReader --- diff --git a/Doc/Website/HowToUseGdcm.html b/Doc/Website/HowToUseGdcm.html index be143c87..5a4f05a0 100755 --- a/Doc/Website/HowToUseGdcm.html +++ b/Doc/Website/HowToUseGdcm.html @@ -204,7 +204,7 @@ A class gdcm::SerieHelper is designed to help solving this problem. Use it as follows. gdcm::SerieHelper *sh = gdcm::SerieHelper::New(); - while (int i=0; iAddFileName(currentFileName[i]); } @@ -242,7 +242,7 @@ If you want to 'order' the files within each 'Single Serie UID File Set' he may add the gdcm::File (instead of the file name) to the SerieHelper. gdcm::SerieHelper *sh = gdcm::SerieHelper::New(); - while (int i=0; iAddFile(currentFile[i]); } * \warning : this method should be used by aware users only! @@ -262,7 +262,7 @@ If you want to 'order' the files within each 'Single Serie UID File Set' std::string const &value, int op); op belongs to : -/// \brief comparaison operators +/// \brief comparison operators GDCM_EQUAL , GDCM_DIFFERENT, GDCM_GREATER, @@ -273,10 +273,18 @@ e.g. gdcm::SerieHelper *sh = gdcm::SerieHelper::New(); sh->AddRestriction(0x0010,0x0040,"F",GDCM_EQUAL); // Patient's Sex sh->AddRestriction(0x0008,0x0060,"MR",GDCM_DIFFERENT); // Modality - while (int i=0; iSetDropDuplicatePositions(true); + Sometimes the previous stuff is *not enough* ! Within a SingleSerieUIDFileSet, you can have have various orientations, @@ -318,10 +326,13 @@ for (gdcm::XCoherentFileSetmap::iterator i = xcm.begin(); { // ask for 'ordering' according to the 'Image Position Patient' + // Sorting the Fileset (*) is mandatory! + // ( computing an accurate Series ZSpacing -whenever possible- is a side effect ...) + s->OrderFileList((*i).second); // sort the XCoherent Fileset } -(have a look at gdcm/Examples/exXCoherentFileSet.cxx for an exmaple) +(have a look at gdcm/Examples/exXCoherentFileSet.cxx for an example) 1-2) using VTK -------------- @@ -399,8 +410,16 @@ the right way to proceed is as follow : // if user is doesn't trust too much the files with same Serie UID if ( !sh->IsCoherent(l) ) return; // not same sizes, or not same 'pixel type' -> stop + + // Maybe user knows there are several images with the same position + // and *no dicom field* may discriminates them. + // He wants to drop the 'duplicate images' + + sh->SetDropDuplicatePositions(true); - sh->OrderFileList(l); // sort the list (*) + // Sorting the Fileset (*) is mandatory! + // ( computing an accurate Series ZSpacing is a side effect ...) + sh->OrderFileList(l); vtkGdcmReader *reader = vtkGdcmReader::New(); // if user wants to modify pixel order (Mirror, TopDown, ...) @@ -423,6 +442,7 @@ methods : (see 1-1-2 for more details) xcm = sh->SplitOnTagValue(l, groupelem[0],groupelem[1]); //---------------- + You can see a full example in vtk/vtkgdcmSerieViewer.cxx e.g. vtkgdcmSerieViewer dirname=Dentist mirror diff --git a/Doc/Website/Sidebar.html b/Doc/Website/Sidebar.html index 433652af..510c071e 100644 --- a/Doc/Website/Sidebar.html +++ b/Doc/Website/Sidebar.html @@ -104,7 +104,7 @@ User Guide - +