[Insight-users] MRI Image Head Area Mask
Andriy Fedorov
fedorov at bwh.harvard.edu
Tue Nov 13 12:12:02 EST 2012
Sebastian,
You can look at the BRAINSFit module in 3D Slicer that has a mode to
automatically mask the head for the purposes of improving robustness
of registration:
http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.2/Modules/BRAINSFit
The code is available here:
https://github.com/BRAINSia/BRAINSStandAlone/tree/master/BRAINSFit
HTH
AF
> From: Bill Lorensen <bill.lorensen at gmail.com>
> Subject: Re: [Insight-users] MRI Image Head Area Mask
> To: Sebastian Widz <widz at infovision.pl>
> Cc: insight-users at itk.org
> Message-ID:
> <CADZJ4hPeHSiZ0nqD-YvzOUrrmJdbxcOtxGh9z11NOzvSi8+8dg at mail.gmail.com>
> Content-Type: text/plain; charset=windows-1252
>
> Sebastian,
>
> If you want to solve a segmentation problem without writing code I
> suggest you look at 3D Slicer. It is built on VTK and ITK.
>
> http://slicer.org
>
> Bill
> On Mon, Nov 12, 2012 at 2:43 AM, Sebastian Widz <widz at infovision.pl> wrote:
>> Dear ITK Team and ITK Users,
>>
>>
>>
>> I am looking for an ITK solution to the following task:
>>
>>
>>
>> For a given T1 weighted MRI Brain Image (Axial plane) create a binary mask
>> that would mark the head region (extract head object from the background)
>>
>> In the past I?ve been doing it by analyzing image histogram, finding the
>> first peak, then finding the first local minimum (m) value with magnitude
>> values greater than the histogram peak.
>>
>> Pixels with values with magnitude lower or equal (m) were marked with zeros
>> (0), pixels with higher values where marked as ones (1).
>>
>> Then some ?hole filling? algorithm needs to be applied in order to create a
>> convex shape.
>>
>>
>>
>> Can the same be done with ITK filters (possibly SimpleITK as I use the C#
>> Managed version)?
>>
>> Maybe there are some other ways you would suggest, as my way not always
>> gives expected .
>>
>>
>>
>> Best Regards,
>>
>> Sebastian
>>
>>
>> _____________________________________
>> 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.php
>>
>> 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
>>
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
>
>
> ------------------------------
>
> Message: 10
> Date: Mon, 12 Nov 2012 17:14:12 -0600
> From: "Steve M. Robbins" <steve at sumost.ca>
> Subject: Re: [Insight-users] Code integration and code design -
> Question
> To: Steffan <ulysse.rigaud at gmail.com>
> Cc: "insight-users at itk.org" <insight-users at itk.org>
> Message-ID: <20121112231412.GA10097 at sumost.ca>
> Content-Type: text/plain; charset="us-ascii"
>
> On Mon, Nov 12, 2012 at 04:56:13PM +0800, Steffan wrote:
>
>> * To test the orientation of vectors, we are using a library in C
> that we have wrap into some ITK function. This library is a single
> file, done by Jonathan Shewchuk
> (http://www.cs.cmu.edu/~quake/robust.html) under public domain.
>
> I presume you've read the Warning on that page about extended
> precision.
>
> In my past experience with this code, this has always been the
> trickiest part of using it -- especially in a portable manner. I'm
> curious about your plan to handle this, especially in a
> general-purpose library like ITK.
>
> Regards,
> -Steve
>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: not available
> Type: application/pgp-signature
> Size: 190 bytes
> Desc: Digital signature
> URL: <http://www.itk.org/pipermail/insight-users/attachments/20121112/da604e2b/attachment-0001.pgp>
>
> ------------------------------
>
> Message: 11
> Date: Mon, 12 Nov 2012 19:18:40 -0500
> From: Christopher Mullins <christopher.mullins at kitware.com>
> Subject: [Insight-users] itkMetaLandmarkConverter to read landmarks in
> files
> To: insight-users at itk.org
> Message-ID:
> <CABVTP-J4pH7XVGceTEp1OVV0GAVAVCwPMM6w3TLXJ+u7Uz8XXw at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hello ITK users,
>
> Does anyone know of a usage example of the
> itkMetaLandmarkConverter<http://www.itk.org/Doxygen/html/classitk_1_1MetaLandmarkConverter.html>
> ?
> My goal is to read in landmarks in a meta-format, such as the attached
> example, and use these to produce a transform (say, from a moving image
> onto a fixed image).
> So far my code looks like this:
>
> // Read both landmark files
>
> typedef itk::MetaLandmarkConverter< Dimension > metaReaderType;
>
> const char * fixedLandmarkFilename = argv[3];
>
> metaReaderType fixedLandmarkReader;
>
> fixedLandmarkReader.ReadMeta(fixedLandmarkFilename);
>
>
> const char * movingLandmarkFilename = argv[4];
>
> metaReaderType movingLandmarkReader;
>
> movingLandmarkReader.ReadMeta(movingLandmarkFilename);
>
>
> Thanks,
> Christopher Mullins
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://www.itk.org/pipermail/insight-users/attachments/20121112/bf031f2b/attachment-0001.htm>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: 702_landmark_left.lnd
> Type: application/octet-stream
> Size: 416 bytes
> Desc: not available
> URL: <http://www.itk.org/pipermail/insight-users/attachments/20121112/bf031f2b/attachment-0001.obj>
>
> ------------------------------
>
> Message: 12
> Date: Mon, 12 Nov 2012 17:28:38 -0800
> From: Mark Tsuchida <marktsuchida at gmail.com>
> Subject: Re: [Insight-users] How to get ITK4+ and Python wrapping to
> work on Mac OSX (10.7)?
> To: Matt McCormick <matt.mccormick at kitware.com>
> Cc: "insight-users at itk.org" <insight-users at itk.org>, "Ahmed Halaweish,
> Ph.D." <ahmed.halaweish at duke.edu>
> Message-ID:
> <CAKGYTBmx_TmTHpRMv8650LjEewx+wTwvYrC7rcO4swSasu=0ug at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> On Mon, Nov 12, 2012 at 7:53 PM, Ahmed Halaweish, Ph.D.
> <ahmed.halaweish at duke.edu> wrote:
>> I'm trying to get ITK 4.1 and ITK 4.2 + Python wrapping to work on my
>> macbook and mac pro desktop (both running 10.7) without any luck. I always
>> seem to get a make: error 2 in the Wrapping/Modules section of the
>> compilation process.
>
> I don't know if the following applies to your case (would need to see the
> error messages you got), but here is what I have found necessary trying to
> compile WrapITK for Python on Lion.
>
> Xcode comes with two sets of compilers (clan/clang++ and llvm-gcc/llvm-g++).
> While either appears to work for compiling ITK itself, I have only been
> able to get llvm-gcc to work for WrapITK.
>
> By default, cmake chooses /usr/bin/gcc (a symlink to llvm-gcc) and
> /usr/bin/c++ (a symlink to clang++), which is not just inconsistent but
> causes some weird problems with GCC_XML, a program required for generating
> the wrappers.
>
>
> I have been able to get WrapITK to compile by following these steps (Lion,
> Xcode 4.5, cmake 2.8.8):
>
> 1. Download GCC_XML from
> http://itk.org/files/gccxml/gccxml-2012-08-08.tar.bz2 (see the thread in
> this list today titled "build fails to download gccxml (4.2.1)").
>
> 2. Configure GCC_XML with the following, build, and install (to /usr/local).
>
> CMAKE_BUILD_TYPE=Release
> CMAKE_C_COMPILER=/usr/bin/llvm-gcc
> CMAKE_CXX_COMPILER=/usr/bin/llvm-g++
>
> [If the compilers are not explicitly set here, building WrapITK will fail.
> If they are set to clang/clang++, configuration of GCC_XML will fail.]
>
> 3. Configure ITK 4.2.1. First set the compilers:
>
> CMAKE_C_COMPILER=/usr/bin/llvm-gcc
> CMAKE_CXX_COMPILER=/usr/bin/llvm-g++
>
> [If you are using ccmake, all other settings will be reset after changing
> the compiler.]
>
> Then,
> BUILD_SHARED_LIBS=ON
> BUILD_EXAMPLES=OFF # Not the point here, but this is what I did
> BUILD_TESTING=OFF # Ditto.
>
> Add
> ITK_WRAP_PYTHON=ON
>
> This (if using ccmake) will disclose additional options.
> We need to set
>
> ITK_USE_SYSTEM_GCCXML=ON
>
> to use the GCC_XML installed above in 2.
>
> Also, they Python paths are usually detected incorrectly (the paths may
> exist but may be wrong or belong to a different installation of Python). In
> my case, I am using Python 2.7 compiled from the source, which is installed
> under /Library (as is Python 2.7 from the python.org installer package). It
> is best to set all of the following explicitly, or at least check that they
> are correct:
>
> PYTHON_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
> PYTHON_LIBRARY=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/libpython2.7.dylib
> PY_SITE_PACKAGES_PATH=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
> PYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
>
> (end of steps)
>
> I have not tried building ITK from the git head. It is probably sufficient
> to just set the compilers in ITK's config and let those propagate to
> GCC_XML's, rather than doing a separate build and installation of GCC_XML.
> At least, that used to work with ITK 4.2.1 before the GCC_XML repository
> got moved.
>
> Hope this helps,
>
> Mark
>
>
>
>
> On Mon, Nov 12, 2012 at 1:25 PM, Matt McCormick
> <matt.mccormick at kitware.com>wrote:
>
>> Hi AFH,
>>
>> Could you please reply with the error message that you get.
>>
>> Thanks,
>> Matt
>>
>> On Mon, Nov 12, 2012 at 7:53 PM, Ahmed Halaweish, Ph.D.
>> <ahmed.halaweish at duke.edu> wrote:
>> > All,
>> > I'm trying to get ITK 4.1 and ITK 4.2 + Python wrapping to work on my
>> > macbook and mac pro desktop (both running 10.7) without any luck. I
>> always
>> > seem to get a make: error 2 in the Wrapping/Modules section of the
>> > compilation process.
>> >
>> > Here are the variables I set in cmake:
>> > BUILD_SHARED_LIBS = ON
>> > CMAKE_BUILD_TYPE = Release
>> > ITK_USE_REVIEW = ON
>> > ITK_WRAPPING = ON
>> > ITK_WRAP_PYTHON = ON
>> >
>> > If anyone has had any luck with this, please do share any tips or
>> pointers.
>> >
>> > Cheers
>> > AFH
>> >
>> > _____________________________________
>> > 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.php
>> >
>> > 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
>> >
>> _____________________________________
>> 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.php
>>
>> 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
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://www.itk.org/pipermail/insight-users/attachments/20121112/c060366d/attachment-0001.htm>
>
> ------------------------------
>
> Message: 13
> Date: Tue, 13 Nov 2012 09:51:13 -0300
> From: Sebastian Ordas <sebastian.ordas at gmail.com>
> Subject: [Insight-users] removing rectangle from microgriding images
> To: "insight-users at itk.org" <insight-users at itk.org>
> Message-ID: <50A24241.4040000 at gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi All,
>
> A microgriding data set has a rectangular artifact in every slice coming
> from zooming into the sample and pasting
> Does anyone know of a filter or procedure to remove it?
>
> http://ScrnSht.com/bxhrpn
>
> Note that the same rectangle appears shifted and rotated in contiguous
> slices
>
> thanks in advance
> sebastian
>
>
>
>
>
>
>
> ------------------------------
>
> Message: 14
> Date: Tue, 13 Nov 2012 12:55:42 +0000
> From: "Raviteja, Allaparthi" <Allaparthi.Raviteja at philips.com>
> Subject: [Insight-users] How to convert set of points from
> PolylineParametricPath to PointSet type
> To: "insight-users at itk.org" <insight-users at itk.org>
> Message-ID:
> <4E2CCF5105F8F04B8F4C8C27EF66D089014EA6C2 at 011-DB3MPN2-131.MGDPHG.emi.philips.com>
>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi,
> I want to convert set of points from PolylineParametricPath to PointSet type
>
> itk::PolyLineParametricPath< 2 >::Pointer simplifiedPath = itk::PolyLineParametricPath< 2 >::New();
>
> std::cout << "There are " << simplifiedPath->GetVertexList()->Size() << " points on the simplified path." << std::endl;
>
> typedef itk::Vector< float, 1 > DataType;
>
> typedef itk::PointSet< DataType, DataDimension > PointSetType2;
> PointSetType2::Pointer pointSet2 = PointSetType2::New();
> PointSetType2::PointType simplifiedPathPoints;
>
>
> How do I resolve this?
> Thank you,
> Ravi.
>
> ________________________________
> The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://www.itk.org/pipermail/insight-users/attachments/20121113/b8476b4c/attachment-0001.htm>
>
> ------------------------------
>
> Message: 15
> Date: Tue, 13 Nov 2012 15:37:06 +0100
> From: "Xue, Ning (ext)" <ning.xue.ext at siemens.com>
> Subject: [Insight-users] Minimal distance between a point and a mesh
> To: "insight-users at itk.org" <insight-users at itk.org>
> Message-ID:
> <9BD3B0EEE57AE84E97B24335E6203D130D9AED67BF at DEFTHW99E85MSX.ww902.siemens.net>
>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi everyone,
>
> In my project i need to compute the minial distance between a mesh and all other points in a 3D image, so i want to find an efficient and fast method. i think it is a classic problem and there are probably already some methods or functions in ITK to solve it . Unfortunately i cannot find it. Hope someone out there has dealt with this before and could give me some advice. Any help woud be greatly appreciated.
>
> Best,
> Ning
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://www.itk.org/pipermail/insight-users/attachments/20121113/c5356bf7/attachment-0001.htm>
>
> ------------------------------
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>
> End of Insight-users Digest, Vol 103, Issue 14
> **********************************************
More information about the Insight-users
mailing list