[Dcmlib] serie helper problem: errata corrige
Jean-Pierre Roux
jpr at creatis.insa-lyon.fr
Mon Sep 24 11:08:33 CEST 2007
Lazzarato Dr. Gianni wrote:
>
> I apologize because cutting the sample code I introduced an error;
> the correct mail is :
>
>
>
>
>
> Hi Jean Pierre, Mathieu and all Users,
> I had a little problem with SerielHelper. ( I include an extracted
> portion of a dataset as an example, it is composed of 1 serie and 1
> scout view; all the files are in the same directory of the cd_rom).
>
>
>
> Using this sample code :
>
>
>
> gdcm::SerieHelper *sh = gdcm::SerieHelper::New();
>
> sh->SetLoadMode(gdcm::LD_ALL);
>
> sh->SetDirectory( path ,true);
>
>
>
> gdcm::FileList *l = sh->GetFirstSingleSerieUIDFileSet();
>
>
>
> while (l) // for each 'Single SerieUID FileSet'
>
> {
>
> if ( l->size() > 3) // discard series composed of few files
>
> break;
>
> else
>
> l = sh->GetNextSingleSerieUIDFileSet();
>
> }
>
> sh->OrderFileList(l); // sort the list
>
> dicom_reader = vtkGdcmReader::New();
>
> dicom_reader->SetCoherentFileList(l);
>
>
>
> reading the dataset the file s0000_0000b.dcm is included in the serie
> but it is not part of it .
>
Hi, Giani.
All your images 'i009x.0000b.dcm' are Axial images, and s0000_0000b.dcm
is a Coronal one, right?
but they *all* belong to
0020|000e [UI] [Series
Instance UID] [1.2.840.113619.2.55.1.1762902721.1885.1184133206.962]
(your imager decided so ! :-( )
Of course, this is not suitable for you, if you want to construct a volume.
You missed a part of the work :
After getting a 'Single Serie UID File Set', you have to split thid Fle
Set into several 'XCoherent Filesets' (X for : Extra, sorry for the name
...).
use :
XCoherentFileSetmap gdcmSerieHelper::SplitOnOrientation(FileList *fileSet);
It returns a std::map of FileList *.
In your case, you just have to ignore th Filelist with only onr image,
and pass the other one to the vtkGdcmReader.
I think Luca Picello used this way of proceeding.
I tried to describe it, on
http://www.creatis.insa-lyon.fr/Public/Gdcm
--> User Guide
(a link to :
http://www.creatis.insa-lyon.fr/Public/Gdcm/HowToUseGdcm.html
]
but nobody reviewed the text.
Could you tell us if it's easyly understandable or not, that would be
very usefull for us to enhance it.
Grazie.
Jean-Pierre Roux
>
>
> According to you, would be a serie helper related problem or not?
>
>
>
> Thank you, in adwance, for your answer.
>
>
>
> Gianni
>
>
>
>
>
>
>
>
>
More information about the Dcmlib
mailing list