[Insight-developers] handling different sized inputs & outputs in a filter

Bradley Lowekamp blowekamp at mail.nih.gov
Mon Mar 16 18:20:00 EDT 2009


Which class is throwing that exception? The ImageFileWriter now  
sometimes throws that exception when it gets a 0 sized region... I  
have been meaning to look into that one. For example if you forget to  
set the input to a filter, you can get this exception... not to helpful.

Also I wrote a very useful test filter in Testing/Code/IO/ 
itkPipelineMonitorImageFilter.h. You can put that before or after your  
filter to peak into how the regions are being propagated, it has  
helped me a lot with the debugging of streaming. Just turn on it's  
debugging flag and it will start giving lots of info about the pipeline.

Brad


On Mar 16, 2009, at 5:40 PM, kent williams wrote:

> I'm getting confused by how exactly to deal with changing the
> itk::WarpImageFilter to allow for output image size other than the
> deformation field size.
>
> The desired behavior -- I think would be this:
>
> 1. The input image can be any size and resolution.
> 2. The deformation field can be any size, but ideally should be at  
> as large
> in volume (3D) or area (2D) as the output volume/area.
> 3. The output volume can be any size and resolution. Points in the  
> input
> volume that warp outside the output volume are clipped, points in  
> the output
> volume outside the deformation field volume are set to background  
> value.
>
> In other words interpolators are used both to get the value out of  
> the input
> volume, and displacements from the deformation field, and the filter  
> always
> asks for a value at a physical point in both cases.
>
> I thought I had this covered, but I'm getting this abort:
>
> terminate called after throwing an instance of
> 'itk::InvalidRequestedRegionError'
>  what():  /scratch/kent/itktest/Insight/Code/Common/ 
> itkDataObject.cxx:397:
> Requested region is (at least partially) outside the largest possible
> region.
>
> So I'm trying to figure out what I'm getting wrong. Any suggestions?
>
>
>
> Notice: This UI Health Care e-mail (including attachments) is  
> covered by the Electronic Communications Privacy Act, 18 U.S.C.  
> 2510-2521, is confidential and may be legally privileged.  If you  
> are not the intended recipient, you are hereby notified that any  
> retention, dissemination, distribution, or copying of this  
> communication is strictly prohibited.  Please reply to the sender  
> that you have received the message in error, then delete it.  Thank  
> you.
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> 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://www.itk.org/mailman/listinfo/insight-developers



More information about the Insight-developers mailing list