Hi Even and thank you for the quick response.<div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
You should even not consider the VRTComplexSource class to be in the public<br>API, so the visibility of its members is not significant. And playing with them<br>from the outside isn't recommanded at all. </blockquote>
<div><br></div><div><div>The fact that you don't consider the class in the public API does not excuse the fact that this is a mistake encapsulation :)</div><div>And apart from that, nothing prevents me to use a special driver to do specific things that are not directly provided by the public API.</div>
<div>Currently I need to build a VRT, and the VRT driver are fine for that. It's dirrectly use in the gdalbuildvrt utility for example. If the VRT plugin is not safe to use, the solution is to correct it.</div><div><br>
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">The only official way of changing the LUT is to change the XML of the VRT and<br>
reload it.</blockquote><div>To read a VRT file outside from gdal I need to parse an XML file, so I have to use another dependency (like xerces) to do just a small think.</div><div><br></div><div>Another argument is the VRTKernelFiltredSource. To set a kernel filtre we don't have to set the attributes nKernelSize, padfKernelCoefs and bNormalized, because we can't (the attributes are protected). But the API offers a setKernel that do exactly the same think that I hope the setLUT method do in the VRTComplexSource.</div>
</div><div><br></div><div><span style>Best regards</span> <br><br><div class="gmail_quote">2012/5/19 Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@mines-paris.org" target="_blank">even.rouault@mines-paris.org</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Le samedi 19 mai 2012 16:58:07, Saâd HESSANE a écrit :<br>
<div class="im">> Hi,<br>
><br>
> In wanting to add programmatically a LUT to a VRTComplexSource, I read the<br>
> VRT driver source code.<br>
</div>> VRTComplexSource have three public attributes : *double<br>
> *padfLUTInputs*, *double<br>
> *padfLUTOutputs* and *int nLUTItemCount.*<br>
> *<br>
> *<br>
<br>
You should even not consider the VRTComplexSource class to be in the public<br>
API, so the visibility of its members is not significant. And playing with them<br>
from the outside isn't recommanded at all.<br>
<br>
The only official way of changing the LUT is to change the XML of the VRT and<br>
reload it.<br>
</blockquote></div><br></div></div>