<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4134.600" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Dear Friends,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I am facing problem with sobelimagefilter while
using buffer.I got the o/p using files.But I am using buffer I got
exception.<BR>I am not export the buffer.I have written code as follows.Please
give me suggesttion.<BR>I got exception at export.</FONT></DIV>
<DIV> </DIV><FONT face=Arial size=2>
<DIV><BR>Volume* CIPServerDoc::SobelEffect(Volume *vol)<BR>{</DIV>
<DIV> </DIV>
<DIV> if(vol==NULL)<BR> {<BR> AfxMessageBox("volume is
null");<BR> return vol;<BR> }</DIV>
<DIV> </DIV>
<DIV> unsigned float *temp = new unsigned float[vol->width *
vol->height * vol->depth];<BR> temp = (unsigned float *)
vol->Mem;<BR> <BR> vtkImageImport *importer =
vtkImageImport::New();<BR> importer->SetDataExtent(1,vol->width,1,vol->height,1,vol->depth);<BR> importer->SetWholeExtent(1,vol->width,1,vol->height,1,vol->depth);<BR> importer->SetDataScalarTypeToFloat();<BR> importer->SetImportVoidPointer(temp);<BR> <BR> AfxMessageBox("after
image import");<BR> vtkImageSobel3D
*sobel=vtkImageSobel3D::New();<BR> sobel->SetInput(importer->GetOutput());<BR> sobel->ReleaseDataFlagOff();<BR> <BR> AfxMessageBox("after
sobel"); </DIV>
<DIV> </DIV>
<DIV> vtkImageExport *Exporter =
vtkImageExport::New();<BR> Exporter->SetInput(sobel->GetOutput());<BR> Exporter->Export(temp);
//got exception<BR> <BR> AfxMessageBox("before
assign");<BR> vol->Mem =temp;<BR> return vol;</DIV>
<DIV> </DIV>
<DIV>}<BR></DIV>
<DIV>Regards,</DIV>
<DIV>Ramakrishna</DIV></FONT></BODY></HTML>