Shapeworks Studio  2.1
Shape analysis software suite
List of all members | Public Types | Public Member Functions
itk::PSMProjectWriter Class Reference

This class is a writer for PSMProjects. More...

#include <itkPSMProjectWriter.h>

+ Inheritance diagram for itk::PSMProjectWriter:
+ Collaboration diagram for itk::PSMProjectWriter:

Public Types

typedef PSMProjectWriter Self
 
typedef Object Superclass
 
typedef SmartPointer< SelfPointer
 
typedef SmartPointer< const SelfConstPointer
 

Public Member Functions

 itkNewMacro (Self)
 
 itkTypeMacro (PSMProjectWriter, Object)
 
 itkSetStringMacro (FileName)
 
 itkGetStringMacro (FileName)
 
 itkGetObjectMacro (Input, PSMProject)
 
 itkSetObjectMacro (Input, PSMProject)
 
 itkGetConstObjectMacro (Input, PSMProject)
 
virtual void Update ()
 

Detailed Description

This class is a writer for PSMProjects.

The following code illustrates how to use this class to write a PSMProject to a file.

Definition at line 35 of file itkPSMProjectWriter.h.

Member Typedef Documentation

Standard class typedefs.

Definition at line 39 of file itkPSMProjectWriter.h.

Member Function Documentation

itk::PSMProjectWriter::itkGetObjectMacro ( Input  ,
PSMProject   
)

Get the project data structure generated after calling Update().

itk::PSMProjectWriter::itkGetStringMacro ( FileName  )

Get the input XML filename.

itk::PSMProjectWriter::itkNewMacro ( Self  )

Method for creation through the object factory.

itk::PSMProjectWriter::itkSetStringMacro ( FileName  )

Set the input XML filename.

itk::PSMProjectWriter::itkTypeMacro ( PSMProjectWriter  ,
Object   
)

Run-time type information (and related methods).

void itk::PSMProjectWriter::Update ( )
virtual

Execute the reader.

Definition at line 30 of file itkPSMProjectWriter.cxx.

31 {
32  std::ofstream out;
33  out.open(this->GetFileName());
34  if (!out)
35  {
36  itkExceptionMacro( "Could not open the file " + m_FileName + " for output.");
37  }
38  else
39  {
40  m_Input->Stream(out);
41  out.close();
42  }
43 }

The documentation for this class was generated from the following files: