<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:"Yu Gothic";
        panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"\@Yu Gothic";
        panose-1:2 11 4 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1313296760;
        mso-list-type:hybrid;
        mso-list-template-ids:473882390 172774188 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:9.5pt;
        font-family:Consolas;
        mso-bidi-font-family:Consolas;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">I wrote a program in C++ with VTK and I basically did this: Read volume, create
<span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkImageCanvasSource2D,
</span><span style="font-size:9.5pt;font-family:Consolas">manually access each point and add that value to the canvas, write the image using
<span style="color:#2B91AF">vtkPNGWriter.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas">I was unable to open any XDMF files using C++, so I changed to python. There are now three problems:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-size:9.5pt;font-family:Consolas"><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman""> 
</span></span></span><![endif]>The volume, when using the interactor, seems to be way off the origin causing any roation I do to end in a huge swiping motion of the volume. I have been unable to find any method to re-center the volume even though when I open
 it in the Paraview application it works well and is centered. <o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-size:9.5pt;font-family:Consolas"><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman""> 
</span></span></span><![endif]>What I am doing in the script is simply that I read the volume and Slice() the reader. Then I want to store that slice to a subarea of a canvas that I store as a PNG image file. I have been unable to find any canvas class, any
 other storage class and I have not found a PNGwriter class. The only thing I have found has been a screenshot writer, something I so not want. I simply want to slice the volume n times along the Z axis and then save each slice to the canvas which, in turn,
 is stored to disk. <o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-size:9.5pt;font-family:Consolas"><span style="mso-list:Ignore">3.<span style="font:7.0pt "Times New Roman""> 
</span></span></span><![endif]>Finally, this might be me being stupid, but I have been unable to find any method to create a LUT filter and render those colours. I did try to
<b>“lut = GetLookupTableForArray("Blue to Red Rainbow", 10);”</b> and then add that to the actors LookupTable as follows:
<b>r = Show(volume); r.LookupTable = lut;</b> However, this has not had any effect on the rendered image.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Below you can see in Paraview what I want in the python script.<o:p></o:p></p>
<p class="MsoNormal"><a href="http://puu.sh/ruIGf/c54f458415.png">http://puu.sh/ruIGf/c54f458415.png</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Python I admit I am not too good with, but to add to that I am unable to autocomplete properly and I am also unable to see things like documentation and descriptions and open the class specifications using pvpython.exe. This causes me to
 only be able to use what I find in the online documentation with minimal help. Paraview’s python interface is not up to the standard of the Paraview client.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thank you for your help.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Yours,<o:p></o:p></p>
<p class="MsoNormal">Magnus Elden<o:p></o:p></p>
</div>
</body>
</html>