X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Doc%2FWebsite%2FNews.html;h=f17bb7b97616d8656f50eaae426ad6c6389af056;hb=9f5d2df7b2426f31f4f802542986ec0233046b28;hp=01f4c67dbc3502a7cc374d4f365558722b0390ac;hpb=ba2ea83f67d798dfa2efae2fb21d3b5858c9c95c;p=gdcm.git diff --git a/Doc/Website/News.html b/Doc/Website/News.html index 01f4c67d..f17bb7b9 100644 --- a/Doc/Website/News.html +++ b/Doc/Website/News.html @@ -7,111 +7,538 @@
- + ++ gdcm::SerieHelper *sh= new gdcm::SerieHelper(); + // if user wants *not* to load some parts of the file headers + sh->SetLoadMode(loadMode); + + // if user wants *not* to load some files + sh->AddRestriction(group, element, value, operator); + sh->AddRestriction( ... + sh->SetDirectory(directoryWithImages); + + // if user *knows* how to order his files + sh->SetUserLessThanFunction(userSuppliedComparisonFunction); + // or/and + // if user wants to sort reverse order + sh->SetSortOrderToReverse(); + + // here, we suppose only the first 'Single SerieUID' Fileset is of interest + // Just iterate using sh->NextSingleSerieUIDFileSet() + // if you want to get all of them + gdcm::FileList *l = sh->GetFirstSingleSerieUIDFileSet(); + + // 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 + + sh->OrderFileList(l); // sort the list + + vtkGdcmReader *reader = vtkGdcmReader::New(); + // if user wants to modify pixel order (Mirror, TopDown, ...) + // he has to supply the function that does the job + // (a *very* simple example is given in vtkgdcmSerieViewer.cxx) + reader->SetUserFunction (userSuppliedFunction); + + // to pass a 'Single SerieUID' Fileset as produced by gdcm::SerieHelper + reader->SetCoherentFileList(l); + reader->Update(); ++ You can see a full example in vtk/vtkgdcmSerieViewer.cxx
+ gdcmSerieHelper *sh = new gdcmSerieHelper(); + sh->SetDirectory(myImageDirectory, true); + gdcmFileList *l = s->GetFirstCoherentFileList(); + s->OrderFileList(l); -
--For people who get this new release : - -We consider now that : -- any dicom related file is a gdcm::Document. -- a gdcm::Document can be : - - a gdcm::File, if it contains pixel data, - - a gdcm::DicomDir, if it contains only informations - on the files in a given directory - -- in a gdcm::Document, there are gdcm::DocEntry, that can be : - - gdcm::ContentEntry (any entry that has an actual value, - *not* an embedded set of other gdcm::DocEntry) - a gdcm::ContentEntry can be : - - gdcm::ValEntry (whose value is std::string representable - e.g. character values, or integers), - - gdcm::BinEntry (whose value is not std::string representable - e.g. color palettes, overlays, icons , ...) - - gdcm::Sequence (no proper 'value', but a set of gdcm::SQItems, - composed of a set of gdc::DocEntry, recursively) + vtkGdcmReader *gr = new vtkGdcmReader(); + gr->SetCoherentFileList(l); + gr->Update(); ++ This works with a directory that contains only one 'Serie' + (same Serie UID for all the images).
+ If it contains more than one Serie, you'll have to loop + on the Series, using GetNextCoherentFileList();
+ It will be up to the user to delete the gdcm::File. +
+ See vtkgdcmSerieViewer for an example. +
+
+ gdcm::DicomDir *d = new gdcm::DicomDir(); + d->SetFileName(fileName); + d->Load( ); +-- in a gdcm::DicomDir, we only deal, hierarchically, with : - - gdcmPatient - - gdcmStudy - - gdcmSerie - - gdcmImage - -You can see gdcm UML Class Diagram + For parsing all the dicom files within a given root directory, use :
+ gdcm::DicomDir *d = new gdcm::DicomDir(); + d->SetDirectoryName(dirName); + d->Load( ) ++ Don't use any longer old deprecated style:
+ gdcm::File *f = new gdcm::File(); + f->SetLoadMode(NO_SEQ); | depending on what + f->SetLoadMode(NO_SHADOW); | you want *not* + f->SetLoadMode(NO_SEQ | NO_SHADOW);| to load from the + f->SetLoadMode(NO_SHADOWSEQ); | target file + f->SetFileName(fileName); + f->Load( ); ++ Don't use any longer old deprecated style:
+ gdcm::DicomDir *f = new gdcm::DicomDir(); + f->SetLoadMode(NO_SEQ); | depending on what + f->SetLoadMode(NO_SHADOW); | you want *not* + f->SetLoadMode(NO_SEQ | NO_SHADOW);| to load from the files + f->SetLoadMode(NO_SHADOWSEQ); | within the root directory + f->SetDirectoryName(rootDirectoryName); + f->Load( ); ++ Don't use any longer old deprecated style: