MantisBT - ITK | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0008058 | ITK | public | 2008-11-07 11:26 | 2009-03-25 09:07 | ||||||
Reporter | Hans Johnson | |||||||||
Assigned To | kentwilliams | |||||||||
Priority | normal | Severity | major | Reproducibility | always | |||||
Status | closed | Resolution | open | |||||||
Platform | OS | OS Version | ||||||||
Product Version | ITK-3-8 | |||||||||
Target Version | Fixed in Version | |||||||||
Resolution Date | ||||||||||
Sprint | ||||||||||
Sprint Status | ||||||||||
Summary | 0008058: Output Image directions are not set consistently from filters | |||||||||
Description | This is not really a bug with ITK_IMAGE_BEHAVES_AS_ORIENTED_IMAGE, but applications that previously worked because the orientation was ignored may now start to fail when this flag is turned on. I discovered several bugs when ITK_IMAGE_BEHAVES_AS_ORIENTED_IMAGE is turned on, and images with different directions are used. I'm working on a patch right now, but it does touch many many files. So far my tests have shown that regression tests pass both with or without setting the output directions. The problem showed up when attempting to register images that have different orientations, spacing's, size, and origins. I think that our test data is too uniformly defined to catch these problems. ======================================================= grep -A 2 -B 2 "Set.*Spacing.*Get.*Spacing" Insight/Code/*/* > ReviewList From this I look for patterns like the following: Code/Algorithms/itkBayesianClassifierImageFilter.txx- this->GetOutput()->SetRegions( membershipImage->GetBufferedRegion() ); Code/Algorithms/itkBayesianClassifierImageFilter.txx: this->GetOutput()->SetSpacing( membershipImage->GetSpacing() ); Code/Algorithms/itkBayesianClassifierImageFilter.txx- this->GetOutput()->SetOrigin( membershipImage->GetOrigin() ); Code/Algorithms/itkBayesianClassifierImageFilter.txx- this->GetOutput()->Allocate(); NOTICE: The output of this filter does not set the Direction!!!! this->GetOutput()->SetDirection( membershipImage->GetDirection() ); ======================================================= Unfortunately this seems like a very common problem throughout ITK. It is my assumption that most filters that: a) take input image, b) do something to the intensity values, c) generate and output image; will behave in such a way that the output image has the same origin, spacing, size, AND direction as the input image. Filters that: a)take an input image, b) take parameters for desired output physical space defintion, c) generate the new output image; must have options for setting Spacing, Origin, AND Direction. Experimental build: http://www.cdash.org/CDash/buildSummary.php?buildid=210257 [^] I hope to have the code committed and bugs reported in about 1 hour. Hans | |||||||||
Steps To Reproduce | ||||||||||
Additional Information | Current list of affected files being addressed: M Code/Algorithms/itkBayesianClassifierImageFilter.txx M Code/Algorithms/itkCollidingFrontsImageFilter.txx M Code/Algorithms/itkFEMRegistrationFilter.txx M Code/Algorithms/itkFastMarchingImageFilter.h M Code/Algorithms/itkFastMarchingImageFilter.txx M Code/Algorithms/itkFastSymmetricForcesDemonsRegistrationFunction.txx M Code/Algorithms/itkMultiResolutionPDEDeformableRegistration.txx M Code/Algorithms/itkPDEDeformableRegistrationFilter.txx M Code/BasicFilters/itkHoughTransform2DCirclesImageFilter.txx M Code/BasicFilters/itkHoughTransform2DLinesImageFilter.txx M Code/BasicFilters/itkIterativeInverseDeformationFieldImageFilter.txx M Code/BasicFilters/itkPointSetToImageFilter.h M Code/BasicFilters/itkPointSetToImageFilter.txx M Code/BasicFilters/itkPolylineMask2DImageFilter.txx M Code/BasicFilters/itkPolylineMaskImageFilter.txx M Code/BasicFilters/itkResampleImageFilter.txx M Code/Common/itkBSplineDeformableTransform.txx M Code/Common/itkDenseFiniteDifferenceImageFilter.txx M Code/Patented/itkVectorFuzzyConnectednessImageFilter.txx M Code/Review/itkBSplineScatteredDataPointSetToImageFilter.txx M Code/Review/itkDiffeomorphicDemonsRegistrationFilter.txx M Code/Review/itkESMDemonsRegistrationFunction.h M Code/Review/itkESMDemonsRegistrationFunction.txx M Code/Review/itkExponentialDeformationFieldImageFilter.txx M Code/Review/itkFastSymmetricForcesDemonsRegistrationFilter.txx M Code/Review/itkOptResampleImageFilter.txx | |||||||||
Tags | No tags attached. | |||||||||
Relationships |
| |||||||||
Attached Files | ||||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2008-11-07 11:26 | Hans Johnson | New Issue | ||||||||
2009-03-10 20:06 | Hans Johnson | Status | new => assigned | |||||||
2009-03-10 20:06 | Hans Johnson | Assigned To | => kentwilliams | |||||||
2009-03-11 18:03 | kentwilliams | Note Added: 0015661 | ||||||||
2009-03-12 16:44 | kentwilliams | Note Added: 0015676 | ||||||||
2009-03-25 09:07 | Hans Johnson | Status | assigned => closed | |||||||
2009-03-26 17:29 | kentwilliams | Relationship added | related to 0008680 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|