<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 14 (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:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></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-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Jeff,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks. Just FYI the animation was generated by<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Computing the Dv/Dt of the voltages on each segment of the neuron<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Passing the generated Dv/Dt through an exponential decay over time filter so that the excitation is visible for slightly longer rather than flickering on/off
very fast,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">creating an alpha channel based on the ExpDecay*thickness*fudgeFactorPerSegmentType (the fudge factor is used to make the some more visible than some of the
dendrites/axons etc)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">then the opacity/alpha was combined with the original voltage level to get the RGBA value using the TwoColorsToScalars lookuptable.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">This makes the final animation more ‘illustrative’ than real in one sense, though it help greatly to see where the activity is taking place.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">JB<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Jeff Lee [mailto:jlee1549@gmail.com]
<br>
<b>Sent:</b> 04 December 2013 16:04<br>
<b>To:</b> Biddiscombe, John A.<br>
<b>Cc:</b> David E DeMarle; Enya Shen; vtkdev; vtkusers@vtk.org<br>
<b>Subject:</b> Re: [vtkusers] [vtk-developers] How to use color mapping for vtkPistonMapper?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">nice animation JB!<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Wed, Dec 4, 2013 at 7:38 AM, Biddiscombe, John A. <<a href="mailto:biddisco@cscs.ch" target="_blank">biddisco@cscs.ch</a>> wrote:<o:p></o:p></p>
<p class="MsoNormal">Just noticed a mistake in my text after clicking send ...<br>
<br>
Erratum : "Decided on Depth Sorting" - instead of depth peeling.<o:p></o:p></p>
<div>
<p class="MsoNormal"><br>
> -----Original Message-----<br>
> From: Biddiscombe, John A.<br>
> Sent: 04 December 2013 13:35<br>
> To: Biddiscombe, John A.; David E DeMarle; Enya Shen<br>
> Cc: vtkdev; <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">> Subject: RE: [vtkusers] [vtk-developers] How to use color mapping for<br>
> vtkPistonMapper?<br>
><br>
> <a href="https://hpcforge.org/scm/browser.php?group_id=117" target="_blank">https://hpcforge.org/scm/browser.php?group_id=117</a><br>
> is a project called pv-zoltan<br>
><br>
> I needed to do transparent rendering of neuron circuits which are very large<br>
> and complex, depth peeling is one option, but for some of these circuits I had<br>
> to use a machine with no graphics capabilities, so I wanted a software render<br>
> option and decided on depth peeling. see<br>
> <a href="ftp://ftp.cscs.ch/out/biddisco/bbp/videos/5k-voltage-differentials.avi" target="_blank">
ftp://ftp.cscs.ch/out/biddisco/bbp/videos/5k-voltage-differentials.avi</a> skip to<br>
> about 45 seconds in for an example of the data that is interesting - it's just<br>
> under 1 billion triangles, rendered in parallel. Some of the scenes are very<br>
> complex, so for depth peeling, you really need hundreds of layers to be sure<br>
> it's perfect (though nobody would be able to tell the difference).<br>
><br>
> What is pv-zoltan : it's a set of classes to allow parallel mesh redistribution<br>
> using the zoltan library from trilinos. Once the mesh is partitioned, I then<br>
> depth sort the triangles and render in parallel with sort last compositing.<br>
> 1) There is a custom depth sort class in the code which generates a depth<br>
> sorted ID list and attaches it to the dataset, then a custom<br>
> vtkPolyDataMapper/Painter which renders using the sorted order (this<br>
> differs from the vtkDepthSortPolyData in vtk which actually sorts the<br>
> polygons (and all cell/point arrays) and effectively doubles the memory use,<br>
> then renders with the normal polydatamapper/painter). By generating an Id<br>
> ordering and then painting in that order, we only add 1 int per cell.<br>
> 2) mesh partitioning with zoltan - and some enhancements to the rendering<br>
> front end to bypass the default compositing in paraview and use the KdTree<br>
> from zoltan to do the ordered compositing.<br>
> 3) Once that was working, I wanted to try to do the depth sort on the GPU,<br>
> so I looked at piston and found it to be very easy to modify to suit my needs.<br>
> I have changed the vtkDataSetToPiston class and the vtkPistonMapper<br>
> slightly (and the code will only work with triangle based geometry unless you<br>
> uncomment the triangulation routine somewhere). When the PISTON code<br>
> is enabled, the CPU depth sort is disabled (point 1 above) and instead push<br>
> the dataset to GPU, do depth sort on the fly (some thrust code thrown in<br>
> using thrust::sort_by_key<> and a distance functor) and render in one pass<br>
> effectively. (two loops, but only one render pass).<br>
> 4) There is some code in the colorGPU branch which activates the colour<br>
> table lookup and generation on the GPU as well, but I didn't get time to look<br>
> at it this morning to remind myself of what happens where and when. I seem<br>
> to recall I have a small bug in there which makes the table get regenerated<br>
> more often than it needs to. And possibly more CPU-GPU traffic than strictly<br>
> necessary, but nothing serious.<br>
> 5) Because the transparent rendering uses per vertex opacity - instead of<br>
> using a scalars to colours, we use a new two scalars to colours (originally<br>
> written for the point sprite renderer), this takes one array for scalars and one<br>
> for opacity, so the lookup stuff is a bit more versatile than the standard.<br>
> 6) Everything is handled (rather smoothly I think, even if I do say so myself)<br>
> by the DepthSortRepreseantation which connects everything together. It<br>
> just needs a couple of small fixes for paraview to get working, but most of it<br>
> should compile ok and work - except for the ordered compositing which<br>
> requires some extra info passed via the vtkBoundsExtentTranslator in the<br>
> plugin which holds the region assignments generated by Zoltan and is used to<br>
> send the KdTree to the compositing code in the front end.<br>
><br>
> .... currently my depth sort branch is out of date/order, so I won't paste a<br>
> paraview patch. You'd need to just comment out a couple of lines of the<br>
> plugin code. I'd suggest looking at the piston stuff and having a play with it. I<br>
> can't remember if I added an option to disable the depth sort and only do the<br>
> render on the GPU, the interesting part is where the cuda array handles are<br>
> passed from the dataset after sorting etc and given to OpenGL for rendering,<br>
> most of the piston code itself is irrelevant and it's only the push to gpu and<br>
> pass of handles to GL that is interesting. Many thanks to the original Piston<br>
> developers for showing how to do it.<br>
><br>
> NB. running on a single process ought to work, but there may be a gotcha I've<br>
> forgotten about. when I have a few hours spare I'll apply my patches to my<br>
> current paraview tree and see if everything is still working ok and post an<br>
> update.<br>
><br>
> JB<br>
><br>
><br>
> > -----Original Message-----<br>
> > From: <a href="mailto:vtkusers-bounces@vtk.org">vtkusers-bounces@vtk.org</a> [mailto:<a href="mailto:vtkusers-bounces@vtk.org">vtkusers-bounces@vtk.org</a>] On<br>
> > Behalf Of Biddiscombe, John A.<br>
> > Sent: 03 December 2013 15:44<br>
> > To: David E DeMarle; Enya Shen<br>
> > Cc: vtkdev; <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
> > Subject: Re: [vtkusers] [vtk-developers] How to use color mapping for<br>
> > vtkPistonMapper?<br>
> ><br>
> > Yes. I've enhanced the piston mapper and done the lookuptable on the<br>
> GPU.<br>
> > I'm stuck in a terminally dull meeting right now, but once I escape,<br>
> > I'll brush off the code and post a link.<br>
> ><br>
> > JB<br>
> ><br>
> > From: David DeMarle<br>
> > <<a href="mailto:dave.demarle@kitware.com">dave.demarle@kitware.com</a><mailto:<a href="mailto:dave.demarle@kitware.com">dave.demarle@kitware.com</a>>><br>
> > Date: Tuesday 3 December 2013 14:47<br>
> > To: Enya Shen<br>
> > <<a href="mailto:enya.shen2010@gmail.com">enya.shen2010@gmail.com</a><mailto:<a href="mailto:enya.shen2010@gmail.com">enya.shen2010@gmail.com</a>>><br>
> > Cc: VTK Developers <<a href="mailto:vtk-developers@vtk.org">vtk-developers@vtk.org</a><mailto:<a href="mailto:vtk-">vtk-</a><br>
> > <a href="mailto:developers@vtk.org">developers@vtk.org</a>>>, "<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><mailto:<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>>"<br>
> > <<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><mailto:<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>>><br>
> > Subject: Re: [vtk-developers] How to use color mapping for<br>
> > vtkPistonMapper?<br>
> ><br>
> > Unfortunately I ran out of time and didn't get around to moving VTK's<br>
> > lookup table over when I originally implemented that class. So, the<br>
> > randow color map you see now is the only option when doing direct GPU<br>
> > to GPU rendering. Unless you hack the class yourself to make the<br>
> > transfer function configurable of course.<br>
> ><br>
> > If anyone out there has an updated implementation (ahem John B.)<br>
> > please direct us to it and we can see about folding your improvements in.<br>
> ><br>
> > thanks<br>
> ><br>
> ><br>
> > David E DeMarle<br>
> > Kitware, Inc.<br>
> > R&D Engineer<br>
> > 21 Corporate Drive<br>
> > Clifton Park, NY 12065-8662<br>
> > Phone: <a href="tel:518-881-4909">518-881-4909</a><br>
> ><br>
> ><br>
> > On Tue, Dec 3, 2013 at 12:24 AM, Enya Shen<br>
> > <<a href="mailto:enya.shen2010@gmail.com">enya.shen2010@gmail.com</a><mailto:<a href="mailto:enya.shen2010@gmail.com">enya.shen2010@gmail.com</a>>> wrote:<br>
> > Dear all,<br>
> ><br>
> > I try to use vtkPistonMapper, but when I set the color with<br>
> > setColor(double[3]), I got nothing changed.<br>
> ><br>
> > Thanks for any example or advice!<br>
> ><br>
> > Regards,<br>
> > Enya<br>
> ><br>
> > _______________________________________________<br>
> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><<a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a>><br>
> ><br>
> > Visit other Kitware open-source projects at<br>
> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
> ><br>
> > Follow this link to subscribe/unsubscribe:<br>
> > <a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">
http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
> ><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
> ><br>
> > Visit other Kitware open-source projects at<br>
> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
> ><br>
> > Please keep messages on-topic and check the VTK FAQ at:<br>
> > <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
> ><br>
> > Follow this link to subscribe/unsubscribe:<br>
> > <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>