<!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></FONT> </DIV>
<DIV><FONT face=Arial size=2>Hi Friends</FONT></DIV>
<DIV> </DIV><FONT face=Arial size=2>
<DIV><BR> I am using vtkImageFFT and vtkImageRFFT in my
applicaction along with vtkIimageButterworkHighpassFilter.I am also using
vtkImageExtractComponents with SetComponents to 0.When importing the image I am
using the unsigned character buffer .After the above operations I am exporting
to the same buffer.Here I am getting the Exception which is 'some instruction
reference at some location ,that memory location could not be read
'.I am getting the error when export to the buffer by using vtkImageExport.Is
there any changes in the buffer values type.I could not understand clearly what
is the output of vtkimageFFT and vtkImageRFFT.Here I am enclosing my code.</DIV>
<DIV> </DIV>
<DIV>
m_dstImage->GrayScale();<BR>
UpdateAllViews(NULL);<BR>
BYTE*
aImgBits=m_dstImage->GetBits();<BR> <BR>
int
xdim=m_srcImage->GetWidth();<BR>
int
ydim=m_srcImage->GetHeight();<BR>
vtkImageImport *importer =
vtkImageImport::New();<BR> importer->SetDataExtent(0,xdim-1
,0,ydim-1 ,0,0 );<BR> importer->SetWholeExtent(0, xdim-1 ,0,ydim
-1,0,0
);<BR> importer->SetDataScalarTypeUnsignedChar();<BR>
importer->SetImportVoidPointer(aImgBits);<BR> <BR> vtkImageFFT
*fft=vtkImageFFT::New();<BR>
fft->SetDimensionality(2);<BR>
fft->SetInput(importer->GetOutput());<BR> <BR> vtkImageButterworthHighPass
*filter=vtkImageButterworthHighPass::New();<BR>
filter->SetInput(fft->GetOutput());<BR> filter->SetOrder(2);<BR> filter->SetXCutOff(0.2);<BR>
filter->SetYCutOff(0.1);<BR> filter->ReleaseDataFlagOff();</DIV>
<DIV> </DIV>
<DIV> vtkImageRFFT
*rfft=vtkImageRFFT::New();<BR>
rfft->SetDimensionality(2);<BR> rfft->SetInput(filter->GetOutput());<BR> <BR> vtkImageExtractComponents
*ecomp=vtkImageExtractComponents
::New();<BR> ecomp->SetInput(rfft->GetOutput());<BR>
ecomp->SetComponents(0);<BR>
<BR>
vtkImageExport *exporter =
vtkImageExport::New();<BR>
exporter->SetInput(ecomp->GetOutput());<BR> exporter->Export(aImgBits);</DIV>
<DIV> </DIV>
<DIV> importer->Delete();<BR> exporter->Delete();<BR> filter->Delete();<BR>
fft->Delete();<BR> rfft->Delete();<BR> UpdateAllViews(NULL,WM_USER_NEWIMAGE);</DIV>
<DIV> </DIV>
<DIV><BR> Thanking You<BR> Chandu
<BR>
<BR> </DIV>
<DIV> </DIV>
<DIV></FONT> </DIV></BODY></HTML>