[Insight-users] DICOM Slices : Number of files read
K. Subburaj
subburaj at iitb.ac.in
Thu Feb 8 15:42:32 EST 2007
Hi,
Thanks for
//
//------------------------------------------------------------------------------------
K. Subburaj wrote:
> Hi,
>
> I need to know how to get the "number of slices stacked" while reading
> bunch of DICOM Images (single series number) from a directory.
>
> Can anyone help me to get answer?
Hi SUbbu,
Are you looking for the number of slices that will be read ? I believe
you can simply count the number of filenames in the output of the
itk::GDCMSeriesFileNames
typedef itk::GDCMSeriesFileNames SeriesFileNames;
SeriesFileNames::Pointer it = SeriesFileNames::New();
it->SetInputDirectory( argv[1] );
const ReaderType::FileNamesContainer & filenames =
it->GetInputFileNames();
unsigned int numberOfFilenames = filenames.size();
std::cout << numberOfFilenames << std::endl;
HTH
-Mathieu
--------------------------------------------------------------------------
Subburaj Karuppasamy | Res.: H-1 /# 219
Research Scholar | IIT Bombay, Powai
Prof. B.Ravi's Lab | Mumbai - 400 076
Dept. of Mechanical Engg. | Tel.: +91 22 2576 7510 (Lab.)
Indian Institute of Technology Bombay | Cell: +91 98 6915 2700
Powai, Mumbai - 400 076, India | URL : www.me.iitb.ac.in/~subbu
--------------------------------------------------------------------------
More information about the Insight-users
mailing list