[Insight-users] MRIBiasCorrector

Luis Ibanez luis.ibanez at kitware.com
Tue Mar 27 09:13:18 EST 2007


Skipped content of type multipart/alternative-------------- next part --------------
? PatchBiasCorrectionTo2D.txt
Index: BiasCorrector.cxx
===================================================================
RCS file: /cvsroot/Insight/InsightApplications/MRIBiasCorrection/BiasCorrector.cxx,v
retrieving revision 1.23
diff -u -r1.23 BiasCorrector.cxx
--- BiasCorrector.cxx	10 Dec 2006 22:55:09 -0000	1.23
+++ BiasCorrector.cxx	27 Mar 2007 14:08:29 -0000
@@ -208,7 +208,7 @@
 static void remove_edges(ImagePointer input, ImagePointer& NoEdgeImage)
 {
 
-  const int Dimension = 3;
+  const int Dimension = 2;
   typedef itk::ZeroCrossingBasedEdgeDetectionImageFilter<ImageType, ImageType> zeroCrossFilterType;
   typedef itk::CastImageFilter< ImageType,  MaskType> castFilterType;
   typedef itk::MaskImageFilter< ImageType,MaskType,ImageType > maskFilterType;
Index: BiasImageGenerator.cxx
===================================================================
RCS file: /cvsroot/Insight/InsightApplications/MRIBiasCorrection/BiasImageGenerator.cxx,v
retrieving revision 1.17
diff -u -r1.17 BiasImageGenerator.cxx
--- BiasImageGenerator.cxx	25 Mar 2007 20:26:24 -0000	1.17
+++ BiasImageGenerator.cxx	27 Mar 2007 14:08:29 -0000
@@ -71,6 +71,8 @@
       exit(0) ;
     }
 
+  const int Dimension = 2;
+
   OptionList options(argc, argv) ;
 
   // get image file options
@@ -94,8 +96,8 @@
       coefficientVector.set_size(length) ;
       for (int i = 0 ; i < length ; i++)
         coefficientVector[i] = coefficients[i] ;
-      degree = options.GetIntOption("degree", 3, true) ;
-      dimension = options.GetIntOption("dimension", 3,  false) ;
+      degree = options.GetIntOption("degree", Dimension, true) ;
+      dimension = options.GetIntOption("dimension", Dimension,  false) ;
       if(dimension != static_cast<int>(ImageType::ImageDimension))
         {
         std::cout << "Currently compiled to only support "
Index: imageutils.h
===================================================================
RCS file: /cvsroot/Insight/InsightApplications/MRIBiasCorrection/imageutils.h,v
retrieving revision 1.16
diff -u -r1.16 imageutils.h
--- imageutils.h	10 Dec 2006 22:55:09 -0000	1.16
+++ imageutils.h	27 Mar 2007 14:08:29 -0000
@@ -31,9 +31,9 @@
 typedef  float ImagePixelType;
 typedef  short WriteImagePixelType;
 typedef  unsigned char MaskPixelType;
-typedef itk::Image<ImagePixelType, 3> ImageType ;
-typedef itk::Image<MaskPixelType, 3> MaskType ;
-typedef itk::Image<WriteImagePixelType, 3> WriteImageType ;
+typedef itk::Image<ImagePixelType, 2> ImageType ;
+typedef itk::Image<MaskPixelType, 2> MaskType ;
+typedef itk::Image<WriteImagePixelType, 2> WriteImageType ;
 typedef ImageType::Pointer ImagePointer ;
 typedef MaskType::Pointer MaskPointer ;
 typedef itk::ImageFileReader< ImageType > ImageReaderType ;
@@ -113,6 +113,7 @@
 {
   //TODO:  change spatial orientation to use direction cosigns here.q
 
+ /*
   typename itk::OrientImageFilter<OrienterImageType,OrienterImageType>::Pointer orienter =
     itk::OrientImageFilter<OrienterImageType,OrienterImageType>::New();
   orienter->SetDesiredCoordinateDirection(DesiredDirection);
@@ -122,6 +123,8 @@
 
   typename OrienterImageType::Pointer  image = orienter->GetOutput();
   return image;
+  */
+  return input;
 }
 
 #endif


More information about the Insight-users mailing list