Program: gdcm
Module: $RCSfile: PrintFile.cxx,v $
Language: C++
- Date: $Date: 2005/11/15 10:40:45 $
- Version: $Revision: 1.71 $
+ Date: $Date: 2005/11/18 11:45:34 $
+ Version: $Revision: 1.72 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// Let's compute 'user friendly' results about 'Orientation'
// ---------------------------------------------------------
- gdcm::Orientation o;
+ gdcm::Orientation *o = gdcm::Orientation::New();
if ( strImageOrientationPatient != gdcm::GDCM_UNFOUND ||
strImageOrientationRET != gdcm::GDCM_UNFOUND )
{
- gdcm::OrientationType orient = o.GetOrientationType( f );
+ gdcm::OrientationType orient = o->GetOrientationType( f );
std::cout << "TypeOrientation = " << orient << " (-> "
- << o.GetOrientationTypeString(orient) << " )" << std::endl;
+ << o->GetOrientationTypeString(orient) << " )" << std::endl;
}
- std::string ori = o.GetOrientation ( f );
+ std::string ori = o->GetOrientation ( f );
if (ori != "\\" )
std::cout << "Orientation [" << ori << "]" << std::endl;
+ o->gdcm::Orientation::Delete();
//------------------------------
// Let's compute 'user friendly' results about 'Orientation'
// ---------------------------------------------------------
- gdcm::Orientation o;
+ gdcm::Orientation *o = gdcm::Orientation::New();
+
if ( strImageOrientationPatient != gdcm::GDCM_UNFOUND ||
strImageOrientationRET != gdcm::GDCM_UNFOUND )
{
- gdcm::OrientationType orient = o.GetOrientationType( f );
+ gdcm::OrientationType orient = o->GetOrientationType( f );
std::cout << "TypeOrientation = " << orient << " (-> "
- << o.GetOrientationTypeString(orient) << " )" << std::endl;
+ << o->GetOrientationTypeString(orient) << " )" << std::endl;
}
- std::string ori = o.GetOrientation ( f );
+ std::string ori = o->GetOrientation ( f );
if (ori != "\\" )
std::cout << "Orientation [" << ori << "]" << std::endl;
+
+ o->gdcm::Orientation::Delete();
//-------------------------------
-
if (f->IsReadable())
std::cout <<std::endl<<it->c_str()<<" is Readable"<<std::endl;
Program: gdcm
Module: $RCSfile: TestPrintAllDocument.cxx,v $
Language: C++
- Date: $Date: 2005/10/25 14:52:31 $
- Version: $Revision: 1.10 $
+ Date: $Date: 2005/11/18 11:44:33 $
+ Version: $Revision: 1.11 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
f->GetEntryString(0x0020,0x0037);
if ( strImageOrientationPatient != gdcm::GDCM_UNFOUND )
{
- gdcm::Orientation o;
- gdcm::OrientationType orient = o.GetOrientationType( f );
+ gdcm::Orientation *o = gdcm::Orientation::New();
+
+ gdcm::OrientationType orient = o->GetOrientationType( f );
std::cout << " ---------------------- Orientation " << orient
<< std::endl;
+ o->gdcm::Orientation::Delete();
}
if( f->IsReadable() )
Module: $RCSfile: gdcmFileHelper.cxx,v $
Language: C++
- Date: $Date: 2005/11/07 14:10:39 $
- Version: $Revision: 1.81 $
+ Date: $Date: 2005/11/18 11:42:48 $
+ Version: $Revision: 1.82 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// Patient Orientation
// Can be computed from (0020|0037) : Image Orientation (Patient)
- gdcm::Orientation o;
- std::string ori = o.GetOrientation ( FileInternal );
+ gdcm::Orientation *o = gdcm::Orientation::New();
+ std::string ori = o->GetOrientation ( FileInternal );
+ o->Delete();
if (ori != "\\" )
CheckMandatoryEntry(0x0020,0x0020,ori);
else
Program: gdcm
Module: $RCSfile: gdcmOrientation.h,v $
Language: C++
- Date: $Date: 2005/10/23 15:12:24 $
- Version: $Revision: 1.11 $
+ Date: $Date: 2005/11/18 11:42:48 $
+ Version: $Revision: 1.12 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#ifndef GDCMORIENTATION_H
#define GDCMORIENTATION_H
-#include "gdcmBase.h"
+#include "gdcmRefCounter.h"
#include <map>
namespace gdcm
HeartSagitalInvert = -6
} OrientationType;
-class GDCM_EXPORT Orientation : public Base
+class GDCM_EXPORT Orientation : public RefCounter
{
+ gdcmTypeMacro(Orientation);
public:
-/// \brief Constructor
- Orientation() {}
-/// \brief Canonical Destructor
- ~Orientation() {}
+ static Orientation *New() {return new Orientation();}
OrientationType GetOrientationType( File *file );
std::string GetOrientation ( File *file );
static const char* GetOrientationTypeString(OrientationType const o);
-
+
+protected:
+/// \brief Constructor
+ Orientation() {}
+/// \brief Canonical Destructor
+ ~Orientation() {}
private:
Res VerfCriterion(int typeCriterion, double criterionNew, Res const &res);
double CalculLikelyhood2Vec(vector3D const &refA, vector3D const &refB,