[ITK] [ITK-users] itk::CastImageFilter causes AccessViolationException

Bradley Lowekamp brad at lowekamp.net
Tue Jul 26 19:09:52 EDT 2016


Hello,

The most common mistake here would be forgetting to call Allocate on your image. Beyond that sharing your code would be helpful. 

Brad

> On Jul 26, 2016, at 1:43 PM, Andrew Harris <aharr8 at uwo.ca> wrote:
> 
> Hello,
> I am attempting to use the CastImageFilter to convert between unsigned char and float image types, and am getting a System.AccessViolationException at runtime.  I have seen reference to this being caused by referring to a pointer that is out of scope, but in this case both the image and the cast filter are delcared in the same method, so I’m not sure how it can be going out of scope.  I can include the header and definition files if that would be helpful.
> --
> 
> AH
> 
> 
> 
> -----------------------------------------------------------------------------------------------
> 
> This email and any attachments thereto may contain private, confidential, and privileged materials for the sole use of the intended recipient. Any reviewing, copying, or distribution of this email (or any attachments thereto) by other than the intended recipient is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently destroy this email and any attachments thereto.
> 
> _____________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160726/6f6ba79e/attachment.html>
-------------- next part --------------
_____________________________________
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


More information about the Community mailing list