<br>Hi Osc,<br><br>Thanks for providing this additional information.<br><br><br>It would look like the VTK image that you are <br>reading is inconsistent, and end up having a <br>null value of spacing in one of the directions.<br>
<br>Please do the following:<br><br> Test first only the VTK part of the code.<br><br>Disconnect the ITK adaptor and replace it <br>with a vtkMetaImageWriter.<br><br>You will have a VTK pipeline such as:<br><br>vtkImageReader2 ---> vtkMetaImageWriter<br>
<br>save the image using a filename such as<br><br> myImage.mhd<br><br>and post to the list the content of the .mhd<br>header. ( it should contain about ten lines<br>of ASCII text describing the image grid <br>
parameters).<br><br><br> Thanks<br><br><br> Luis<br><br><br>-------------------------------------------<br><div class="gmail_quote">On Tue, Apr 13, 2010 at 10:45 PM, Osc@r Math <span dir="ltr"><<a href="mailto:olguna@cimat.mx">olguna@cimat.mx</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="ES-MX">
<div>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">Hi Luis… </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">Here’s my base code…</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">//Variables
CLASS Private:</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">int bounds[6]; {0,255,0,255,0,63}</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">int bigEnd,//false</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">dataType,
//4</span><span style="font-size: 11pt; font-family: Wingdings; color: rgb(31, 73, 125);" lang="EN-US">à</span><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">FLOAT </span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">header;
//0</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">double xSpacing=1.0,</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> ySpacing=1.0,</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> zSpacing=2.0,</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span><span style="font-size: 11pt; color: rgb(31, 73, 125);">*scalarRange;</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">vtkImageReader2 *fileReader;</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">On Constructor</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">fileReader = vtkImageReader2::New();</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">ReaderFunction(FileName)</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">{</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">fileReader->SetFileName(fileName);</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">fileReader->SetDataExtent(0,bounds[1], 0, bounds[3], 0,
bounds[5]);</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">switch (dataType)</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> {</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> case 0 :</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> fileReader->SetDataScalarTypeToUnsignedChar();</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> break;</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> case 1 :</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> fileReader->SetDataScalarTypeToUnsignedShort();</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> break;</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> case 2 :</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> fileReader->SetDataScalarTypeToShort();</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> break;</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> case 3 :</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> fileReader->SetDataScalarTypeToInt();</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> break;</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> case 4 :</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> fileReader->SetDataScalarTypeToFloat();</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> break;</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> case 5 :</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> fileReader->SetDataScalarTypeToDouble();</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> break;</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> }</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">fileReader->SetHeaderSize(header);</span></p>
<p class="MsoNormal"><b><i><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">fileReader->SetDataSpacing(xSpacing,
ySpacing, zSpacing);</span></i></b></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> fileReader->SetDataByteOrderToLittleEndian();</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">try {</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> fileReader->Update();}</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">catch(...){</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> return false; }</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">scalarRange = fileReader->GetOutput()->GetScalarRange();</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">That’s the reader code, then show data into a vtkBorland
Package, cause i´m compiling in BCB5. Everything is OK.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">The problem starts when connect VTKReader with ITKPIpeline via a
VTKExporter itkVTKImporter</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">Next One is a function that just export VTK data to ITK data.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">template<typename InputPixelType></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">bool VTKtoITK()</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">{</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span><span style="font-size: 11pt; color: rgb(31, 73, 125);">//Definiendo e /*Instanciando*/... para
la tarea de exportacion_VTK/Importacion_ITK</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> //Exportador de VTK</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> vtkImageExport
*vtkExporter=vtkImageExport::New();</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> //Tipo de dato e imagen a leer
sobre el tipo "templado" <InputPixelType></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">typedef
itk::Image<InputPixelType,Dimension> InputImageType; //Dimension=3;</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> //Filtro de importacion ITK</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> typedef
itk::VTKImageImport<InputImageType> ImportImageFilterType;</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> //Importador de ITK</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> ImportImageFilterType::Pointer
itkImageImporter=ImportImageFilterType::New();</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span><span style="font-size: 11pt; color: rgb(31, 73, 125);">//El exportador toma
los datos leidos por el plugin</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">vtkExporter->SetInput(fileReader->GetOutput());</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span><span style="font-size: 11pt; color: rgb(31, 73, 125);">//Se conecta el
importador de ITK</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> ConnectPipelines(vtkExporter, itkImageImporter);</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> <span lang="EN-US">try {</span></span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
itkImageImporter->Update(); }//executes VTKexport</span><span style="font-size: 11pt; font-family: Wingdings; color: rgb(31, 73, 125);">à</span><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">ITK Import</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span><span style="font-size: 11pt; color: rgb(31, 73, 125);">catch (itk::ExceptionObject & exp) {</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> //Algun error
ocurrio en la linea de procesos...</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> INFORME="Falla de
Exportacion"; return false;}</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">Return
true;}</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">template
<typename VTK_Exporter, typename ITK_Importer></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">void ConnectPipelines(VTK_Exporter *exporter, ITK_Importer
importer)</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">{</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
importer->SetUpdateInformationCallback
(exporter->GetUpdateInformationCallback());</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
importer->SetPipelineModifiedCallback
(exporter->GetPipelineModifiedCallback());</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
importer->SetWholeExtentCallback
(exporter->GetWholeExtentCallback());</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
importer->SetSpacingCallback (exporter->GetSpacingCallback());</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
importer->SetOriginCallback
(exporter->GetOriginCallback());</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
importer->SetScalarTypeCallback
(exporter->GetScalarTypeCallback());</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
importer->SetNumberOfComponentsCallback
(exporter->GetNumberOfComponentsCallback());</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
importer->SetPropagateUpdateExtentCallback
(exporter->GetPropagateUpdateExtentCallback());</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
importer->SetUpdateDataCallback
(exporter->GetUpdateDataCallback());</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
importer->SetDataExtentCallback
(exporter->GetDataExtentCallback());</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
importer->SetBufferPointerCallback
(exporter->GetBufferPointerCallback());</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
importer->SetCallbackUserData
(exporter->GetCallbackUserData());</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);">}</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">When ITK
tries to import data, occurs the errors listed before…</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">TNX
by answers…</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">
<p class="MsoNormal"><b><span style="font-size: 10pt;" lang="ES">De:</span></b><span style="font-size: 10pt;" lang="ES"> Luis Ibanez
[mailto:<a href="mailto:luis.ibanez@kitware.com" target="_blank">luis.ibanez@kitware.com</a>] <br>
<b>Enviado el:</b> Sábado, 10 de Abril de 2010 08:54 a.m.<br>
<b>Para:</b> Osc@r Math<br>
<b>CC:</b> <a href="mailto:Insight-users@itk.org" target="_blank">Insight-users@itk.org</a><br>
<b>Asunto:</b> Re: [Insight-users] ~vnl_svd() {} misterious runtime error</span></p>
</div><div><div></div><div class="h5">
<p class="MsoNormal"> </p>
<p class="MsoNormal"><br>
Hi Osc,<br>
<br>
Thanks for posting the details from your debugging session.<br>
<br>
It looks like the "<span style="color: rgb(31, 73, 125);" lang="EN-US">outSpacing"
variable is not </span>initialized correctly.<br>
<br>
In a 3D image, this arrays is expected to have three elements.<br>
<br>
<br>
We may have to go to your original code in order to trace the<br>
problem. Could you post the code ?<br>
<br>
<br>
Any chance that you can compile this with GCC ?<br>
and run Valgrind on it ?<br>
<br>
<br>
That will be an effective way of locating uninitialized variables...<br>
<br>
<br>
Regards<br>
<br>
<br>
Luis<br>
<br>
<br>
--------------------------------------------------------------------------</p>
<div>
<p class="MsoNormal">On Fri, Apr 9, 2010 at 9:58 PM, Osc@r Math <<a href="mailto:olguna@cimat.mx" target="_blank">olguna@cimat.mx</a>> wrote:</p>
<div>
<div>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Again Myself…</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">I´ve been debugging and find that error starts
on </span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">Command</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="color: rgb(31, 73, 125);" lang="EN-US">output->SetSpacing(outSpacing);</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">Function</span></p>
<p class="MsoNormal" style="margin-left: 35.4pt; text-indent: 35.4pt;"><span style="color: rgb(31, 73, 125);" lang="EN-US">template
<typename TOutputImage></span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="color: rgb(31, 73, 125);" lang="EN-US">void
VTKImageImport<TOutputImage>::GenerateOutputInformation()</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">File</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">
itkVTKImageImport.txx</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">Debugging information</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">
outSpacing is generated like:</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">
typename TOutputImage::SpacingType outSpacing;</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="color: rgb(31, 73, 125);" lang="EN-US">This is the result
by traspase inSpacing data</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">
outSpacing: { ????, ????, ????, { 1, 1, 2 } };
</span></p>
<p class="MsoNormal" style="margin-left: 70.8pt; text-indent: 35.4pt;"><span style="color: rgb(31, 73, 125);" lang="EN-US">
{WSH?,WSH?,WSH?, { xSpacing,ySpacing,zSpacing } }.</span></p>
<p class="MsoNormal" style="margin-left: 70.8pt;"><span style="color: rgb(31, 73, 125);" lang="EN-US">
WSH?:=What Suppose to be here?</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">Those data passes to</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="color: rgb(31, 73, 125);" lang="EN-US">if(
this->m_Spacing != spacing ) HERE m_Spacing=</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="color: rgb(31, 73, 125);" lang="EN-US"> {</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="color: rgb(31, 73, 125);" lang="EN-US">
this->m_Spacing = spacing;</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="color: rgb(31, 73, 125);" lang="EN-US">
this->ComputeIndexToPhysicalPointMatrices();</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="color: rgb(31, 73, 125);" lang="EN-US">
this->Modified();</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="color: rgb(31, 73, 125);" lang="EN-US"> }</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">Command:
this->ComputeIndexToPhysicalPointMatrices();</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">Function:
Void ImageBase<VImageDimension>::SetSpacing(const SpacingType &
spacing )</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">FILE:
itkImageBase.txx</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">Var
Keeps: spacing: { ????, ????,
????, { 1, 1, 2 } };</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">Command:
this->Superclass::ComputeIndexToPhysicalPointMatrices();</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">Function:
void Image<TPixel,
VImageDimension>::ComputeIndexToPhysicalPointMatrices()</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">FILE:
itkImage.txx</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">Var keeps:
m_Spacing: { ????, ????, ????, { 1, 1, 2 } }</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">Command:
this->m_PhysicalPointToIndex = m_IndexToPhysicalPoint.GetInverse();</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">Function:
void ImageBase<VImageDimension>::ComputeIndexToPhysicalPointMatrices()</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">FILE:
itkImageBase.txx</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">Var
keeps: m_Spacing: { ????,
????, ????, { 1, 1, 2 } }</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">Command:
vnl_matrix<T> temp = vnl_matrix_inverse<T>( m_Matrix );</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">Function:
inline vnl_matrix_fixed<T,NColumns,NRows> GetInverse( void ) const</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">FILE:
itkMatrix.h</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">Data
keeps: m_Matrix: { { { 1, 0, 0 }, { 0, 1, 0
}, { 0, 0, 2 } } }</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">Command & Function:</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">operator const vnl_matrix_ref<T>() const
{ return vnl_matrix_ref<T>( num_rows, num_cols,
const_cast<T*>(data_block()) ); }</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">*data_block: E2335 Overloaded
'vnl_matrix_fixed<double, 3, 3>::data_block' ambiguous in this context</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">Command & Function:</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt;"><span style="color: rgb(31, 73, 125);" lang="EN-US">T const* data_block
() const { return data_[0]; }</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">DATA: *data_: { 1, 0, 0 }, { 0, 1, 0 }, { 0,
0, 2 }</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US">And so on, but I couldn´t find the
error…</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<div>
<div style="border-style: solid none none; border-color: -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">
<p class="MsoNormal"><b><span style="font-size: 10pt;">De:</span></b><span style="font-size: 10pt;"> <a href="mailto:insight-users-bounces@itk.org" target="_blank">insight-users-bounces@itk.org</a>
[mailto:<a href="mailto:insight-users-bounces@itk.org" target="_blank">insight-users-bounces@itk.org</a>]
<b>En nombre de </b>Osc@r Math<br>
<b>Envia</b></span><b><span style="font-size: 10pt;" lang="ES">do el:</span></b><span style="font-size: 10pt;" lang="ES"> Viernes, 09 de Abril de 2010 07:09 p.m.<br>
<b>Para:</b> <a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a><br>
<b>Asunto:</b> [Insight-users] ~vnl_svd() {} misterious runtime error</span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span lang="ES-TRAD">Hi All…!!!</span></p>
<p class="MsoNormal"><span lang="ES-TRAD"> </span></p>
<p class="MsoNormal"><span lang="EN-US">Recently I took back an ITK-VTK-BCB5 project, but as I know ITK
& VTK improves, I decided to update those toolkits (by the way, congrats!!!
For this big effort).</span></p>
<p class="MsoNormal"><span lang="EN-US">Actually, compiled ITK 3.16 & VTK 5.4.2 Releases</span></p>
<p class="MsoNormal"><span lang="EN-US">BCB 5 with Borland C++ compiler 5.5.</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">Today I get a runtime error that it’s pretty mysterious
(at least for me)…</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">The application reads a 3D image by VTK reader, show it by VTK
renderization, send it to ITK pipeline, calculates partial derivatives &
magnitude gradient, then save Dx, Dy, Dz & |V|.</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">The image has a spacing, an origin, among others…</span></p>
<p class="MsoNormal"><span lang="EN-US">When spacing is 1.0, 1.0, 1.0 there’s no problem, everything
works fine,</span></p>
<p class="MsoNormal"><span lang="EN-US">but if spacing changes anyone of those dimensions, application
crashes.</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">The application is capable to read image, show it, but when tries to
connect VTKReader to ITKCaster (is first action with ITK) send an
“Abnormal Program Termination”</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">In Debug mode I realize that crashes trying to execute </span></p>
<p class="MsoNormal"><span lang="EN-US">~vnl_svd() {}</span></p>
<p class="MsoNormal"><span lang="EN-US">In vnl_svd.h file and mark an error like:</span></p>
<p class="MsoNormal"><span lang="EN-US">… Access violation at address XXXX …</span></p>
<p class="MsoNormal"><span lang="EN-US">If continue debugging, crashes too in:</span></p>
<p class="MsoNormal"><span lang="EN-US">~vnl_diag_matrix() {}</span></p>
<p class="MsoNormal"><span lang="EN-US">In vnl_diag_matrix.h file with similar error</span></p>
<p class="MsoNormal"><span lang="EN-US">And finally throws an “Abnormal Program
Termination”…</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">I didn´t know why tries to invert a matrix that contains</span></p>
<p class="MsoNormal"><span lang="EN-US">xSpacing
0
0</span></p>
<p class="MsoNormal"><span lang="EN-US"> 0
ySpacing
0</span></p>
<p class="MsoNormal"><span lang="EN-US"> 0
0
zSpacing</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">¡¡¡ Someone could help me !!!</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">TNX in advance</span></p>
<p class="MsoNormal"><br>
<br>
__________ Información de ESET Smart Security, versión de la base de firmas de
virus 5014 (20100409) __________<br>
<br>
ESET Smart Security ha comprobado este mensaje.<br>
<br>
<a href="http://www.eset.com" target="_blank">http://www.eset.com</a><br>
<br>
<br>
__________ Información de ESET Smart Security, versión de la base de firmas de
virus 5014 (20100409) __________<br>
<br>
ESET Smart Security ha comprobado este mensaje.<br>
<br>
<a href="http://www.eset.com" target="_blank">http://www.eset.com</a></p>
</div>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><br>
<br>
__________ Información de ESET Smart Security, versión de la base de firmas de
virus 5014 (20100409) __________<br>
<br>
ESET Smart Security ha comprobado este mensaje.<br>
<br>
<a href="http://www.eset.com" target="_blank">http://www.eset.com</a></p>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom: 12pt;"><br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a></p>
</div>
<p class="MsoNormal"> </p>
</div></div></div>
<br><br>__________ Información de ESET Smart Security, versión de la base de firmas de virus 5026 (20100413) __________<div class="im"><br><br>ESET Smart Security ha comprobado este mensaje.<br><br><a href="http://www.eset.com" target="_blank">http://www.eset.com</a><br>
</div></div>
</blockquote></div><br>