[Insight-users] Problem with offset calculation in VOI

Mikhail Kirillov kolorotur at gmail.com
Wed Apr 23 03:10:13 EDT 2008


Hi Luis,
First of all, thank you for showing interest in my problem!

I'm using ITK 3.4.0 (newest release 3.6.0 is being compiled as I write
this).

As I mentioned in my original post, I've tried using itkExtractImageFilter
and itkCropImageFilter instead of vtkExtractVOI, but I still get the same
error.
If I don't apply any segmentation, and just extract VOI, pipeline it to ITK,
then immediately pipeline it back to VTK (without passing it through any
filters in between), and then try to render it using Ray Casting, everything
works fine. Besides, when I Print(cout) the image after each connection, all
the values are 100% consistent.

Back to your request.

1. Done :)
2. I've tried to remove all filters and some of the filters in all possible
combinations (likely there are only 3 of them), and I noticed that as soon
as I remove itkThresholdSegmentationLevelSetImageFilter from the pipeline, I
don't get the error message anymore. Unfortunately, I don't get any
segmentation either :(
3. Done
4. Done

I've modified the code as you requested, and this is the output I get (when
not removing the threshold segmentation filter and thus getting the
exception):

// Requested region
*ImageRegion (030BB284)
  Dimension: 3
  Index: [0, 0, 0]
  Size: [351, 202, 2]*
**
// Largest possible region
*ImageRegion (030BB268)
  Dimension: 3
  Index: [153, 171, 0]
  Size: [351, 202, 2]*
**
It seems to me that itkThresholdSegmentationLevelSetImageFilter somehow
shifts the index of the region's origin to [0,0,0] on a global space, and
therefore tries to access something that is outside of the region.
If I try to extract the whole slice (say XY plane), it works fine. But I
need to extract sub-volume.
Also, if I select a region close enough to the origin of the volume, and set
seed pixel to the center of the selected region, I still get the error, but
I also get some segmentation results that appear close to the side of the
region (not in the center).

Is it possible to save extracted region as a completely separate instance of
itk::Image? With it's origin being defined at index = [0,0,0].
I've tried using itkImadeDuplicator class, but it copies the index
information as well.
Actually, after extracting the VOI, I don't really need the rest of the
data.

Kind regards,
Mikhail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080423/209c485d/attachment-0001.htm>


More information about the Insight-users mailing list