[Insight-users] a query regarding image processing
Luis Ibanez
luis.ibanez at kitware.com
Sun Mar 7 11:32:12 EST 2010
Hi Shahina,
In order to identify the voxels in the brain, you will need
to apply an image-segmentation method.
There is a large variety of segmentation methods available
in ITK. The most commonly used are described in the
ITK Software Guide:
http://www.itk.org/ItkSoftwareGuide.pdf
You may want to start by exploring
1) Region growing methods
2) Level Set methods.
and you may want to verify whether your MRI image
has a significant field inhomogeneity, in which case
you should do some bias-field correction before you
apply any of the segmentation methods.
You will find many source code examples under
Insight/Examples/Segmentation
Loading the 2D slices into memory, in order to compose
a 3D image should be a very straight forward process.
Do you have those slices stored in DICOM files ?
Please look at the chapter "Reading and Writing Images"
from the ITK Software Guide, for examples on how you
can load series of 2D images.
You will find many source code examples under
Insight/Examples/IO
If you prefer to avoid having to write the code for the
segmentation method, you may wan to give it a try
at the following applications:
1) Slicer (www.slicer.org)
2) SNAP (www.itksnap.org)
Regards,
Luis
--------------------------------------------------------------------------
On Sun, Mar 7, 2010 at 2:52 AM, shahina ismail <shainaismail at gmail.com> wrote:
> thanks for your kind reply luis.....as u said wat i need is to find
> the volume of the brain from a series of 2D slices of the brain
> MRI.....i have calculated the voxel size....now all i need to know is
> the number of voxels that are present so that i can multiply both to
> get the volume....pls suggest the coding .....
>
>
> thanks and regards,
>
> shahina.i
>
> On 3/7/10, Luis Ibanez <luis.ibanez at kitware.com> wrote:
>> Hi Shahina,
>>
>>
>> 1) The total number of pixels in your image can be found
>> with the following call:
>>
>> ImageType::RegionType region = image->GetBufferedRegion();
>> unsigned int numberOfPixels = region.GetNumberOfPixels();
>>
>> Note that ITK images have also the concept of the "largest
>> possible region" which applies if you are streaming images
>> into memory.
>>
>> In that case you could call
>>
>> region = image->GetLargestPossibleRegion();
>> unsigned int numberOfPixels = region.GetNumberOfPixels();
>>
>> Both of these methods will give you values that are independent
>> of the actual image content.
>>
>>
>> 2) You can get the voxel size by:
>>
>> ImageType::SpacingType spacing = image->GetSpacing();
>>
>> // spacing[0] voxel size across X
>> // spacing[1] voxel size across Y
>> // spacing[2] voxel size across Z
>>
>>
>> 3) You should read the "Data Representation" chapter
>> of the ITK Software Guide.
>>
>> http://www.itk.org/ItkSoftwareGuide.pdf
>>
>>
>>
>> Note that, if you what you need is the volume of specific
>> objects contained in the image (a brain, a liver...) then
>> there are other classes that you will need to use.
>>
>>
>>
>> Regards,
>>
>>
>> Luis
>>
>>
>> ----------------------------------------------------------------------------
>> On Sat, Mar 6, 2010 at 12:41 PM, shahina ismail <shainaismail at gmail.com>
>> wrote:
>>> hi...
>>>
>>> i am in need of counting the voxels in an image to calculate its volume
>>> using Matlab....its a 3D MR image of the brain..i am trying to multiply
>>> the
>>> voxel size with the number of voxels to get the volume...and i have
>>> calculated the voxel size....i would appreciate any help regarding the
>>> same....
>>>
>>>
>>>
>>> thanks and regards
>>> shahina.i
>>>
>>>
>>> _____________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Kitware offers ITK Training Courses, for more information visit:
>>> http://www.kitware.com/products/protraining.html
>>>
>>> Please keep messages on-topic and check the ITK FAQ at:
>>> http://www.itk.org/Wiki/ITK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.itk.org/mailman/listinfo/insight-users
>>>
>>>
>>
>
More information about the Insight-users
mailing list