Re: [ITK-users] Can I alter the way SliceBySliceImageFilter defines the origin of the internal slices?

hellman <[email protected]>
Newsgroups gmane.comp.lib.itk.user
Message-ID <[email protected]>
I am not sure. In SliceBySliceImageFilter.hxx for ITK 4.12.0, on line 188, it
says:

  // copy the requested region to the internal slice region in
  // dimension order
  unsigned int internal_i = 0;
  for ( unsigned int i = 0; internal_i < InternalImageDimension; ++i,
++internal_i )
    {
    if ( i == this->m_Dimension )
      {
      ++i;
      }
    internalOutputRegion.SetSize( internal_i, requestedSize[i] );
    internalOutputRegion.SetIndex( internal_i, requestedIndex[i] );

    internalInputRegion.SetSize( internal_i,
this->GetInput(0)->GetRequestedRegion().GetSize(i) );
    internalInputRegion.SetIndex( internal_i,
this->GetInput(0)->GetRequestedRegion().GetIndex(i) );

    }

This will copy all indices (except the slicing dimension) of input 0 to
internalInputRegion, which is set as the regions for the internal image
further down. In my case, the 5s get copied here.

I have also stopped in a debugger in ImageToImageFilter (of my
BinaryFunctorImageFilter) where the check that the physical regions overlap
is performed. At this point, both images have the same region index [5, 5],
but one image has origin (0, 0) and the sliced image has origin (1.5, 1.5). 




--
Sent from: http://itk-users.7.n7.nabble.com/
_____________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.