<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:'Times New Roman',Times,serif;" dir="ltr">
<p>Dear VTK users,</p>
<p><br>
</p>
<p>How can I change the scale of the image based on the following code lines :</p>
<p><br>
</p>
<p></p>
<div>double center2[3] = {image_vtk->GetCenter()[0], image_vtk->GetCenter()[1], image_vtk->GetCenter()[2]};<br>
if (image_vtk->GetExtent()[0] % 2 == 1)<br>
{<br>
center2[0] = image_vtk->GetCenter()[0] + 0.5*image_vtk->GetSpacing()[0];<br>
center2[1] = image_vtk->GetCenter()[1];<br>
center2[2] = image_vtk->GetCenter()[2];<br>
}<br>
<br>
// Setting camera to view the rendered slice to the whole viewport.<br>
float xc = image_vtk->GetOrigin()[0] + 0.5*(image_vtk->GetExtent()[0]+ image_vtk->GetExtent()[1])*image_vtk->GetSpacing()[0];<br>
float yc = image_vtk->GetOrigin()[1] + 0.5*(image_vtk->GetExtent()[2] + image_vtk->GetExtent()[3])*image_vtk->GetSpacing()[1];<br>
float yd = (image_vtk->GetExtent()[3] - image_vtk->GetExtent()[2] + 1)*image_vtk->GetSpacing()[1];<br>
<br>
float d = camera->GetDistance();<br>
camera->SetParallelScale(yd);<br>
<br>
</div>
<br>
<p></p>
<p><br>
</p>
<p>Kind regards,<br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: "Times New Roman",Times,serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;">
<font face="Garamond" size="3"></font><span><span></span></span>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: "Times New Roman",Times,serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;">
<div><span style="line-height:18.399999618530273px"><font face="Garamond" size="3"><br>
</font></span></div>
<div>
<div>
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="line-height:0; vertical-align:bottom; padding-right:10px; padding-top:20px; padding-bottom:20px" width="107" valign="bottom" align="left">
<a href="https://about.me/abdelkhalek.bakkari?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=edit_panel&utm_content=thumb" style="text-decoration:none" id="LPNoLP"></a><br>
</td>
<td style="line-height:1.1; vertical-align:bottom; padding-top:20px; padding-bottom:20px" valign="bottom" align="left">
<br>
</td>
</tr>
</tbody>
</table>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</body>
</html>