An update will be applied December 9th, between 12PM and 1:00PM EST (UTC -5:00). The site may be slow during that time.

Commit 1bcfe8cf authored by Bill Lorensen's avatar Bill Lorensen
Browse files

ENH: Added PixelSamples ivar to control sampling rate.

parent c103c955
......@@ -56,6 +56,7 @@ vtkRIBExporter::vtkRIBExporter()
this->FilePtr = NULL;
this->TexturePrefix = NULL;
this->Size[0] = this->Size[1] = -1;
this->PixelSamples[0] = this->PixelSamples[1] = 2;
this->Background = 0;
}
......@@ -208,6 +209,10 @@ void vtkRIBExporter::WriteHeader (vtkRenderer *aRen)
fprintf (this->FilePtr, "Imager \"background\" \"bgcolor\" [%f %f %f]\n",
color[0], color[1], color[2]);
}
fprintf (this->FilePtr, "PixelSamples %d %d\n",
this->PixelSamples[0],
this->PixelSamples[1]);
delete imageFilename;
}
......@@ -856,6 +861,8 @@ void vtkRIBExporter::PrintSelf(ostream& os, vtkIndent indent)
os << indent << "FilePrefix: " << this->FilePrefix << "\n";
os << indent << "TexturePrefix: " << this->TexturePrefix << "\n";
os << indent << "Background: " << (this->Background ? "On\n" : "Off\n");
os << indent << "Size: " << this->Size[0] << " " << this->Size[1] << "\n";
os << indent << "PixelSamples: " << this->PixelSamples[0] << " " << this->PixelSamples[1] << "\n";
}
void vtkRIBExporter::WriteTexture (vtkTexture *aTexture)
......
......@@ -93,6 +93,11 @@ public:
vtkSetVector2Macro(Size,int);
vtkGetVectorMacro(Size,int,2);
// Description
// Specify the sampling rate for the rendering. Default is 2 2.
vtkSetVector2Macro(PixelSamples,int);
vtkGetVectorMacro(PixelSamples,int,2);
// Description:
// Specify the prefix of the files to write out. The resulting filenames
// will have .RIB appended to them.
......@@ -127,6 +132,7 @@ public:
protected:
int Background;
int Size[2];
int PixelSamples[2];
// Description:
// Write the RIB header.
void WriteHeader (vtkRenderer *aRen);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment