[ITK] itk error: Inputs do not occupy the same physical space!

Vishwanathan Shreyas shreyas122011 at gmail.com
Wed Jan 25 00:57:21 EST 2017


Also if you look at my program, the mask is derived from the image itself,
so highly unlikely that it will occupy a different space.
The error message shown is just for 1 engine(core). All the engines give
this error message.

On Wed, Jan 25, 2017 at 11:25 AM, Vishwanathan Shreyas <
shreyas122011 at gmail.com> wrote:

>
> Hi Brad,
>
> "map_sync" here uses heavyweight independent processes. Also, the filter
> fails on random files every time I run it. I ran it on a single core but it
> was taking about 13 min for processing a single file, so I did not waste
> time on running it as a single threaded function for any more files.
> The platform I'm using is Windows Server 2012 standard.
> Also, there is no problem with the data as I ran a script to check it.
>
> Thanks,
> Shreyas
>
> On Tue, Jan 24, 2017 at 9:05 PM, Lowekamp, Bradley (NIH/NLM/LHC) [C] <
> blowekamp at mail.nih.gov> wrote:
>
>> Hello,
>>
>> I am not familiar with “map_sync”. Is it from this class:
>> https://ipython.org/ipython-doc/3/api/generated/IPython.para
>> llel.client.view.html
>> Does it use threads or heavy weight processes?
>>
>> If you run the filter with just the single threaded map function does it
>> fail the same way? Which file does it fail on? If you just run it on that
>> file does it still fail?
>>
>> We need to narrow down the problem to determine if it’s related to the
>> way you are executing, or if perhaps N4 has a problem with your data.
>> Perhaps it is some type of degenerate case, or there is a bug in the filter.
>>
>> Thanks,
>> Brad
>>
>> On Jan 24, 2017, at 12:44 AM, Vishwanathan Shreyas <
>> shreyas122011 at gmail.com> wrote:
>>
>> SimpleITK on python gives me a weird bug, after running successfully a
>> few times. I'm using the MICCAI BRATS database. Here's my code:
>>
>> def N43D(fl):
>>
>>     im = SimpleITK.ReadImage(fl)
>>
>>     msk = SimpleITK.BinaryThreshold(im, 0, 0)
>>
>>     msk = SimpleITK.BinaryNot(msk)
>>
>>     msk = SimpleITK.Cast(msk, SimpleITK.sitkUInt8)
>>
>>     im = SimpleITK.Cast(im, SimpleITK.sitkFloat32)
>>
>>     im_n4 = SimpleITK.N4BiasFieldCorrection(im, msk)
>>
>>     SimpleITK.WriteImage(im_n4, os.path.splitext(fl)[0]+'_n4.mha', useCompression=True)
>>
>>
>>
>> Also, I'm using multiple cores for a list of files:
>>
>> dview.map_sync(N43D, fl)
>>
>>
>>
>> The program runs fine for about 40 files. Then I get this error on all my
>> engines:
>>
>> [0:apply]:
>> RuntimeErrorTraceback (most recent call last)<string> in <module>()<ipython-input-56-03a02a993653> in N43D(fl)
>> c:\users\shreyas_v\anaconda2\lib\site-packages\SimpleITK\SimpleITK.pyc in N4BiasFieldCorrection(*args, **kwargs)
>>   43368
>>   43369     """> 43370     return _SimpleITK.N4BiasFieldCorrection(*args, **kwargs)  43371 class NaryAddImageFilter(ImageFilter_3):  43372     """RuntimeError: Exception thrown in SimpleITK N4BiasFieldCorrection: c:\d\vs9-pkg\simpleitk-build\itk\modules\core\common\include\itkImageToImageFilter.hxx:248:
>> itk::ERROR: SubtractImageFilter(00000000065D8220): Inputs do not occupy the same physical space!
>> InputImage Origin: [0.0000000e+000, -2.3900000e+002, 0.0000000e+000], InputImage_1 Origin: [-5.9750000e+001, -5.9750000e+001, -3.8500000e+001]
>>     Tolerance: 1.0000000e-006
>> InputImage Spacing: [1.0000000e+000, 1.0000000e+000, 1.0000000e+000], InputImage_1 Spacing: [5.9750000e+001, 5.9750000e+001, 3.8500000e+001]
>>     Tolerance: 1.0000000e-006
>>
>>
>> Has anyone faced this issue before?
>>
>> Regards,
>> Shreyas
>> _______________________________________________
>> Community mailing list
>> Community at itk.org
>> http://public.kitware.com/mailman/listinfo/community
>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20170125/f6a52ac6/attachment-0001.html>


More information about the Community mailing list