Program: gdcm
Module: $RCSfile: gdcmSerieHeader.cxx,v $
Language: C++
- Date: $Date: 2005/01/18 11:56:52 $
- Version: $Revision: 1.11 $
+ Date: $Date: 2005/01/24 16:10:53 $
+ Version: $Revision: 1.13 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include "gdcmSerieHeader.h"
#include "gdcmDirList.h"
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
#include "gdcmDebug.h"
#include <math.h>
namespace gdcm
{
-typedef std::vector<Header* > GdcmHeaderVector;
+typedef std::vector<File* > GdcmFileVector;
//-----------------------------------------------------------------------------
// Constructor / Destructor
SerieHeader::SerieHeader()
SerieHeader::~SerieHeader()
{
/// \todo
- for ( GdcmHeaderList::const_iterator it = CoherentGdcmFileList.begin();
+ for ( GdcmFileList::const_iterator it = CoherentGdcmFileList.begin();
it != CoherentGdcmFileList.end(); ++it)
{
delete *it;
void SerieHeader::AddFileName(std::string const &filename)
{
//directly use string and not const char*:
- Header *header = new Header( filename );
+ File *header = new File( filename );
if( header->IsReadable() )
{
// 0020 000e UI REL Series Instance UID
- std::string uid = header->GetEntry (0x0020, 0x000e);
+ std::string uid = header->GetEntryValue (0x0020, 0x000e);
// if uid == GDCM_UNFOUND then consistenly we should find GDCM_UNFOUND
// no need here to do anything special
if( CurrentSerieUID == "" )
std::vector<float> distlist;
//!\todo rewrite this for loop.
- for ( GdcmHeaderList::const_iterator
+ for ( GdcmFileList::const_iterator
it = CoherentGdcmFileList.begin();
it != CoherentGdcmFileList.end(); ++it )
{
// Then I order the slices according to the value "dist". Finally, once
// I've read in all the slices, I calculate the z-spacing as the difference
// between the "dist" values for the first two slices.
- GdcmHeaderVector CoherentGdcmFileVector(n);
+ GdcmFileVector CoherentGdcmFileVector(n);
// CoherentGdcmFileVector.reserve( n );
CoherentGdcmFileVector.resize( n );
// gdcmAssertMacro( CoherentGdcmFileVector.capacity() >= n );
n = 0;
//VC++ don't understand what scope is !! it -> it2
- for (GdcmHeaderList::const_iterator it2 = CoherentGdcmFileList.begin();
+ for (GdcmFileList::const_iterator it2 = CoherentGdcmFileList.begin();
it2 != CoherentGdcmFileList.end(); ++it2, ++n)
{
//2*n sort algo !!
CoherentGdcmFileList.clear(); //this doesn't delete list's element, node only
//VC++ don't understand what scope is !! it -> it3
- for (GdcmHeaderVector::const_iterator it3 = CoherentGdcmFileVector.begin();
+ for (GdcmFileVector::const_iterator it3 = CoherentGdcmFileVector.begin();
it3 != CoherentGdcmFileVector.end(); ++it3)
{
CoherentGdcmFileList.push_back( *it3 );
int n = 0;//CoherentGdcmFileList.size() is a O(N) operation
unsigned char *partition;
- GdcmHeaderList::const_iterator it = CoherentGdcmFileList.begin();
+ GdcmFileList::const_iterator it = CoherentGdcmFileList.begin();
min = max = (*it)->GetImageNumber();
for (; it != CoherentGdcmFileList.end(); ++it, ++n)
partition = new unsigned char[n];
memset(partition, 0, n);
- GdcmHeaderVector CoherentGdcmFileVector(n);
+ GdcmFileVector CoherentGdcmFileVector(n);
//VC++ don't understand what scope is !! it -> it2
- for (GdcmHeaderList::const_iterator it2 = CoherentGdcmFileList.begin();
+ for (GdcmFileList::const_iterator it2 = CoherentGdcmFileList.begin();
it2 != CoherentGdcmFileList.end(); ++it2)
{
pos = (*it2)->GetImageNumber();
//VC++ don't understand what scope is !! it -> it3
CoherentGdcmFileList.clear(); //this doesn't delete list's element, node only
- for ( GdcmHeaderVector::const_iterator it3 = CoherentGdcmFileVector.begin();
+ for ( GdcmFileVector::const_iterator it3 = CoherentGdcmFileVector.begin();
it3 != CoherentGdcmFileVector.end(); ++it3 )
{
CoherentGdcmFileList.push_back( *it3 );