[Insight-developers] New PhysicalImage[Adaptor] class

Jisung Kim bahrahm@yahoo.com
Mon, 5 Mar 2001 08:47:45 -0800 (PST)


 Hello. 

I'm Jisung Kim and working at CADD Lab at UNC-CH. 
I just made some changes to introduce the new
PhysicalImage class and
PhysicalImageAdaptor class.  

SUMMARY
  1. moved all space and origin related functions,
member variables,
     and typedefs from ImageBase, Image, &
ImageAdaptor classes to
     PhysicalImage & PhysicalImageAdaptor classes.

  2. added PhysicalImage & PhysicalImageAdaptor class
files to
     Insight/Code/Common directory.

  3. changed some test programs (see CHANGES DETAIL):
  
  4. deleted all space and origin related functions
from
     itkImportImageFilter (in
Insight/Code/BasicFilters/) class, and
     created itkImportPhysicalImageFilter with the
space and origin
     related functions. (I just read through the
original class and
     deleted those functions. So you might get some
run-time error. IF
     YOU KNOW POSSIBLE RUNTIME ERRORS WITH THIS
MODIFICATIONS, please
     let me know.)
  
  5. changed the internal image type definition in the
     ImageMomentsCalculator class from Image to
PhysicalImage. (It
     seems that the origin and spacing are integral
parts of the
     class. So, it would be nice to change the name of
the class to
     PhysicalImageMomentsCalculator. I will ask the
person who is in
     charge of maintaing CVS repository to rename the
class and make
     appropriate changes.) 

POSSIBLE PROBLEMS & SUGGESTIONS 

  1. Compile error in your own code (error messages
complain about
     [Set|Get][Origin|Spacing] functions)

     -> It might be caused by using
[Set|Get][Origin|Spacing]()
     functions of Image class. Use PhysicalImage class
instead of Image
     class. same for ImageAdaptor class.  

  2. Compile time error in Insight toolkit (error
messages complain about
     [Set|Get][Origin|Spacing] functions) 

     ->It might be caused by using ImportImageFilter
with Origin or
       Spacing stuff. Use ImportPhysicalImageFilter or
class with
       PhysicalImage class.

  3. Runtime error with ImportImageFilter class
     
     ->As I mentioned in SUMMARY #4, it might be
causes by the
       modification in both classes. please email me.

CHANGES DETAIL
  * replaced Image class with PhysicalImage class
    o
Insight/Testing/Code/Common/itkAffineTransform.cxx
    o
Insight/Testing/Code/Common/itkImageIteratorTest.cxx
    o Insight/Testing/Code/Common/itkIteratorTests.cxx
    o
Insight/Testing/Code/Common/itkPixelAcessTest.cxx
    o
Insight/Testing/Code/Common/itkBasicArchitectureTest.cxx
    o
Insight/Testing/Code/BasicFilters/itkCyclicReference.cxx
    o
Insight/Testing/Code/BasicFilters/itkShrinkImageTest.cxx
    o
Insight/Testing/Code/BasicFilters/itkThresholdImageFilterTest.cxx
    o
Insight/Testing/Code/Algorithms/itkCurvatureFlowTest.cxx
    o
Insight/Testing/Code/Algorithms/itkInterpolateTest.cxx
    o
Insight/Testing/Code/Algorithms/itkPrincipalAxesResampler.cxx
    o
Insight/Testing/Code/Algorithms/itkImageMomentsTest.cxx
 
  
  * also replaced ImageAdaptor class with
PhysicalImageAdaptor class
    o
Insight/Testing/Code/BasicFilters/itkImageAdaptorPipelineTest.cxx
  
  * special cases (see summary #4)
    o
Insight/Testing/Code/BasicFilters/itkImportImageTest.cxx
      - replaced Image class with PhysicalImage and
ImportImageFilter

Thank you,

     


=====
Jisung Kim
bahrahm@yahoo.com
106 Mason Farm Rd.
129 Radiology Research Lab., CB# 7515
Univ. of North Carolina at Chapel Hill
Chapel Hill, NC 27599-7515

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/