[Vv] Errors with clitkExtractLung
Rômulo Pinho
romulopinho at yahoo.com.br
Thu Oct 24 19:29:41 CEST 2013
Hello, Bilal,
I'm posting your results back to the list. You could also post the
output of type LOLA11.
But I'd say there's indeed a thresholding problem somewhere... I'd
suggest you to inspect your image (e.g., with VV) to have an idea about
the grey values inside the trachea and then adjust the parameters of
clitkExtractImage accordingly. Another possibility is that your image is
very noisy and, as such, if you have a short range of grey values for
the threshold, you segment too little, possibly resulting in
disconnected regions. If by contrast you have a large range of values,
you segment too much, and this will ruin both types of trachea detection
algorithm... If the image is indeed noisy, you can try to apply a
smoothing filter to it.
I regret I can't open the image to check it myself.
Hope this helps.
Cheers,
Rômulo
On 23/10/2013 22:19, Bilal Tahir wrote:
> Hi Rômulo,
>
> Below is my --verboseRG output. I am still looking into it to see
> where it is breaking down for the trachea. Let me know if you notice
> any obvious reasons:
>
> [md1bat at testnode01 mhd]$ clitkExtractLung --verboseRG 1 -i
> copd1_00.mhd -a default.afdb -o 00_lungs.mhd
> Initial region size using thresholds [-2000, -900], is 4132644...
> Increasing upper threshold to -836, size is 5983512(previously
> 4132644) ...
> Increasing upper threshold to -772, size is 6367804(previously
> 5983512) ...
> Increasing upper threshold to -708, size is 6543232(previously
> 6367804) ...
> Increasing upper threshold to -644, size is 6651900(previously
> 6543232) ...
> Increasing upper threshold to -580, size is 6731677(previously
> 6651900) ...
> Increasing upper threshold to -516, size is 6796423(previously
> 6731677) ...
> Increasing upper threshold to -452, size is 6852266(previously
> 6796423) ...
> Increasing upper threshold to -388, size is 6903576(previously
> 6852266) ...
> Increasing upper threshold to -324, size is 6953100(previously
> 6903576) ...
> Increasing upper threshold to -260, size is 7002715(previously
> 6953100) ...
> No explosion before maximum upper threshold reached!
> Initial region size using thresholds [-2000, -900], is 4134619...
> Increasing upper threshold to -836, size is 5983512(previously
> 4134619) ...
> Increasing upper threshold to -772, size is 6367804(previously
> 5983512) ...
> Increasing upper threshold to -708, size is 6543232(previously
> 6367804) ...
> Increasing upper threshold to -644, size is 6651900(previously
> 6543232) ...
> Increasing upper threshold to -580, size is 6731677(previously
> 6651900) ...
> Increasing upper threshold to -516, size is 6796423(previously
> 6731677) ...
> Increasing upper threshold to -452, size is 6852266(previously
> 6796423) ...
> Increasing upper threshold to -388, size is 6903576(previously
> 6852266) ...
> Increasing upper threshold to -324, size is 6953100(previously
> 6903576) ...
> Increasing upper threshold to -260, size is 7002715(previously
> 6953100) ...
> No explosion before maximum upper threshold reached!
> Initial region size using thresholds [-2000, -900], is 4134458...
> Increasing upper threshold to -836, size is 5983512(previously
> 4134458) ...
> Increasing upper threshold to -772, size is 6367804(previously
> 5983512) ...
> Increasing upper threshold to -708, size is 6543232(previously
> 6367804) ...
> Increasing upper threshold to -644, size is 6651900(previously
> 6543232) ...
> Increasing upper threshold to -580, size is 6731677(previously
> 6651900) ...
> Increasing upper threshold to -516, size is 6796423(previously
> 6731677) ...
> Increasing upper threshold to -452, size is 6852266(previously
> 6796423) ...
> Increasing upper threshold to -388, size is 6903576(previously
> 6852266) ...
> Increasing upper threshold to -324, size is 6953100(previously
> 6903576) ...
> Increasing upper threshold to -260, size is 7002715(previously
> 6953100) ...
> No explosion before maximum upper threshold reached!
> Initial region size using thresholds [-2000, -900], is 4133592...
> Increasing upper threshold to -836, size is 5983512(previously
> 4133592) ...
> Increasing upper threshold to -772, size is 6367804(previously
> 5983512) ...
> Increasing upper threshold to -708, size is 6543232(previously
> 6367804) ...
> Increasing upper threshold to -644, size is 6651900(previously
> 6543232) ...
> Increasing upper threshold to -580, size is 6731677(previously
> 6651900) ...
> Increasing upper threshold to -516, size is 6796423(previously
> 6731677) ...
> Increasing upper threshold to -452, size is 6852266(previously
> 6796423) ...
> Increasing upper threshold to -388, size is 6903576(previously
> 6852266) ...
> Increasing upper threshold to -324, size is 6953100(previously
> 6903576) ...
> Increasing upper threshold to -260, size is 7002715(previously
> 6953100) ...
> No explosion before maximum upper threshold reached!
> Initial region size using thresholds [-2000, -900], is 4133078...
> Increasing upper threshold to -836, size is 5983518(previously
> 4133078) ...
> Increasing upper threshold to -772, size is 6367804(previously
> 5983518) ...
> Increasing upper threshold to -708, size is 6543232(previously
> 6367804) ...
> Increasing upper threshold to -644, size is 6651900(previously
> 6543232) ...
> Increasing upper threshold to -580, size is 6731677(previously
> 6651900) ...
> Increasing upper threshold to -516, size is 6796423(previously
> 6731677) ...
> Increasing upper threshold to -452, size is 6852266(previously
> 6796423) ...
> Increasing upper threshold to -388, size is 6903576(previously
> 6852266) ...
> Increasing upper threshold to -324, size is 6953100(previously
> 6903576) ...
> Increasing upper threshold to -260, size is 7002715(previously
> 6953100) ...
> No explosion before maximum upper threshold reached!
> Initial region size using thresholds [-2000, -900], is 4132234...
> Increasing upper threshold to -836, size is 5983517(previously
> 4132234) ...
> Increasing upper threshold to -772, size is 6367804(previously
> 5983517) ...
> Increasing upper threshold to -708, size is 6543232(previously
> 6367804) ...
> Increasing upper threshold to -644, size is 6651900(previously
> 6543232) ...
> Increasing upper threshold to -580, size is 6731677(previously
> 6651900) ...
> Increasing upper threshold to -516, size is 6796423(previously
> 6731677) ...
> Increasing upper threshold to -452, size is 6852266(previously
> 6796423) ...
> Increasing upper threshold to -388, size is 6903576(previously
> 6852266) ...
> Increasing upper threshold to -324, size is 6953100(previously
> 6903576) ...
> Increasing upper threshold to -260, size is 7002715(previously
> 6953100) ...
> No explosion before maximum upper threshold reached!
> Initial region size using thresholds [-2000, -900], is 4132508...
> Increasing upper threshold to -836, size is 5983536(previously
> 4132508) ...
> Increasing upper threshold to -772, size is 6367804(previously
> 5983536) ...
> Increasing upper threshold to -708, size is 6543232(previously
> 6367804) ...
> Increasing upper threshold to -644, size is 6651900(previously
> 6543232) ...
> Increasing upper threshold to -580, size is 6731677(previously
> 6651900) ...
> Increasing upper threshold to -516, size is 6796423(previously
> 6731677) ...
> Increasing upper threshold to -452, size is 6852266(previously
> 6796423) ...
> Increasing upper threshold to -388, size is 6903576(previously
> 6852266) ...
> Increasing upper threshold to -324, size is 6953100(previously
> 6903576) ...
> Increasing upper threshold to -260, size is 7002715(previously
> 6953100) ...
> No explosion before maximum upper threshold reached!
> Initial region size using thresholds [-2000, -900], is 4132452...
> Increasing upper threshold to -836, size is 5983514(previously
> 4132452) ...
> Increasing upper threshold to -772, size is 6367804(previously
> 5983514) ...
> Increasing upper threshold to -708, size is 6543232(previously
> 6367804) ...
> Increasing upper threshold to -644, size is 6651900(previously
> 6543232) ...
> Increasing upper threshold to -580, size is 6731677(previously
> 6651900) ...
> Increasing upper threshold to -516, size is 6796423(previously
> 6731677) ...
> Increasing upper threshold to -452, size is 6852266(previously
> 6796423) ...
> Increasing upper threshold to -388, size is 6903576(previously
> 6852266) ...
> Increasing upper threshold to -324, size is 6953100(previously
> 6903576) ...
> Increasing upper threshold to -260, size is 7002715(previously
> 6953100) ...
> No explosion before maximum upper threshold reached!
> Initial region size using thresholds [-2000, -900], is 4132529...
> Increasing upper threshold to -836, size is 5983584(previously
> 4132529) ...
> Increasing upper threshold to -772, size is 6367832(previously
> 5983584) ...
> Increasing upper threshold to -708, size is 6543243(previously
> 6367832) ...
> Increasing upper threshold to -644, size is 6651915(previously
> 6543243) ...
> Increasing upper threshold to -580, size is 6731693(previously
> 6651915) ...
> Increasing upper threshold to -516, size is 6796446(previously
> 6731693) ...
> Increasing upper threshold to -452, size is 6852292(previously
> 6796446) ...
> Increasing upper threshold to -388, size is 6903607(previously
> 6852292) ...
> Increasing upper threshold to -324, size is 6953136(previously
> 6903607) ...
> Increasing upper threshold to -260, size is 7002764(previously
> 6953136) ...
> No explosion before maximum upper threshold reached!
> Initial region size using thresholds [-2000, -900], is 4132696...
> Increasing upper threshold to -836, size is 5983512(previously
> 4132696) ...
> Increasing upper threshold to -772, size is 6367804(previously
> 5983512) ...
> Increasing upper threshold to -708, size is 6543232(previously
> 6367804) ...
> Increasing upper threshold to -644, size is 6651900(previously
> 6543232) ...
> Increasing upper threshold to -580, size is 6731677(previously
> 6651900) ...
> Increasing upper threshold to -516, size is 6796423(previously
> 6731677) ...
> Increasing upper threshold to -452, size is 6852266(previously
> 6796423) ...
> Increasing upper threshold to -388, size is 6903576(previously
> 6852266) ...
> Increasing upper threshold to -324, size is 6953100(previously
> 6903576) ...
> Increasing upper threshold to -260, size is 7002715(previously
> 6953100) ...
> No explosion before maximum upper threshold reached!
> Initial region size using thresholds [-2000, -900], is 4132831...
> Increasing upper threshold to -836, size is 5983556(previously
> 4132831) ...
> Increasing upper threshold to -772, size is 6367804(previously
> 5983556) ...
> Increasing upper threshold to -708, size is 6543232(previously
> 6367804) ...
> Increasing upper threshold to -644, size is 6651900(previously
> 6543232) ...
> Increasing upper threshold to -580, size is 6731677(previously
> 6651900) ...
> Increasing upper threshold to -516, size is 6796423(previously
> 6731677) ...
> Increasing upper threshold to -452, size is 6852266(previously
> 6796423) ...
> Increasing upper threshold to -388, size is 6903576(previously
> 6852266) ...
> Increasing upper threshold to -324, size is 6953100(previously
> 6903576) ...
> Increasing upper threshold to -260, size is 7002715(previously
> 6953100) ...
> No explosion before maximum upper threshold reached!
> Initial region size using thresholds [-2000, -900], is 4133404...
> Increasing upper threshold to -836, size is 5983569(previously
> 4133404) ...
> Increasing upper threshold to -772, size is 6367820(previously
> 5983569) ...
> Increasing upper threshold to -708, size is 6543232(previously
> 6367820) ...
> Increasing upper threshold to -644, size is 6651900(previously
> 6543232) ...
> Increasing upper threshold to -580, size is 6731677(previously
> 6651900) ...
> Increasing upper threshold to -516, size is 6796423(previously
> 6731677) ...
> Increasing upper threshold to -452, size is 6852266(previously
> 6796423) ...
> Increasing upper threshold to -388, size is 6903576(previously
> 6852266) ...
> Increasing upper threshold to -324, size is 6953100(previously
> 6903576) ...
> Increasing upper threshold to -260, size is 7002715(previously
> 6953100) ...
> No explosion before maximum upper threshold reached!
> Initial region size using thresholds [-2000, -900], is 4133715...
> Increasing upper threshold to -836, size is 5983572(previously
> 4133715) ...
> Increasing upper threshold to -772, size is 6367804(previously
> 5983572) ...
> Increasing upper threshold to -708, size is 6543232(previously
> 6367804) ...
> Increasing upper threshold to -644, size is 6651900(previously
> 6543232) ...
> Increasing upper threshold to -580, size is 6731677(previously
> 6651900) ...
> Increasing upper threshold to -516, size is 6796423(previously
> 6731677) ...
> Increasing upper threshold to -452, size is 6852266(previously
> 6796423) ...
> Increasing upper threshold to -388, size is 6903576(previously
> 6852266) ...
> Increasing upper threshold to -324, size is 6953100(previously
> 6903576) ...
> Increasing upper threshold to -260, size is 7002715(previously
> 6953100) ...
> No explosion before maximum upper threshold reached!
> 2 : Number of slices to skip to find trachea too high = 65
>
> itk::ExceptionObject (0x280e930)
> Location: "Unknown"
> File: /home/md1bat/Source/vv/segmentation/clitkExtractLungFilter.txx
> Line: 266
> Description: No seeds for trachea... Aborting.
>
>
>
>
>
> On 23 October 2013 22:38, Rômulo Pinho <romulopinho at yahoo.com.br
> <mailto:romulopinho at yahoo.com.br>> wrote:
>
> Ok, Bilal, thanks for the update.
> It's hard for me to check it now, because I'd have to
> download/compile the entire VV project plus ITK, VTK, etc.
> In any case, I still suggest you to play with the parameters of
> clitkExtracLung related to the extraction of the trachea. You can
> also post the output of --verboseRG on the list.
> Best,
> Rômulo
>
>
> On 23/10/2013 19:20, Bilal Tahir wrote:
>> Hi Rômulo,
>>
>> Thanks for your reply. Actually, Vivien had already converted
>> those images from matlab format to mhd. I double checked them and
>> he did indeed account for the signed/unsigned HU related issues.
>> Let me know and I could put one of the images up on dropbox. I'm
>> looking at their breath-hold copd data - not 4dct.
>>
>> Best wishes,
>>
>> Bilal
>>
>>
>>
>> On 23 October 2013 21:41, Rômulo Pinho <romulopinho at yahoo.com.br
>> <mailto:romulopinho at yahoo.com.br>> wrote:
>>
>> Hello, Bilal,
>>
>> I'd have to verify this (maybe Vivien can also comment on
>> that), but I think the dir-lab data are not in HU, i.e., the
>> grey values are all positive, from 0 to 4096. The algorithms
>> in clitkExtractLung apply some thresholding operations that
>> depend on a data set in HU, roughly from -1024 to 3072.
>>
>> To cope with it, you can either play with the parameters
>> seedPreProcessingThreshold and upperThresholdForTrachea in
>> clitkExtratLung (depending on TYPE)
>> "upperThresholdForTrachea" - "0: Initial upper
>> threshold for trachea" default="-900"
>> "seedPreProcessingThreshold" - "1: Threshold for the
>> pre-processing step of the algorithm" default="-400"
>>
>> or, to be on the safe side, shift your grey values prior to
>> launching clitkExtractLung. You can do it by creating an
>> image with -1024 everywhere (clitkCreateImage does the job)
>> and then applying the shift by adding the two images with
>> clitkImageArithm.
>>
>> In any case, using --verboseRG might also give some extra
>> insights.
>>
>> I hope this helps!
>>
>> Best,
>> Rômulo
>>
>>
>> On 23/10/2013 14:15, Bilal Tahir wrote:
>>> Thanks Vivien,
>>>
>>> I've got passed the .afdb stage. However I'm getting errors
>>> at the 'search for trachea' stage for both the original and
>>> LOLA11 algorithms. The dataset is the inspiration scans for
>>> patient 1 of the dir-lab copd data.
>>>
>>> 1) LOLA 11:
>>>
>>> [md1bat at testnode02 mhd]$ clitkExtractLung --verboseStep 1 -i
>>> copd1_00.mhd -a default.afdb -o 00_lungs.mhd --type=1
>>> Step 1 -- Copy and crop input image to 'patient' extends
>>> Step 2 -- Set background to initial image
>>> Step 3 -- Remove Air
>>> Step 4 -- Search for the trachea
>>>
>>> itk::InvalidRequestedRegionError (0x2bca660)
>>> Location: "unknown"
>>> File:
>>> /home/md1bat/Source/itk/Modules/Core/Common/src/itkDataObject.cxx
>>> Line: 411
>>> Description: Requested region is (at least partially)
>>> outside the largest possible region.
>>>
>>> 2) Original (type=0)
>>>
>>> [md1bat at testnode02 mhd]$ clitkExtractLung --verboseStep 1 -i
>>> copd1_00.mhd -a default.afdb -o 00_lungs.mhd --type=0
>>> Step 1 -- Copy and crop input image to 'patient' extends
>>> Step 2 -- Set background to initial image
>>> Step 3 -- Remove Air
>>> Step 4 -- Search for the trachea
>>> The volume of the trachea (4035.53 cc) seems not
>>> correct. I skip some slices (0) and restart to find seeds.
>>> The volume of the trachea (4037.01 cc) seems not
>>> correct. I skip some slices (5) and restart to find seeds.
>>> The volume of the trachea (4036.86 cc) seems not
>>> correct. I skip some slices (10) and restart to find seeds.
>>> The volume of the trachea (4036.39 cc) seems not
>>> correct. I skip some slices (15) and restart to find seeds.
>>> The volume of the trachea (4036.07 cc) seems not
>>> correct. I skip some slices (20) and restart to find seeds.
>>> The volume of the trachea (4035.31 cc) seems not
>>> correct. I skip some slices (25) and restart to find seeds.
>>> The volume of the trachea (4035.54 cc) seems not
>>> correct. I skip some slices (30) and restart to find seeds.
>>> The volume of the trachea (4035.49 cc) seems not
>>> correct. I skip some slices (35) and restart to find seeds.
>>> The volume of the trachea (4035.39 cc) seems not
>>> correct. I skip some slices (40) and restart to find seeds.
>>> The volume of the trachea (4035.57 cc) seems not
>>> correct. I skip some slices (45) and restart to find seeds.
>>> The volume of the trachea (4035.69 cc) seems not
>>> correct. I skip some slices (50) and restart to find seeds.
>>> The volume of the trachea (4036.09 cc) seems not
>>> correct. I skip some slices (55) and restart to find seeds.
>>> The volume of the trachea (4036.34 cc) seems not
>>> correct. I skip some slices (60) and restart to find seeds.
>>> 2 : Number of slices to skip to find trachea too high = 65
>>>
>>> itk::ExceptionObject (0x377f970)
>>> Location: "Unknown"
>>> File:
>>> /home/md1bat/Source/vv/segmentation/clitkExtractLungFilter.txx
>>> Line: 266
>>> Description: No seeds for trachea... Aborting.
>>>
>>> 3) Manually setting a higher number of slices than 65
>>>
>>> [md1bat at testnode02 mhd]$ clitkExtractLung --verbose 1 -i
>>> copd1_00.mhd -a default.afdb -o 00_lungs.mhd --skipslices=90
>>> Input is 3D short.
>>> Reading [copd1_00.mhd] ...
>>> 2 : Number of slices to skip to find trachea too high = 95
>>>
>>> itk::ExceptionObject (0x3a379d0)
>>> Location: "Unknown"
>>> File:
>>> /home/md1bat/Source/vv/segmentation/clitkExtractLungFilter.txx
>>> Line: 266
>>> Description: No seeds for trachea... Aborting.
>>>
>>> As you can see, I keep failing at the search trachea stage
>>> even by trying various different options for slices to skip
>>> for the trachea. Please let me know if you have any
>>> suggestions that can help.
>>>
>>> Best wishes,
>>>
>>> Bilal
>>>
>>>
>>> On 23 October 2013 16:51, Vivien Delmon
>>> <vivien.delmon at creatis.insa-lyon.fr
>>> <mailto:vivien.delmon at creatis.insa-lyon.fr>> wrote:
>>>
>>> On 10/18/2013 12:08 AM, Bilal Tahir wrote:
>>>
>>> Dear VV community,
>>>
>>> ...
>>>
>>>
>>> Also I would like to know if the LOLA11 paper below
>>> is the correct
>>> reference if I decide to use your method for
>>> publications?
>>>
>>> http://lola11.com/Results/displayApproved?result=20110708160218_86_CREATIS_CLB_Lyon_graphcut&file=20110708160218_86_CREATIS_CLB_Lyon_graphcut_lola11.pdf
>>>
>>>
>>> Part of the work presented in this paper have been
>>> implemented in clitkExtractLung but you need to
>>> explicitly ask the tool to use it :
>>>
>>> Step 2 : find trachea:
>>> --type=INT trachea finding algorithm (0: original;
>>> 1:LOLA11) (default=`0')
>>>
>>> The second part about graphcut labeling were not
>>> included in this tool since we never really need to
>>> separate lungs.
>>>
>>> Last time I tried to activate --type=1 it failed, I will
>>> have a look at it one day.
>>>
>>> As far as I know there is no other paper that describe
>>> what we have implemented in this tool, so this paper
>>> should be the one to cite.
>>>
>>> --
>>> Vivien Delmon
>>> PhD student at CREATIS, Lyon
>>> Supported by ANRT and ELEKTA
>>> http://www.creatis.insa-lyon.fr/rio
>>>
>>> _______________________________________________
>>> vv mailing list
>>> vv at creatis.insa-lyon.fr <mailto:vv at creatis.insa-lyon.fr>
>>> http://www.creatis.insa-lyon.fr/mailman/listinfo/vv
>>>
>>>
>>>
>>>
>>> --
>>> Bilal Tahir,
>>> James Morrison Researcher in Radiotherapy Imaging,
>>> Department of Clinical Oncology,
>>> University of Sheffield
>>>
>>>
>>> _______________________________________________
>>> vv mailing list
>>> vv at creatis.insa-lyon.fr <mailto:vv at creatis.insa-lyon.fr>
>>> http://www.creatis.insa-lyon.fr/mailman/listinfo/vv
>>
>>
>>
>>
>> --
>> Bilal Tahir,
>> James Morrison Researcher in Radiotherapy Imaging,
>> Department of Clinical Oncology,
>> University of Sheffield
>
>
>
>
> --
> Bilal Tahir,
> James Morrison Researcher in Radiotherapy Imaging,
> Department of Clinical Oncology,
> University of Sheffield
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.creatis.insa-lyon.fr/pipermail/vv/attachments/20131024/4895bc53/attachment-0001.html>
More information about the vv
mailing list