Page MenuHomePhabricator

ImageCropper and 4D Data Error
Closed, ResolvedPublic


Steps to reproduce:

  • Load Image (E130-Daten\3M3 Demodaten\Organsegmentierung (Daniel M.)\ DataSet_Lung_4D.pic),
  • create bounding object,
  • change bounding object crop

Error Cropping not possible!
The Cropping filter could not process because of: no overlap.

Was tested on Windows 7

Revisions and Commits


Event Timeline

kislinsk lowered the priority of this task from High to Normal.Jul 21 2017, 11:07 AM
kislinsk added a subscriber: kislinsk.

To avoid merge conflicts, please make sure to use the latest master branch as there were very recent changes in this part of the ImageCropper in terms of T23099: Treat warnings by default as errors in plugins.

laha added a project: Restricted Project.

In itkImageRegion.hxx method:

bool ImageRegion< VImageDimension > ::Crop(const Self & region)

works fine for the first three dimensions, then cropPossible is set false for the fourth dimension (see code below):

for ( i = 0; i < VImageDimension && cropPossible; i++ )
    // Is left edge of current region to the right of the right edge
    // of the region to crop with? (if so, we cannot crop)
    if ( m_Index[i] >= region.GetIndex()[i]
         + static_cast< OffsetValueType >( region.GetSize()[i] ) )
      cropPossible = false;

Cropped Image should be created for singleTimeStep or for allTimeSteps in 3D.