[ITK-users] Imagebase:: A spacing of 0 is not allowed.
Bradley Lowekamp
blowekamp at mail.nih.gov
Sat Jun 14 13:09:25 EDT 2014
When you catch the exception print out the inputs to the filter. Is the Input image as expected?
On Jun 14, 2014, at 1:00 PM, UJJWAL aryan <meetukme at gmail.com> wrote:
> Hi,
>
> I figured out that the problem is happening in the final of the code where the ImageFileWriter is invoked. As I do writer->Update(), it throws an exception. The error is as follows :
>
> itk::ExceptionObject (0x14f1a60)
> Location: "void itk::ImageBase<VImageDimension>::ComputeIndexToPhysicalPointMatrices() [with unsigned int VImageDimension = 2u]"
> File: /usr/local/include/ITK-4.5/itkImageBase.hxx
> Line: 184
> Description: itk::ERROR: Image(0x14f2ab0): A spacing of 0 is not allowed: Spacing is [0, 0]
>
> I do not understand that why this error is coming. Would I need to set the physical spacing and everything manually ?
>
>
> On Sat, Jun 14, 2014 at 8:47 PM, Bradley Lowekamp <blowekamp at mail.nih.gov> wrote:
> Hello,
>
> I didn't a quick look at your code and didn't see any thing obvious.
>
> What needs to be done is to figure out which filter is misbehaving. To do this place a try/catch around the update for a filters. Start with the first suspicions filter in your pipeline then test. The idea is to try to isolate the section of your pipeline causing the trouble. Once you figure out which part is problematic you can drill down and examine the filter more closely.
>
> Brad
>
> On Jun 14, 2014, at 9:42 AM, UJJWAL aryan <meetukme at gmail.com> wrote:
>
>> Hi,
>>
>> I am attaching a small snippet of a code I was writing. However on running the code I get the following error :
>>
>> terminate called after throwing an instance of 'itk::ExceptionObject'
>> what(): /usr/local/include/ITK-4.5/itkImageBase.hxx:184:
>> itk::ERROR: Image(0x189eab0): A spacing of 0 is not allowed: Spacing is [0, 0]
>> Aborted (core dumped)
>>
>> Could someone please point out what am I missing here ?
>>
>> --
>> Ujjwal
>> IIIT Hyderabad
>> Mob - 8142265628
>> ujjwal at research.iiit.ac.in
>>
>>
>> <od-pre.cxx>_____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.php
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/insight-users
>
>
>
>
> --
> Ujjwal
> IIIT Hyderabad
> Mob - 8142265628
> ujjwal at research.iiit.ac.in
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20140614/82d4b196/attachment.html>
More information about the Insight-users
mailing list