[Insight-users] MRIBiasCorrector program

Jisung Kim bahrahm at yahoo . com
Tue, 30 Jul 2002 06:37:17 -0700 (PDT)


Hello.

Yesterday, I finally fixed the problem and I also made
some modifications that removes depreceated feature
warnings. I will check in the modified code right now.
MRIBiasCorrection example is more than a year old and
there has been lots of changes in ITK. I tried to
"mordernize" my example and filter codes. 

The "max-iteration" command line option is replaced
with two separate options, "volume-max-iteration" and
"inter-slice-max-iteration". The former is the maximal
number of iterations for 3D bias correction and the
latter for 2D zero degree inter slice bias correction
that is a preprocess of 3D bias correction. 

I tested the example against Brainweb dataset. It
seems works fine.

If you have more problems, please let me know.

Thank you,

Jisung.
 
--- "Hans J. Johnson" <hjohnson@engineering.uiowa.edu>
wrote:
> Jisung,
> 
> Any luck so far?  I will have some time at the end
> of this week to look 
> at this program again, and I was just wondering if
> you were able to get 
> it to work.
> 
> I realize that you probably have many other things
> to do, so if I can be 
> of any assistance, please let me know.
> 
> Thanks,
> Hans
> 
> Jisung Kim wrote:
> 
> >Hello.
> >
> >I am the developer of the program. I just ran it
> and
> >had same seg fault error. The example is kind of
> old
> >and there wasn't any change since I implemented and
> >tested it on Windows and Linux. 
> >
> >At this moment, I don't know what caused it. I will
> 
> >fix it and let you know. By the way, could you send
> an
> >email with information about your system such as
> types
> >and versions of OS and compiler?
> >
> >Thank you for pointing it out,
> >
> >Jisung.
> >
> >--- "Hans J. Johnson" <hans-johnson@uiowa.edu>
> wrote:
> >
> >>Hello,
> >>
> >>I trying to use the MRIBiasCorrector program, and
> I
> >>am getting a 
> >>segmentation fault.
> >>
> >>I am using the most generic command line, with a
> >>floating point input 
> >>image with Meta data header:
> >>==============
> >>NDims = 3
> >>DimSize = 256 256 124
> >>ElementType = MET_FLOAT
> >>ElementSpacing = 0.703125 0.703125 1.500000
> >>ElementByteOrderMSB = False
> >>ElementDataFile = /home/hjohnson/T1_float.img
> >>===============
> >>
> >>COMMANDLINE:
> >>
>
>/usr/robin/people/hjohnson/src/buildhome/athlon/DEBUG/bin/BiasCorrector
> >
> >>--input /home/hjohnson/T1_float.mhd --output
> xxx.img
> >>--class-mean 1500 
> >>570  --class-sigma 100 70 --use-log yes --degree 3
> >>--growth 1.05 
> >>--shrink 0.9
> >>
> >>
> >>********The following warnings are produced within
> a
> >>few seconds of startup
> >>
> >>Loading images...
> >>WARNING: In 
> >>
>
>/IPLlinux/robin_home/hjohnson/src/buildhome/athlon/DEBUG/include/Insight/Code/Common/itkImageSource.txx,
> >
> >>line 94
> >>ReadMetaImage (0x8134528): SetOutput(): This
> method
> >>is slated to be 
> >>removed from ITK.  Please use GraftOutput() in
> >>possible combination with 
> >>DisconnectPipeline() instead.
> >>
> >>Input image loaded.
> >>Images loaded.
> >>WARNING: In 
> >>
>
>/IPLlinux/robin_home/hjohnson/src/buildhome/athlon/DEBUG/include/Insight/Code/Common/itkImageSource.txx,
> >
> >>line 94
> >>MRIBiasFieldCorrectionFilter (0x81320f0):
> >>SetOutput(): This method is 
> >>slated to be removed from ITK.  Please use
> >>GraftOutput() in possible 
> >>combination with DisconnectPipeline() instead.
> >>
> >>*******After about 2 minutes the program seg
> faults
> >>*******
> >>====================Stack Trace =================
> >>chunk_free,              FP=bfffd558
> >>__cfree,                 FP=bfffd578
> >>__builtin_delete,        FP=bfffd598
> >>__builtin_vec_delete,    FP=bfffd5b8
> >>vnl_c_vector_dealloc,    FP=bfffd5d8
> >>                     [282]-->  delete []
> >>static_cast<char*>(v);
> >>vnl_c_vector<double>::deallocate, FP=bfffd5f8
> >>                     [309]--> 
> >>vnl_c_vector_dealloc(v, n, sizeof (T));
> >>vnl_vector<double>::destroy, FP=bfffd618
> >>                     [252]-->  
> >>vnl_vector_free_blah;
> >>vnl_vector<double>::~vnl_vector, FP=bfffd638
> >>                     [107]-->   ~vnl_vector() { if
> >>(data) destroy(); }
> >>itk::Array<double>::~Array, FP=bfffd658
> >>                     [71]-->   ~Array() {};
> >>...gned int)3> >::EstimateBiasField, FP=bfffd6e8
> >>                    
> >>
>
>[277]-->bias->SetCoefficients(m_Optimizer->GetCurrentPosition());
> >
> >>...(unsigned int)3> >::GenerateData, FP=bfffe328
> >>                    
> >>[447]-->this->EstimateBiasField(bias, *iter) ;
> >>...:ProcessObject::UpdateOutputData, FP=bfffe488
> >>                     [814]-->this->GenerateData();
>  
> >>                  
> >>itk::DataObject::UpdateOutputData, FP=bfffe4a8
> >>                    
> >>[403]-->m_Source->UpdateOutputData(this);         
> >>        itk::DataObject::Update, FP=bfffe4c8
> >>                    
> >>[328]-->this->UpdateOutputData();  
> >>itk::ProcessObject::Update, FP=bfffe4e8
> >>                     [482]  void
> >>                     [483]  ProcessObject
> >>                     [484]  ::Update()
> >>                     [485]  {
> >>                     [486]     if
> >>(this->GetOutput(0))
> >>                     [487]       {
> >>                     [488]-->      
> >>this->GetOutput(0)->Update();
> >>                     [489]       }
> >>                     [490]   }
> >>main,                    FP=bfffe818
> >>                     [212]  
> >>filter->SetBiasFieldDegree(degree) ;
> >>                     [213]   
> >>
>
>filter->SetUsingSlabIdentification(usingSlabIdentification)
> >
> >>;
> >>                     [214]  
> >>filter->SetSlicingDirection(sliceDirection) ;
> >>                     [215]-->filter->Update() ;
> >>    __libc_start_main,       FP=bfffe858
> >>==============================================
> >>
> >>Any suggestions or help would be greatly
> >>appreciated.
> >>
> >>-- 
> >>Regards,
> >>Hans
> >>
> >>
>
>=============================================================================
> >
> >>
> >>Hans J. Johnson                                   
>  
> >>                    
> >>   305 MEB
> >>hans-johnson@uiowa.edu                            
>  
> >>              Dept. 
> >>of Psychiatry
> >>http://moniz.psychiatry.uiowa.edu/~hjohnson       
>  
> >>   The University 
> >>of Iowa
> >>(319) 353-5593                                    
>  
> >>                   
> >>   Iowa City, IA 52242
> >>
>
>=============================================================================
> >
> >>
> >>
> >>
> 
=== message truncated ===


=====
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!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com