[Insight-users] Reagarding reading a 4D volume using itk
imageseriesreader
Luis Ibanez
luis.ibanez at kitware.com
Wed May 26 19:36:54 EDT 2004
Hi Sachin,
The ImageSeriesReader should manage your
list of 4D slices in a single pass.
Put all the filenames in order in a single
std::vector<string>.
Then Simply instantiate the reader using
a 4D image like
typedef itk::Image< unsigned char, 4 > ImageType;
typedef itk::ImageSeriesReader< ImageType > ReaderType;
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileNames(
mySeriesFileNames->GetFileNamesInASingleVector() )
reader->Update();
ImageType::ConstPointer image4D = reader->GetOutput();
Regards,
Luis
------------------------
Sachin Jambawalikar wrote:
> Hi all,
>
> I have a class derived from itkDicomseriesfilenames
>
> which has a function GetFileName4D which sorts the filenames and
> groups them based on acquisition time.
>
> const std::vector<std::vector<std::string> > &GetFileName4D(const
> std::string &seriesUID, bool recursive =false);
>
> I wanted to know how to use itk::ImageseriesReader to read in the 4D volume.
>
> as its
> void SetFileNames (const std::vector<std::string> &name)
> take only a vector of strings rather than 2D vector of strings.
>
> I can do it the longer way with passing the names of one group at a
> time and then copying the reader->get_output to a 4D volume.
> is this the only way or is there something better.
>
> Regards
>
> --Sachin
>
>
>
>
>
> On Tue, 18 May 2004 11:55:49 -0400, Luis Ibanez <luis.ibanez at kitware.com> wrote:
>
>>
>>Hi Sachin,
>>
>>Reading DICOM slices into a single dataset
>>requires the use of two ITK classes:
>>
>> A) SeriesNamesGenerator
>> B) ImageSeriesReader
>>
>>The ImagerSeriesReader is N-Dimensional and
>>will not have any difficulty reading your
>>4D data set.
>>
>>The trick will be related to the SeriesNames
>>generator. This filter should create a list
>>of file names *in order* that represent the
>>successive dimensions of your data sets.
>>
>>In your case, this class should generate
>>filenames where all the slices for a
>>certain timestamp are grouped togeheter.
>>Make sure that they are ordered by acquisition
>>time, and then inside the group of each
>>timestamp make sure theat the slices are in
>>spatial order.
>>
>>We don't have such a SeriesNamesGenerator
>>at this point, but you probably can create
>>it with a medium effort by modifying the
>>existing DICOMSeriesFileNames class
>>
>>http://www.itk.org/Insight/Doxygen/html/classitk_1_1DICOMSeriesFileNames.html
>>
>>BTW we will be happy to include the modified
>>version back in to the toolkit :-)
>>
>>Please let us know if you need any help in
>>performing such modifications.
>>
>> Thanks
>>
>> Luis
>>
>>--
>>
>>As a help in the process you may want to look at the
>>application MRIConvert developed by Jolinda Smith. This
>>app has recently been adapted to manage time series.
>>you will find the binaries of this application at
>>
>> http://lcni.uoregon.edu/~jolinda/MRIConvert
>>
>>--------------------------
>>
>>
>>
>>Sachin Jambawalikar wrote:
>>
>>
>>>Hi,
>>>Is it possible to read in 4D dicom series using the dicom series IO.
>>>Does the dicom reader support reading 4D data of a series in a 4D itk Image .
>>>Can anybody help ??
>>>
>>>
>>>Regards
>>>--Sachin
>>>_______________________________________________
>>>Insight-users mailing list
>>>Insight-users at itk.org
>>>http://www.itk.org/mailman/listinfo/insight-users
>>>
>>
>>
>
More information about the Insight-users
mailing list