Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkPVReaderModule Class Reference

Module representing a reader. More...

#include <vtkPVReaderModule.h>

Inheritance diagram for vtkPVReaderModule:

Inheritance graph
[legend]
Collaboration diagram for vtkPVReaderModule:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vtkTypeRevisionMacro (vtkPVReaderModule, vtkPVSource)
void PrintSelf (ostream &os, vtkIndent indent)
virtual void CreateProperties ()
virtual int CanReadFile (const char *fname)
void AddExtension (const char *)
vtkIdType GetNumberOfExtensions ()
const char * GetExtension (vtkIdType i)
const char * RemovePath (const char *fname)
virtual void SaveState (ofstream *file)
void AddPVFileEntry (vtkPVFileEntry *pvw)
virtual int GetNumberOfTimeSteps ()
virtual void SetRequestedTimeStep (int)
vtkPVWidgetGetTimeStepWidget ()
virtual int Initialize (const char *fname, vtkPVReaderModule *&newModule)
virtual int Finalize (const char *fname)
virtual int ReadFileInformation (const char *fname)
virtual void SetAcceptAfterRead (int)
virtual int GetAcceptAfterRead ()
virtual vtkPVFileEntryGetFileEntry ()

Static Public Member Functions

vtkPVReaderModuleNew ()

Protected Member Functions

 vtkPVReaderModule ()
 ~vtkPVReaderModule ()
const char * ExtractExtension (const char *fname)
virtual int FinalizeInternal (const char *fname, int accept)
void SetReaderFileName (const char *fname)
int CloneAndInitialize (int makeCurrent, vtkPVReaderModule *&clone)

Protected Attributes

vtkPVFileEntryFileEntry
int AcceptAfterRead
vtkVector< const char * > * Extensions
vtkVectorIterator< const char * > * Iterator
int PackFileEntry
int AddFileEntry

Detailed Description

Module representing a reader.

The class vtkPVReaderModule is used to represent a reader (or a pipeline which contains a reader). A prototype for each file type is created at startup by parsing the (XML) configuration file. Later, when the user tries to open a file, the prototypes are consulted. The first prototype which respond positively to CanReadFile() is asked to read the file and create a new instance of a vtkPVReaderModule (or any subclass) to be added to the list of existing sources.

See also:
vtkPVAdvancedReaderModule vtkPVEnSightReaderModule vtkPVPLOT3DReaderModule

Definition at line 43 of file vtkPVReaderModule.h.


Constructor & Destructor Documentation

vtkPVReaderModule::vtkPVReaderModule  )  [protected]
 

vtkPVReaderModule::~vtkPVReaderModule  )  [protected]
 


Member Function Documentation

vtkPVReaderModule* vtkPVReaderModule::New  )  [static]
 

Reimplemented from vtkPVSource.

Reimplemented in vtkPVAdvancedReaderModule, vtkPVDataSetReaderModule, vtkPVDReaderModule, vtkPVEnSightReaderModule, vtkPVPLOT3DReaderModule, vtkPVRawReaderModule, and vtkXDMFReaderModule.

vtkPVReaderModule::vtkTypeRevisionMacro vtkPVReaderModule  ,
vtkPVSource 
 

void vtkPVReaderModule::PrintSelf ostream &  os,
vtkIndent  indent
 

Reimplemented from vtkPVSource.

Reimplemented in vtkPVAdvancedReaderModule, vtkPVDataSetReaderModule, vtkPVDReaderModule, vtkPVEnSightReaderModule, vtkPVPLOT3DReaderModule, vtkPVRawReaderModule, and vtkXDMFReaderModule.

virtual void vtkPVReaderModule::CreateProperties  )  [virtual]
 

Set up the UI for this source. The only default element created is a file entry. Of course, more can be added in the configuration file.

Reimplemented from vtkPVSource.

Reimplemented in vtkPVDataSetReaderModule, vtkPVEnSightReaderModule, and vtkPVRawReaderModule.

virtual int vtkPVReaderModule::CanReadFile const char *  fname  )  [virtual]
 

Returns true (1) if the current reader can read the specified file, false (0) otherwise. In the default implementation, this is done by comparing the extension of the file to a list of extensions specified by the configuration (XML) file -see AddExtension-.

virtual int vtkPVReaderModule::Initialize const char *  fname,
vtkPVReaderModule *&  newModule
[virtual]
 

Used mainly by the scripting interface, these three methods are normally called in order during the file opening process. InitializeReadCustom() (invoked on the prototype) returns a clone. ReadFileInformation() and FinalizeRead() are then invoked on the clone to finish the reading process. These methods can be changed by custom subclasses which require special handling of ParaView traces.

Reimplemented in vtkPVAdvancedReaderModule, vtkPVDataSetReaderModule, and vtkXDMFReaderModule.

virtual int vtkPVReaderModule::Finalize const char *  fname  )  [virtual]
 

Used mainly by the scripting interface, these three methods are normally called in order during the file opening process. InitializeReadCustom() (invoked on the prototype) returns a clone. ReadFileInformation() and FinalizeRead() are then invoked on the clone to finish the reading process. These methods can be changed by custom subclasses which require special handling of ParaView traces.

Reimplemented in vtkPVAdvancedReaderModule, vtkPVDReaderModule, and vtkXDMFReaderModule.

virtual int vtkPVReaderModule::ReadFileInformation const char *  fname  )  [virtual]
 

Used mainly by the scripting interface, these three methods are normally called in order during the file opening process. InitializeReadCustom() (invoked on the prototype) returns a clone. ReadFileInformation() and FinalizeRead() are then invoked on the clone to finish the reading process. These methods can be changed by custom subclasses which require special handling of ParaView traces.

Reimplemented in vtkPVAdvancedReaderModule, vtkPVEnSightReaderModule, and vtkXDMFReaderModule.

void vtkPVReaderModule::AddExtension const char *   ) 
 

Add extension recognized by the reader. This is displayed in the selection dialog and used in the default implementation of CanReadFile().

vtkIdType vtkPVReaderModule::GetNumberOfExtensions  ) 
 

Get the number of registered file extensions.

const char* vtkPVReaderModule::GetExtension vtkIdType  i  ) 
 

Get the ith file extension.

const char* vtkPVReaderModule::RemovePath const char *  fname  ) 
 

Remove the path and return the filename.

virtual void vtkPVReaderModule::SetAcceptAfterRead int   )  [virtual]
 

This tells vtkPVWindow whether it should call Accept() on the module returned by ReadFile. In the default implementation, the ReadFile() creates a clone and sets up all the filename (which is the only user modifiable option). Since the user does not have to make any selections before the file is loaded, vtkPVWindow calls Accept instead of the user. This behaviour is changed in vtkPVAdvancedReaderModule which first calls UpdateInformation() on the VTK reader, obtains some preliminary information from the file and then prompts the user for some stuff. In this situation, vtkPVWindow does not call Accept. This is mainly used to avoid reading the whole file before asking the user the initial configuration (for example, the user might want to load only a subset of available attriutes)

virtual int vtkPVReaderModule::GetAcceptAfterRead  )  [virtual]
 

This tells vtkPVWindow whether it should call Accept() on the module returned by ReadFile. In the default implementation, the ReadFile() creates a clone and sets up all the filename (which is the only user modifiable option). Since the user does not have to make any selections before the file is loaded, vtkPVWindow calls Accept instead of the user. This behaviour is changed in vtkPVAdvancedReaderModule which first calls UpdateInformation() on the VTK reader, obtains some preliminary information from the file and then prompts the user for some stuff. In this situation, vtkPVWindow does not call Accept. This is mainly used to avoid reading the whole file before asking the user the initial configuration (for example, the user might want to load only a subset of available attriutes)

virtual vtkPVFileEntry* vtkPVReaderModule::GetFileEntry  )  [virtual]
 

Get the file entry.

virtual void vtkPVReaderModule::SaveState ofstream *  file  )  [virtual]
 

Saves the pipeline in a ParaView script. This is similar to saveing a trace, except only the last state is stored.

Reimplemented from vtkPVSource.

Reimplemented in vtkXDMFReaderModule.

void vtkPVReaderModule::AddPVFileEntry vtkPVFileEntry pvw  ) 
 

Puts the file entry at the begining of the list for batch files. The file name has to be set before array selection.

virtual int vtkPVReaderModule::GetNumberOfTimeSteps  )  [virtual]
 

Get the number of time steps that can be provided by this reader. Timesteps are available either from an animation file or from a time-series of files as detected by the file entry widget. Returns 0 if time steps are not available, and the number of timesteps otherwise.

Reimplemented in vtkPVDReaderModule.

virtual void vtkPVReaderModule::SetRequestedTimeStep int   )  [virtual]
 

Set the time step that should be provided by the reader. This value is ignored unless GetNumberOfTimeSteps returns 1 or more.

Reimplemented in vtkPVDReaderModule.

vtkPVWidget* vtkPVReaderModule::GetTimeStepWidget  ) 
 

Method to obtain the widget that controls the timestep.

const char* vtkPVReaderModule::ExtractExtension const char *  fname  )  [protected]
 

virtual int vtkPVReaderModule::FinalizeInternal const char *  fname,
int  accept
[protected, virtual]
 

void vtkPVReaderModule::SetReaderFileName const char *  fname  )  [protected]
 

int vtkPVReaderModule::CloneAndInitialize int  makeCurrent,
vtkPVReaderModule *&  clone
[protected]
 

Creates and returns (by reference) a copy of this source. It will create a new instance of the same type as the current object using NewInstance() and then call ClonePrototype() on all widgets and add these clones to it's widget list. The return value is VTK_OK is the cloning was successful.


Member Data Documentation

vtkPVFileEntry* vtkPVReaderModule::FileEntry [protected]
 

Definition at line 137 of file vtkPVReaderModule.h.

int vtkPVReaderModule::AcceptAfterRead [protected]
 

Definition at line 138 of file vtkPVReaderModule.h.

vtkVector<const char*>* vtkPVReaderModule::Extensions [protected]
 

Definition at line 146 of file vtkPVReaderModule.h.

vtkVectorIterator<const char*>* vtkPVReaderModule::Iterator [protected]
 

Definition at line 147 of file vtkPVReaderModule.h.

int vtkPVReaderModule::PackFileEntry [protected]
 

Definition at line 157 of file vtkPVReaderModule.h.

int vtkPVReaderModule::AddFileEntry [protected]
 

Definition at line 158 of file vtkPVReaderModule.h.


The documentation for this class was generated from the following file:
Generated on Tue May 30 12:42:42 2006 for ParaView by doxygen 1.3.5