<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I try to estimate the curvature information of an object but I failed. In run time I get vtkOutpouWindow saying there is an error in the file vtkDemandDrivenPipeline.cxx.<o:p></o:p></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">My input volume is an itk image that I convert to vtk image in order to estimate the curvature.<o:p></o:p></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I paste my code here. Any help is appreciated. <o:p></o:p></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Thank you. <o:p></o:p></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Regards <o:p></o:p></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Martine<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3> </FONT></o:p></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3> </FONT></o:p></DIV>
<DIV>
<DIV><FONT color=#0000ff size=2><FONT color=#0000ff size=2>#include</FONT></FONT><FONT size=2> </FONT><FONT color=#800000 size=2><FONT color=#800000 size=2>"itkImage.h"</DIV></DIV></FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>
<DIV>#include</FONT></FONT><FONT size=2> </FONT><FONT color=#800000 size=2><FONT color=#800000 size=2>"itkImageFileReader.h"</DIV></FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>
<DIV>#include</FONT></FONT><FONT size=2> </FONT><FONT color=#800000 size=2><FONT color=#800000 size=2>"itkImageFileWriter.h"</DIV></FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>
<DIV>#include</FONT></FONT><FONT size=2> </FONT><FONT color=#800000 size=2><FONT color=#800000 size=2>"itkVTKImageExport.h"</DIV></FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>
<DIV>#include</FONT></FONT><FONT size=2> </FONT><FONT color=#800000 size=2><FONT color=#800000 size=2>"itkVTKImageImport.h"</DIV></FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>
<DIV>#include</FONT></FONT><FONT size=2> </FONT><FONT color=#800000 size=2><FONT color=#800000 size=2>"vtkImageData.h"</FONT></FONT><FONT size=2> </DIV></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>
<DIV>#include</FONT></FONT><FONT size=2> </FONT><FONT color=#800000 size=2><FONT color=#800000 size=2>"vtkImageImport.h"</DIV></FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>
<DIV>#include</FONT></FONT><FONT size=2> </FONT><FONT color=#800000 size=2><FONT color=#800000 size=2>"vtkImageExport.h"</DIV></FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>
<DIV>#include</FONT></FONT><FONT size=2> </FONT><FONT color=#800000 size=2><FONT color=#800000 size=2>"vtkCurvatures.h"</DIV>
<DIV> </DIV></FONT></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>
<DIV>// This function will connect the given itk::VTKImageExport filter to the given vtkImageImport filter.</DIV></FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>
<DIV>template</FONT></FONT><FONT size=2> <</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>typename</FONT></FONT><FONT size=2> ITK_Exporter, </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>typename</FONT></FONT><FONT size=2> VTK_Importer></DIV></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>
<DIV>void</FONT></FONT><FONT size=2> ConnectPipelines(ITK_Exporter exporter, VTK_Importer* importer)</DIV>
<DIV>{</DIV>
<DIV>importer->SetUpdateInformationCallback(exporter->GetUpdateInformationCallback());</DIV>
<DIV>importer->SetPipelineModifiedCallback(exporter->GetPipelineModifiedCallback());</DIV>
<DIV>importer->SetWholeExtentCallback(exporter->GetWholeExtentCallback());</DIV>
<DIV>importer->SetSpacingCallback(exporter->GetSpacingCallback());</DIV>
<DIV>importer->SetOriginCallback(exporter->GetOriginCallback());</DIV>
<DIV>importer->SetScalarTypeCallback(exporter->GetScalarTypeCallback());</DIV>
<DIV>importer->SetNumberOfComponentsCallback(exporter->GetNumberOfComponentsCallback());</DIV>
<DIV>importer->SetPropagateUpdateExtentCallback(exporter->GetPropagateUpdateExtentCallback());</DIV>
<DIV>importer->SetUpdateDataCallback(exporter->GetUpdateDataCallback());</DIV>
<DIV>importer->SetDataExtentCallback(exporter->GetDataExtentCallback());</DIV>
<DIV>importer->SetBufferPointerCallback(exporter->GetBufferPointerCallback());</DIV>
<DIV>importer->SetCallbackUserData(exporter->GetCallbackUserData());</DIV>
<DIV>}</DIV></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>
<DIV>int</FONT></FONT><FONT size=2> main()</DIV>
<DIV>{ </DIV>
<DIV></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>typedef</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>float</FONT></FONT><FONT size=2> PixelType; </DIV>
<DIV></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>const</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>unsigned</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>int</FONT></FONT><FONT size=2> Dimension = 3; </DIV>
<DIV></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>typedef</FONT></FONT><FONT size=2> itk::Image< PixelType, Dimension > ImageType;</DIV>
<DIV></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>typedef</FONT></FONT><FONT size=2> itk::ImageFileReader< ImageType > ReaderType;</DIV>
<DIV></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>typedef</FONT></FONT><FONT size=2> itk::ImageFileWriter <ImageType> WriterType;</DIV>
<DIV>ReaderType::Pointer reader = ReaderType::New(); </DIV>
<DIV>WriterType::Pointer writer = WriterType::New();</DIV>
<DIV></DIV>
<DIV>reader->SetFileName(</FONT><FONT color=#800000 size=2><FONT color=#800000 size=2>"C:/work/MyImages/MyObject.hdr"</FONT></FONT><FONT size=2>); </DIV>
<DIV></DIV>
<DIV></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// convert itk to vtk image type</DIV></FONT></FONT><FONT size=2>
<DIV></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>typedef</FONT></FONT><FONT size=2> itk::VTKImageExport< ImageType > ExportFilterType;</DIV>
<DIV>ExportFilterType::Pointer itkExporter = ExportFilterType::New(); </DIV>
<DIV>itkExporter->SetInput( reader->GetOutput() ); </DIV>
<DIV></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// Create the vtkImageImport and connect it to the itk::VTKImageExport instance.</DIV></FONT></FONT><FONT size=2>
<DIV>vtkImageImport* vtkImporter = vtkImageImport::New(); </DIV>
<DIV>ConnectPipelines(itkExporter, vtkImporter);</DIV>
<DIV></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// estimate the curvature mean</DIV></FONT></FONT><FONT size=2>
<DIV>vtkCurvatures* myCurvatures= vtkCurvatures::New();</DIV>
<DIV>myCurvatures->SetCurvatureTypeToGaussian();</DIV>
<DIV>myCurvatures->SetInput(vtkImporter->GetOutput());</DIV>
<DIV>myCurvatures->Update();</DIV>
<DIV>std::cout << </FONT><FONT color=#800000 size=2><FONT color=#800000 size=2>"end of the code !"</FONT></FONT><FONT size=2> << std::endl;</DIV>
<DIV>std::cin.get();</DIV>
<DIV></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>return</FONT></FONT><FONT size=2> 0;</DIV>
<DIV>} </DIV></FONT></td></tr></table><br>