[ITK] Read dicom files according to tags
Lambert Zijp
ljzijp at gmail.com
Fri Mar 18 15:12:28 EDT 2016
Hi Xie,
Just out of curiosity, why do you want to read images with a specific
level/window pre-set? After all, those are just (recommended) *viewer*
settings. I mean, you can set level/window to whatever you want, but the
pixel-data remain the same.
Greetings,
Lambert
On Fri, Mar 18, 2016 at 7:51 PM, Dženan Zukić <dzenanz at gmail.com> wrote:
> Hi Xie,
>
> maybe you can use ImageIO to read image
> <http://itk.org/Wiki/ITK/Examples/IO/ReadUnknownImageType> information
> for all the series (just one file from each series should be enough). Then
> examine the metadata to see whether window conditions are met, and if they
> are then read the series.
>
> Regards,
> Dženan
>
> On Fri, Mar 18, 2016 at 1:37 AM, 谢玮宜 <weiehome at sina.com> wrote:
>
>>
>> Hi,
>>
>> I want to read dicom series that only contains tags like window center and
>> window width in a certain range, and I don’t know how to do it using
>> gdcmImage io in itk.
>> I have read some dicom series reader examples but I still didn't figured
>> out. The GDCMSeriesFileNames seems not designed for this case.
>>
>>
>> typedef itk::GDCMSeriesFileNames NamesGeneratorType;
>> NamesGeneratorType::Pointer nameGenerator =
>> NamesGeneratorType::New();
>>
>> nameGenerator->SetUseSeriesDetails(true);
>> nameGenerator->AddSeriesRestriction("0008|0021");
>> nameGenerator->AddSeriesRestriction("0018|0024");
>> nameGenerator->AddSeriesRestriction("0020|0011");
>> nameGenerator->AddSeriesRestriction("0018|0050");
>> nameGenerator->AddSeriesRestriction("0028|0010");
>> nameGenerator->AddSeriesRestriction("0028|0011");
>> nameGenerator->SetDirectory(filePath);
>> the given file path contains 3 dicom series with different window center
>> and
>> window width settings ,yet only one is what I am interested in.
>> I know I can read all series first and then read each series to check if
>> its
>> tags meets my requirements. However, it is slow. What I want is a gdcm
>> support for filtering files in its reading.
>>
>> Thanks for your answers in advance!
>> BR,xie
>>
>>
>> _______________________________________________
>> Community mailing list
>> Community at itk.org
>> http://public.kitware.com/mailman/listinfo/community
>>
>
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160318/1f8cf97a/attachment.html>
More information about the Community
mailing list