iRoCS Toolbox  1.1.0
Public Member Functions
SVGDataIO Class Reference

#include <SVGDataIO.hh>

Collaboration diagram for SVGDataIO:

Public Member Functions

 SVGDataIO (LabellingMainWidget *mainWidget)
 
 ~SVGDataIO ()
 
void save (std::string const &fileName, double widthCm, double marginCm, blitz::TinyVector< double, 3 > const &lowerBoundUm, blitz::TinyVector< double, 3 > const &upperBoundUm, double scaleBarLengthUm, std::string const &font, double fontSizePt) const
 Save the contents of the current OrthoViewWidget to SVG using a QSvgGenerator. More...
 
void save ()
 
void saveXml (std::string const &fileName, double widthCm, double marginCm, blitz::TinyVector< double, 3 > const &lowerBoundUm, blitz::TinyVector< double, 3 > const &upperBoundUm, double scaleBarLengthUm, std::string const &font, double fontSizePt, iRoCS::ProgressReporter *pr=NULL) const
 Save the contents of the current OrthoViewWidget to SVG using custom SVG writing routines which have to be implemented for each channel and marker type. More...
 

Detailed Description

Definition at line 93 of file SVGDataIO.hh.

Constructor & Destructor Documentation

◆ SVGDataIO()

SVGDataIO::SVGDataIO ( LabellingMainWidget mainWidget)

◆ ~SVGDataIO()

SVGDataIO::~SVGDataIO ( )

Member Function Documentation

◆ save() [1/2]

void SVGDataIO::save ( std::string const &  fileName,
double  widthCm,
double  marginCm,
blitz::TinyVector< double, 3 > const &  lowerBoundUm,
blitz::TinyVector< double, 3 > const &  upperBoundUm,
double  scaleBarLengthUm,
std::string const &  font,
double  fontSizePt 
) const

Save the contents of the current OrthoViewWidget to SVG using a QSvgGenerator.

This function is a legacy function and is only a fall-back if saveXML() is not able to draw parts of the displayed elements. You should use it only during debugging of new channels if an explicit svg rendering routine is not yet implemented.

Parameters
fileNameThe file name to save the SVG image to
widthCmThe output image width in centimeters
marginCmThe margin width between the orthoview planes in centimeters
lowerBoundUmThe lower bound of the selected box to render to SVG in micrometers
upperBoundUmThe upper bound of the selected box to render to SVG in micrometers
scaleBarLengthUmThe length of the displayed scale bar in micrometers
fontThe font name to use. Make sure that your system and any system you want to display the SVG with has the specified font installed
fontSizePtThe font size in points. This only affects the font size of the scale bar.

◆ saveXml()

void SVGDataIO::saveXml ( std::string const &  fileName,
double  widthCm,
double  marginCm,
blitz::TinyVector< double, 3 > const &  lowerBoundUm,
blitz::TinyVector< double, 3 > const &  upperBoundUm,
double  scaleBarLengthUm,
std::string const &  font,
double  fontSizePt,
iRoCS::ProgressReporter pr = NULL 
) const

Save the contents of the current OrthoViewWidget to SVG using custom SVG writing routines which have to be implemented for each channel and marker type.

This routine produces clean SVG code structuring the channels and markers in hierarchical groups for later editing. Explicit implementations of the renderSVG() methods of the different channels and markers should be optimized for later editing.

Parameters
fileNameThe file name to save the SVG image to
widthCmThe output image width in centimeters
marginCmThe margin width between the orthoview planes in centimeters
lowerBoundUmThe lower bound of the selected box to render to SVG in micrometers
upperBoundUmThe upper bound of the selected box to render to SVG in micrometers
scaleBarLengthUmThe length of the displayed scale bar in micrometers
fontThe font name to use. Make sure that your system and any system you want to display the SVG with has the specified font installed
fontSizePtThe font size in points. This only affects the font size of the scale bar.
prIf not NULL progress will be reported via the given ProgressReporter

◆ save() [2/2]

void SVGDataIO::save ( )

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