Slicer 5.13
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkSlicerSceneWriter Class Reference

#include <Modules/Loadable/Data/Logic/vtkSlicerSceneWriter.h>

Inheritance diagram for vtkSlicerSceneWriter:
Collaboration diagram for vtkSlicerSceneWriter:

Public Types

typedef vtkMRMLFileWriter Superclass
 
- Public Types inherited from vtkMRMLFileWriter
typedef vtkMRMLFileIOHandler Superclass
 
- Public Types inherited from vtkMRMLFileIOHandler
typedef vtkObject Superclass
 

Public Member Functions

bool CanWriteObject (vtkObject *object) override
 Returns true if the object is a scene.
 
vtkSlicerApplicationLogic * GetApplicationLogic ()
 
virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void SetApplicationLogic (vtkSlicerApplicationLogic *applicationLogic)
 
bool Write (vtkMRMLIOProperties *properties) override
 
- Public Member Functions inherited from vtkMRMLFileWriter
void AddNodeClassName (const std::string &className)
 
void AddWrittenNodeID (const std::string &nodeID)
 
virtual double CanWriteObjectConfidence (vtkObject *object)
 
void ClearWrittenNodeIDs ()
 
virtual double GetConfidenceForMatchingClass ()
 What a writer that only knows its node class answers for a node of that class.
 
virtual std::vector< std::string > GetNameFiltersForObject (vtkObject *object)
 
std::string GetNodeClassName () const
 
const std::vector< std::string > & GetNodeClassNames () const
 
const std::vector< std::string > & GetWrittenNodeIDs () const
 The nodes the last Write wrote, by node ID.
 
bool IsWriter () const override
 Whether this writes rather than reads.
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
virtual void SetConfidenceForMatchingClass (double)
 
void SetNodeClassName (const std::string &className)
 
void SetNodeClassNames (const std::vector< std::string > &classNames)
 The classes of nodes this writer is for.
 
void SetWrittenNodeIDs (const std::vector< std::string > &nodeIDs)
 
- Public Member Functions inherited from vtkMRMLFileIOHandler
void FillOptionsDescription (vtkMRMLIOProperties *properties, vtkMRMLIOOptionsDescription *description)
 
virtual std::string GetDescription ()
 What to call this in a file dialog ("Volume", "Mimics project").
 
const std::vector< std::string > & GetExtensions () const
 
vtkMRMLFileIOManager * GetFileIOManager () const
 
virtual std::string GetFileType ()
 
virtual std::string GetMatchedExtension (const std::string &filePath) const
 The longest matching extension of filePath, or an empty string.
 
const std::vector< std::string > & GetNameFilters () const
 
vtkMRMLIOProperties * GetOptionDefaults ()
 
virtual void GetOptionsDescription (vtkMRMLIOOptionsDescription *description)
 
std::string GetOptionsDescriptionJSON (vtkMRMLIOProperties *properties)
 
void GetOptionValues (vtkMRMLIOProperties *properties, vtkMRMLIOProperties *values)
 
vtkMRMLScene * GetScene () const
 
vtkMRMLMessageCollection * GetUserMessages () const
 
virtual bool MatchesExtension (const std::string &filePath) const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
virtual void SetDescription (std::string)
 
void SetFileIOManager (vtkMRMLFileIOManager *manager)
 
virtual void SetFileType (std::string)
 
void SetNameFilters (const std::vector< std::string > &filters)
 The name filters, as Slicer writes them: "Mimics project (*.mcs *.mcs.gz)".
 
virtual void SetScene (vtkMRMLScene *scene)
 Where the nodes go, and where messages for the user are collected.
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkSlicerSceneWriter * New ()
 
static vtkSlicerSceneWriter * SafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkMRMLFileWriter
static int IsTypeOf (const char *type)
 
static vtkMRMLFileWriter * New ()
 
static vtkMRMLFileWriter * SafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkMRMLFileIOHandler
static std::vector< std::string > ExtensionsFromNameFilter (const std::string &nameFilter)
 The extensions named by a filter such as "Mimics project (*.mcs *.mcs.gz)".
 
static std::vector< std::string > GetMatchingNameFilters (const std::string &filePath, const std::vector< std::string > &nameFilters, bool requireReadableFile, int *longestExtensionMatch=nullptr)
 
static int IsTypeOf (const char *type)
 
static std::string LongestMatchingExtension (const std::string &filePath, const std::vector< std::string > &extensions)
 
static std::vector< std::string > NameFilterToWildcards (const std::string &nameFilter)
 
static vtkMRMLFileIOHandler * New ()
 
static vtkMRMLFileIOHandler * SafeDownCast (vtkObject *o)
 
