<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->SetWindowLevel(WW,WC); //PlaneY is a vtkImagePlaneWidget<BR>vTKWidget1->GetRenderWindow()->Render(); // rendering the new image : <BR>vTKWidget1 is a QVTKWidget<BR>vtkImageMapToColors* myColorMap = vtkImageMapToColors::New();<BR>planeY->SetColorMap(myColorMap);<BR>//access to the widget's reslice's buffer<BR>QImage *myImg=new <BR>QImage((uchar*)(planeX->GetResliceOutput()->GetScalarPointer()), ....);<BR>myImg->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" <<A href="mailto:dean.inglis@camris.ca"><FONT color=#0000ff>dean.inglis@camris.ca</FONT></A>><BR>To: "Mohamed Ben Reguiga" <<A href="mailto:breguiga_mh@yahoo.fr"><FONT color=#0000ff>breguiga_mh@yahoo.fr</FONT></A>>; <<A href="mailto:vtk-developers@vtk.org"><FONT color=#800080>vtk-developers@vtk.org</FONT></A>><BR>Sent: Tuesday, May 02, 2006 8:05 PM<BR>Subject: RE: [vtk-developers] LookupTable + ImagePlaneWidget<BR><BR><BR>> Hi,<BR>><BR>> you need to access the buffer from the underlying vtkImageMapToColors:<BR>> vtkImageMapToColors *ColorMap;<BR>><BR>> since the resliced output gets set in:<BR>><BR>> void vtkImagePlaneWidget::SetInput(vtkDataSet* input)<BR>> {<BR>> ...<BR>>
this->ColorMap->SetInput(this->Reslice->GetOutput());<BR>> ...<BR>> }<BR>><BR>> you can set the color map externally due to the following macro<BR>> defined in vtkImagePlaneWidget.cxx:<BR>><BR>> vtkCxxSetObjectMacro(vtkImagePlaneWidget, ColorMap, vtkImageMapToColors);<BR>><BR>> just do<BR>><BR>> vtkImageMapToColors* myColorMap = vtkImageMapToColors::New();<BR>> widget->SetColorMap(myColorMap);<BR>><BR>> and access the buffer as you like.<BR>><BR>> In future, please post such questions to the user's list and not the<BR>> developer's list.<BR>><BR>> regards,<BR>> Dean<BR>><BR>><BR>><BR>><BR>><BR>> hello,<BR>> I'm using the vtkImagePlaneWidget in my project for a 3d recontitution <BR>> use,<BR>> under Qt.<BR>> but I'm not using the vtkViewer but an OpenGl widget (QGLWidget), so I<BR>> recover the adresse of the image-buffer like following :<BR>>
planeX=vtkImagePlaneWidget::New();<BR>> .....<BR>> uchar * Imgbuffer;<BR>> Imgbuffer =(uchar *)planeX->GetResliceOutput()->GetScalarPointer();<BR>> After that I create the image using Qt routines then I display its texture<BR>> in the QGLWidget.<BR>> the problem that when I use the SetWindowLevel (double window, double<BR>> level), the appearance of the image in QVTKwidget ( that I use for test) <BR>> is<BR>> changing while I'm changing the values of Window and level but when I<BR>> recover the buffer of the image nothing change.<BR>> So, is it possible to telle me , how can I recover the changer image by <BR>> the<BR>> lookupthable or how to recover the lookuptable and use after that to <BR>> change<BR>> my image.<BR>> thak you!<BR>><BR>> _______________________________________________<BR>> vtk-developers mailing list<BR>> <A href="mailto:vtk-developers@vtk.org"><FONT
color=#800080>vtk-developers@vtk.org</FONT></A><BR>> <A href="http://www.vtk.org/mailman/listinfo/vtk-developers"><FONT color=#800080>http://www.vtk.org/mailman/listinfo/vtk-developers</FONT></A><BR>><BR>><BR>> -- <BR>> No virus found in this incoming message.<BR>> Checked by AVG Free Edition.<BR>> Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006<BR>><BR>> <BR></DIV></div></body></html>