[Vv] How can I pass a "patient mask" to clitkExtractLung?
Vivien Delmon
vivien.delmon at creatis.insa-lyon.fr
Mon Jan 9 11:05:27 CET 2012
On 01/09/2012 05:18 AM, 黄成 wrote:
> Hi all,
>
> I'm using clitkExtractLung.exe to extract the lung from a CT
> image, and I run it using command line: "clitkExtractLung.exe -i
> myImage.nii"
> Then I get an error message:
>
> itk::ExceptionObject (00000000009EF4B0)
> Location: "Unknown"
> File: ..\..\..\Source\clitk\common\clitkImageToImageGenericFilterBase.cxx
> Line: 243
> Description: **Error** The filter <ExtractLung> is not available for 3D
> images with pixel=float and 1 component.
> The filter <ExtractLung> manages:
> Dim: 3, Type: short
>
> Since the help information of clitkExtractLung.exe tells me
> that a patient mask image is needed, I guess I should pass a patient
> mask image as an argument to it. However, I cannot figure out how to do
> this because there is no argument for "patient mask". How can I make
> this work?
Hi Huang,
All clitk tools are developed for internal use and not really adaptable
to any kind of data. For clitkExtractLung the data file must be encoded
on signed short using Hounsfield units (-1000 for air).
If your image is in Hounsfield units but the type of data is float you
can convert it with :
clitkImageConvert -i myImage.nii -o myImage_short.nii -t short
If your image is not scaled on Hounsfield units, scales it using
clitkImageArithm from which you can add scalar or multiply by scalar or
anything like this.
For the patient mask clitkExtractLung read a afdb file which is an
internal format describing a database of patient structures. Its format
is "<Name of Structure> <path to file>" with one structure on each line
giving that kind of file :
Lungs tmp.MASK/lungs_0.mhd
Patient tmp.MASK/patient_mask_0.mhd
Trachea trachea.mhd
If you use clitkExtractPatient to obtain the patient mask you can
specify a afdb file :
clitkExtractPatient -i myImage.nii -o myImage_patient_mask.nii -a
myImage.afdb
then you can give it to clitkExtractLung :
clitkExtractLung -i myImage_short.nii -a myImage.afdb -o myImage_lungs.nii
I hope this will answer all your questions. Don't hesitate if you have
more question.
Kind Regards,
--
Vivien Delmon
PhD student at CREATIS, Lyon
Supported by ANRT and ELEKTA
http://www.creatis.insa-lyon.fr/rio
More information about the vv
mailing list