X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=inline;f=Doc%2FWebsite%2FNews.html;h=ce1d90dd347e79fab96eb9fabb95f3cef7ee8528;hb=fc4772b3f243c1b435c18c78c2d1965cfdf57114;hp=126ff1350c80b6cbe89c9953ed219dfde064bd27;hpb=8cef68299f5b7eb6a9f1618b524275785904f523;p=gdcm.git diff --git a/Doc/Website/News.html b/Doc/Website/News.html index 126ff135..ce1d90dd 100644 --- a/Doc/Website/News.html +++ b/Doc/Website/News.html @@ -7,111 +7,554 @@
- + ++ 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
-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) +
+ gdcmSerieHelper *sh = new gdcmSerieHelper(); + sh->SetDirectory(myImageDirectory, true); + gdcmFileList *l = s->GetFirstCoherentFileList(); + s->OrderFileList(l); + + 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).
+ 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: