Shapeworks Studio  2.1
Shape analysis software suite
itkParticlePositionReader.h
1 /*=========================================================================
2  Program: ShapeWorks: Particle-based Shape Correspondence & Visualization
3  Module: $RCSfile: itkParticlePositionReader.h,v $
4  Date: $Date: 2011/03/24 01:17:33 $
5  Version: $Revision: 1.2 $
6  Author: $Author: wmartin $
7 
8  Copyright (c) 2009 Scientific Computing and Imaging Institute.
9  See ShapeWorksLicense.txt for details.
10 
11  This software is distributed WITHOUT ANY WARRANTY; without even
12  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13  PURPOSE. See the above copyright notices for more information.
14  =========================================================================*/
15 #ifndef __itkParticlePositionReader_h
16 #define __itkParticlePositionReader_h
17 
18 #include "itkDataObject.h"
19 #include "itkObjectFactory.h"
20 #include "itkPoint.h"
21 #include "itkWeakPointer.h"
22 #include <vector>
23 #include <string>
24 
25 namespace itk
26 {
41 template <unsigned int VDimension>
42 class ITK_EXPORT ParticlePositionReader : public DataObject
43 {
44 public:
47  typedef DataObject Superclass;
48  typedef SmartPointer<Self> Pointer;
49  typedef SmartPointer<const Self> ConstPointer;
50  typedef WeakPointer<const Self> ConstWeakPointer;
51 
54 
56  itkNewMacro( Self );
57 
59  itkTypeMacro( ParticlePositionReader, DataObject );
60 
62  const std::vector<PointType> &GetOutput() const
63  {
64  return m_Output;
65  }
66 
68  itkSetStringMacro( FileName );
69  itkGetStringMacro( FileName );
70 
72  inline void Read()
73  { this->Update(); }
74  void Update();
75 
76 protected:
78  void PrintSelf( std::ostream& os, Indent indent ) const
79  {
80  Superclass::PrintSelf( os, indent );
81 
82  os << indent << "ParticlePositionReader: " << std::endl;
83  }
84  virtual ~ParticlePositionReader() {}
85 
86 private:
87  ParticlePositionReader( const Self& ); //purposely not implemented
88  void operator=( const Self& ); //purposely not implemented
89 
90  std::vector<PointType> m_Output;
91  std::string m_FileName;
92 };
93 } // end namespace itk
94 
95 #if ITK_TEMPLATE_EXPLICIT
96 # include "Templates/itkParticlePositionReader+-.h"
97 #endif
98 
99 #if ITK_TEMPLATE_TXX
100 # include "itkParticlePositionReader.txx"
101 #endif
102 
103 #endif // ifndef __itkParticlePositionReader_h
Point< double, VDimension > PointType
const std::vector< PointType > & GetOutput() const