<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
<div class="moz-text-html" lang="x-western">
<p class="MsoNormal"><span lang="EN-GB" style="">Dear VTK Users,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style=""><o:p>&nbsp;</o:p>I have a
question concerning optimising a vector postscript file generated
by vtkgl2ps. If I understand well, the gl2ps writer, during writing a
surface, uses
the triangularised representation and writes all the triangles in the
postscript file. This means that if I have one-colour shape,
represented on a
thousand of triangles, the final postscript output will contain one
thousand
triangles. The same information could be saved by just one filled
polygon. I
understand that this kind of optimisation is not implemented in gl2ps,
but
maybe I could do some pre- or post-processing? <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style=""><o:p>&nbsp;</o:p>My
questions are then: <o:p></o:p></span></p>
<ol style="margin-top: 0cm;" start="1" type="1">
  <li class="MsoNormal" style=""><span lang="EN-GB" style="">Is there
any method in VTK which would `detriangulate&#8217; a 2D slice,<span style="">&nbsp;
    </span>converting all neighbouring<span style="">&nbsp; </span>triangles,
lying on the same plane, into one polygon?<o:p></o:p></span></li>
  <li class="MsoNormal" style=""><span lang="EN-GB" style="">If yes,
will OpenGl convert it again to triangles during the rendering?<o:p></o:p></span></li>
  <li class="MsoNormal" style=""><span lang="EN-GB" style="">If no,
anyone knows any vector-format converter, which would convert all
neighbouring triangles of the same colour into polygons?<o:p></o:p></span></li>
</ol>
<p class="MsoNormal"><span lang="EN-GB" style=""><o:p>&nbsp;</o:p>Here are
some details. I am interested in getting filled contours of a
slice of a scalar field. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="">The grid is very
dense, but the pattern is simple, so I want only, say,
three contours. I use vtkBandedContourFilter, which generates cell data
filled
with these three values. If I just save it to vector eps file, I get
0.5Mb
(uncompressed). <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style=""><o:p>&nbsp;</o:p>Here is
what I have done already: for N contours I created N filters
vtkThreshold
in order to separate the grid parts of different values, then I reduced
the
triangles of every grid part with vtkDecimatePro. This reduces the
output file
size ten times. It&#8217;s already much better, but I have really many of
these
visualisations, so I am still interested in further size reduction.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style=""><o:p>&nbsp;</o:p>I&#8217;ll be
grateful for any suggestion<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style=""><o:p></o:p></span></p>
<span lang="EN-GB" style="">Kasia</span>
</div>
</body>
</html>