static bool WildcardMatch (const std::string &pattern, const std::string &text)
 Case-insensitive wildcard matching of the whole text. Supported wildcards: '*', '?', and character sets ("[abc]", "[!abc]").
 

Protected Member Functions

 vtkSlicerSceneWriter ()
 
bool WriteToDirectory (vtkMRMLIOProperties *properties)
 
bool WriteToMRB (vtkMRMLIOProperties *properties)
 
bool WriteToMRML (vtkMRMLIOProperties *properties)
 
 ~vtkSlicerSceneWriter () override
 
- Protected Member Functions inherited from vtkMRMLFileWriter
 vtkMRMLFileWriter ()
 
 ~vtkMRMLFileWriter () override
 
- Protected Member Functions inherited from vtkMRMLFileIOHandler
 vtkMRMLFileIOHandler ()
 
 ~vtkMRMLFileIOHandler () override
 

Protected Attributes

vtkWeakPointer< vtkSlicerApplicationLogic > ApplicationLogic
 
- Protected Attributes inherited from vtkMRMLFileWriter
double ConfidenceForMatchingClass { 0.5 }
 
std::vector< std::string > NodeClassNames
 
std::vector< std::string > WrittenNodeIDs
 
- Protected Attributes inherited from vtkMRMLFileIOHandler
std::string Description
 
std::vector< std::string > Extensions
 
vtkWeakPointer< vtkMRMLFileIOManager > FileIOManager
 
std::string FileType
 
std::vector< std::string > NameFilters
 
vtkNew< vtkMRMLIOProperties > OptionDefaults
 
vtkWeakPointer< vtkMRMLScene > Scene
 
vtkNew< vtkMRMLMessageCollection > UserMessages
 

Detailed Description

Writer of the MRML scene to a .mrml file, a Medical Reality Bundle (.mrb) file, or a Slicer Data Bundle (directory).

Properties: "fileName", "screenShot" (vtkImageData, optional).

Definition at line 35 of file vtkSlicerSceneWriter.h.

Member Typedef Documentation

◆ Superclass

Constructor & Destructor Documentation

◆ vtkSlicerSceneWriter()

vtkSlicerSceneWriter::vtkSlicerSceneWriter ( )
protected

◆ ~vtkSlicerSceneWriter()

vtkSlicerSceneWriter::~vtkSlicerSceneWriter ( )
overrideprotected

Member Function Documentation

◆ CanWriteObject()

bool vtkSlicerSceneWriter::CanWriteObject ( vtkObject * object)
overridevirtual

Returns true if the object is a scene.

Reimplemented from vtkMRMLFileWriter.

◆ GetApplicationLogic()

vtkSlicerApplicationLogic * vtkSlicerSceneWriter::GetApplicationLogic ( )

◆ GetClassName()

virtual const char * vtkSlicerSceneWriter::GetClassName ( )
virtual

Reimplemented from vtkMRMLFileWriter.

◆ IsA()

virtual int vtkSlicerSceneWriter::IsA ( const char * type)
virtual

Reimplemented from vtkMRMLFileWriter.

◆ IsTypeOf()

static int vtkSlicerSceneWriter::IsTypeOf ( const char * type)
static

◆ New()

static vtkSlicerSceneWriter * vtkSlicerSceneWriter::New ( )
static

◆ SafeDownCast()

static vtkSlicerSceneWriter * vtkSlicerSceneWriter::SafeDownCast ( vtkObject * o)
static

◆ SetApplicationLogic()

void vtkSlicerSceneWriter::SetApplicationLogic ( vtkSlicerApplicationLogic * applicationLogic)

Application logic is used for saving screenshots and data bundles. If not set then the application logic of the file IO manager where the writer is registered is used.

◆ Write()

bool vtkSlicerSceneWriter::Write ( vtkMRMLIOProperties * properties)
overridevirtual

Write the node named by the "nodeID" property to the file named by "fileName". What it wrote is then in GetWrittenNodeIDs. The base class writes nothing: a writer whose work is done elsewhere is called through its owner.

Reimplemented from vtkMRMLFileWriter.

◆ WriteToDirectory()

bool vtkSlicerSceneWriter::WriteToDirectory ( vtkMRMLIOProperties * properties)
protected

◆ WriteToMRB()

bool vtkSlicerSceneWriter::WriteToMRB ( vtkMRMLIOProperties * properties)
protected

◆ WriteToMRML()

bool vtkSlicerSceneWriter::WriteToMRML ( vtkMRMLIOProperties * properties)
protected

Member Data Documentation

◆ ApplicationLogic

vtkWeakPointer<vtkSlicerApplicationLogic> vtkSlicerSceneWriter::ApplicationLogic
protected

Definition at line 59 of file vtkSlicerSceneWriter.h.


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