"soumya goyal" <goyalsoumya@mathworks.com> wrote in message <iauo61$9rh$1@fred.mathworks.com>...
> "Sean " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <iaunn0$90i$1@fred.mathworks.com>...
> > "soumya goyal" <goyalsoumya@mathworks.com> wrote in message <iaun80$7vu$1@fred.mathworks.com>...
> > > i dont know how to write a code in matlab.. plzz tell me..i have an algorithm but dont know how to implement it im matlab. this algorithm removes film artifacts from the mri.
> > >
> > > 1. read the mri image and store it in 2d matrix.
> > > 2. select the peak threshold value for removing white labels.
> > > 3. set the flag to 255.
> > > 4. select pixels whose intensity value is equal to 255.
> > > 5. if the intensity value is 255 then the flag value is set to zero and thus the labels are removed from the mri.
> > > 6. otherwise skip to the next pixel.
> > >
> > > suggest me the code for this and the way to implement it.
> >
> > Two lines:
> > I = imread('yourMRIslice'); %may need dicomread et al
> > I(I==255) = 0;
>
> wat is mrislice? is it my image? suppose my image is saved in the variable i then wat i have to do..?
Okay, your image is saved in a variable; let's call it 'I'. You want to remove values that are equal to 255.
I(I==255) = 0;
