<html><head><style type="text/css"><!-- DIV {margin:0px} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV>Hello,<BR>thank you for your help, but I still begining in the VTk's big world so <BR>excuse me if I'm asking abvious questions, but really I need help.<BR>I did like following :<BR>...<BR><BR>planeY-&gt;SetWindowLevel(WW,WC); //PlaneY is a vtkImagePlaneWidget<BR>vTKWidget1-&gt;GetRenderWindow()-&gt;Render(); // rendering the new image&nbsp; : <BR>vTKWidget1 is a QVTKWidget<BR>vtkImageMapToColors* myColorMap = vtkImageMapToColors::New();<BR>planeY-&gt;SetColorMap(myColorMap);<BR>//access to the widget's reslice's buffer<BR>QImage *myImg=new <BR>QImage((uchar*)(planeX-&gt;GetResliceOutput()-&gt;GetScalarPointer()), ....);<BR>myImg-&gt;save("EssaiVTK.jpg","JPEG"); //Save the image in the DD;<BR>..<BR>nothing happens , the image is the same!<BR><BR>Is there something wron or I didn't access to the right Buffer
 because I <BR>didnt' know how to access to the buffer from the underlying <BR>vtkImageMapToColors.<BR><BR>thank you for your help, I really need it<BR>regards,<BR>Med.<BR><BR>----- Original Message ----- <BR>From: "Dean Inglis" &lt;<A href="mailto:dean.inglis@camris.ca"><FONT color=#0000ff>dean.inglis@camris.ca</FONT></A>&gt;<BR>To: "Mohamed Ben Reguiga" &lt;<A href="mailto:breguiga_mh@yahoo.fr"><FONT color=#0000ff>breguiga_mh@yahoo.fr</FONT></A>&gt;; &lt;<A href="mailto:vtk-developers@vtk.org"><FONT color=#800080>vtk-developers@vtk.org</FONT></A>&gt;<BR>Sent: Tuesday, May 02, 2006 8:05 PM<BR>Subject: RE: [vtk-developers] LookupTable + ImagePlaneWidget<BR><BR><BR>&gt; Hi,<BR>&gt;<BR>&gt; you need to access the buffer from the underlying vtkImageMapToColors:<BR>&gt; vtkImageMapToColors&nbsp; *ColorMap;<BR>&gt;<BR>&gt; since the resliced output gets set in:<BR>&gt;<BR>&gt; void vtkImagePlaneWidget::SetInput(vtkDataSet* input)<BR>&gt; {<BR>&gt; ...<BR>&gt;
 this-&gt;ColorMap-&gt;SetInput(this-&gt;Reslice-&gt;GetOutput());<BR>&gt; ...<BR>&gt; }<BR>&gt;<BR>&gt; you can set the color map externally due to the following macro<BR>&gt; defined in vtkImagePlaneWidget.cxx:<BR>&gt;<BR>&gt; vtkCxxSetObjectMacro(vtkImagePlaneWidget, ColorMap, vtkImageMapToColors);<BR>&gt;<BR>&gt; just do<BR>&gt;<BR>&gt; vtkImageMapToColors* myColorMap = vtkImageMapToColors::New();<BR>&gt; widget-&gt;SetColorMap(myColorMap);<BR>&gt;<BR>&gt; and access the buffer as you like.<BR>&gt;<BR>&gt; In future, please post such questions to the user's list and not the<BR>&gt; developer's list.<BR>&gt;<BR>&gt; regards,<BR>&gt; Dean<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt; hello,<BR>&gt; I'm using the vtkImagePlaneWidget in my project for a 3d recontitution <BR>&gt; use,<BR>&gt; under Qt.<BR>&gt; but I'm not using the vtkViewer but an OpenGl widget (QGLWidget), so I<BR>&gt; recover the adresse of the image-buffer like following :<BR>&gt;
 planeX=vtkImagePlaneWidget::New();<BR>&gt; .....<BR>&gt; uchar * Imgbuffer;<BR>&gt; Imgbuffer =(uchar *)planeX-&gt;GetResliceOutput()-&gt;GetScalarPointer();<BR>&gt; After that I create the image using Qt routines then I display its texture<BR>&gt; in the QGLWidget.<BR>&gt; the problem that when I use the SetWindowLevel (double window, double<BR>&gt; level), the appearance of the image in QVTKwidget ( that I use for test) <BR>&gt; is<BR>&gt; changing while I'm changing the values of Window and level but when I<BR>&gt; recover the buffer of&nbsp; the image nothing change.<BR>&gt; So, is it possible to telle me , how can I recover the changer image by <BR>&gt; the<BR>&gt; lookupthable or how to recover the lookuptable and use after that to <BR>&gt; change<BR>&gt; my image.<BR>&gt; thak you!<BR>&gt;<BR>&gt; _______________________________________________<BR>&gt; vtk-developers mailing list<BR>&gt; <A href="mailto:vtk-developers@vtk.org"><FONT
 color=#800080>vtk-developers@vtk.org</FONT></A><BR>&gt; <A href="http://www.vtk.org/mailman/listinfo/vtk-developers"><FONT color=#800080>http://www.vtk.org/mailman/listinfo/vtk-developers</FONT></A><BR>&gt;<BR>&gt;<BR>&gt; -- <BR>&gt; No virus found in this incoming message.<BR>&gt; Checked by AVG Free Edition.<BR>&gt; Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006<BR>&gt;<BR>&gt; <BR></DIV></div></body></html>