[Insight-users] itk reading dicom series with multiframe and singleframe

Chr. Rossmanith cr at neuro.ma.uni-heidelberg.de
Fri Jun 22 05:38:27 EDT 2012


Hi Antonio,

tags are defined by a group and an element number, e.g. for one of my 
multiframe images
(0028,0008) IS [596]                                    #   4, 1 
NumberOfFrames

Here group is 0x0028, element 0x0008, the tag value is 596 and gives you 
the number of frames. If you add a restriction to the series file names 
generator only images which don't vary with respect to the given element 
are treated as belonging to the same series. The format of the required 
string should be "0028|0008" as I guess (didn't try it!)

Christina


Am 22.06.2012 09:47, schrieb Antonio:
> Hi Christina,
> sorry if i disturb you again...do you know what are "tags" that i 
> should give to that function as parameter? I'm not able to understand 
> it from the documentation...
> thank you very much
> Antonio
>
> 2012/6/20 Antonio <antoniod987 at gmail.com <mailto:antoniod987 at gmail.com>>
>
>     Ok thank you very much i'll have look...hope it will be helpful
>     Thank you very much again
>     Antonio
>
>     2012/6/20 Chr. Rossmanith <cr at neuro.ma.uni-heidelberg.de
>     <mailto:cr at neuro.ma.uni-heidelberg.de>>
>
>         Hi,
>
>         there is void AddSeriesRestriction
>         <http://www.itk.org/Doxygen/html/classitk_1_1GDCMSeriesFileNames.html#a7cd257cf77b31779b9d197f437a002fb>
>         (const std::string &tag) in itk::GDCMSeriesFileNames which
>         might help you. Get the tag which gives you the number of
>         frames and add it as a restriction.
>
>         Christina Rossmanith
>         --
>         Dept. of Neurology
>         University Medical Center Mannheim
>
>         Am 20.06.2012 10:04, schrieb andon:
>>         No one can help me???
>>
>>         andon wrote:
>>>         Hi all,
>>>         I'm quite new to itk, but i'm loving this library. Now i got a problem. I
>>>         need to read a cardiac dicom series. It contains both multiframe and
>>>         singleframe dicom. If i use the normal code, i got an error telling me
>>>         that the sizes of multiframe dicoms are not regular. This is the code i
>>>         use:
>>>           const unsigned int InputDimension = 3;
>>>            const unsigned int OutputDimension = 3;
>>>
>>>            typedef signed short PixelType;
>>>
>>>            typedef itk::Image<  PixelType, InputDimension>
>>>              InputImageType;
>>>              typedef itk::Image<  PixelType, 2>
>>>              InputImageType2;
>>>
>>>            typedef itk::Image<  PixelType, OutputDimension>
>>>              OutputImageType;
>>>            typedef itk::ImageSeriesReader<  InputImageType>
>>>              ReaderType;
>>>            typedef itk::ImageFileReader<  InputImageType2>
>>>              ReaderType2;
>>>
>>>            typedef itk::GDCMImageIO
>>>              ImageIOType;
>>>            typedef itk::GDCMSeriesFileNames
>>>              InputNamesGeneratorType;
>>>
>>>         ////////////////////////////////////////////////
>>>         // 1) Read the input series
>>>
>>>            ImageIOType::Pointer gdcmIO = ImageIOType::New();
>>>            InputNamesGeneratorType::Pointer inputNames =
>>>         InputNamesGeneratorType::New();
>>>
>>>            inputNames->SetInputDirectory( "../data/DICOM/IMAGES" );
>>>
>>>            const ReaderType::FileNamesContainer&  filenames =
>>>         inputNames->GetInputFileNames();
>>>
>>>            ReaderType::Pointer reader = ReaderType::New();
>>>
>>>            reader->SetImageIO( gdcmIO );
>>>
>>>            reader->SetFileNames( filenames );
>>>
>>>         could anyone help me?
>>>         Thank you very much
>>>         Cheers,
>>>         Antonio
>>>
>
>
>
>
>     -- 
>     ______________________________________________________________________________________________________________________________________________________________________________________________
>
>     "La teoria è quando si sa tutto e niente funziona. La pratica è
>     quando tutto funziona e nessuno sa il perché. Noi abbiamo messo
>     insieme la teoria e la pratica: non c'è niente che funzioni... e
>     nessuno sa il perché!."
>
>      A. Einstein
>
>
>
>
> -- 
> ______________________________________________________________________________________________________________________________________________________________________________________________
>
> "La teoria è quando si sa tutto e niente funziona. La pratica è quando 
> tutto funziona e nessuno sa il perché. Noi abbiamo messo insieme la 
> teoria e la pratica: non c'è niente che funzioni... e nessuno sa il 
> perché!."
>
>  A. Einstein

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120622/108fe2d4/attachment.htm>


More information about the Insight-users mailing list