CIP settings to execute Python code in the Scripts folder of the CIP stored in Github

292 views
Skip to first unread message

Shahrokh Nasseri (PhD)

unread,
Nov 11, 2020, 5:19:25 AM11/11/20
to chestimagingp...@googlegroups.com

Hello Dears Chest Imaging Platform users


As mentioned in my previous message in the CIP groups, I was able to build CIP from source code.

To run the Python code in the Scripts folder, I need to do the following settings, which include:

- Add the paths of Python modules to the PYTHONPATH variable

- Define some variables such as CIP_PATH, TEEM_PATH, ITKTOOLS_PATH and PATH.


In continue, I shall point out to the buildng steps:


Building:

sn@MP:~$ mkdir ChestImagingPlatform-build

sn@MP:~$ cd ChestImagingPlatform-build

sn@MP:~/ChestImagingPlatform-build$ /home/sn/cmake-3.9.0-Linux-x86_64/bin/cmake ../ChestImagingPlatform

...

sn@MP:~/ChestImagingPlatform-build$ make

...

Scanning dependencies of target UpdateParticlesDataTest

[100%] Building CXX object CommandLineTools/LegacyCLIs/UpdateParticlesData/CMakeFiles/UpdateParticlesDataTest.dir/Testing/UpdateParticlesDataTest.cxx.o

[100%] Linking CXX executable ../../Testing/bin/UpdateParticlesDataTest

[100%] Built target UpdateParticlesDataTest

[ 98%] No install step for 'CIP'

[100%] Completed 'CIP'

[100%] Built target CIP

sn@MP:~/ChestImagingPlatform-build$


As seen above, all commands were executed without error.

In the following, I will explain the steps for defining variables and adding Python modules paths to PYTHONPATH.


sn@MP:~$ export PYTHONPATH=/home/sn/ChestImagingPlatform-build/CIP-build:/home/sn/ChestImagingPlatform-build/CIP-build:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python27.zip:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/plat-linux2:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/lib-tk:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/lib-old:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/lib-dynload:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/site-packages

sn@MP:~$ export CIP_PATH=/home/sn/ChestImagingPlatform/Scripts

sn@MP:~$ export TEEM_PATH=/home/sn/ChestImagingPlatform-build/teem-build/bin

sn@MP:~$ export ITKTOOLS_PATH=/home/sn/ChestImagingPlatform-build/ITKv4-build/bin

sn@MP:~$ export PATH=$PATH:/home/sn/ChestImagingPlatform-build/CIP-build/bin:/home/sn/ChestImagingPlatform-build/teem-build/bin

sn@MP:~$


In this step for example, I want to run the cip_compute_vessel_particles.py code to extract particles system on DICOM CT images .

As mentioned in the sections of Example0 and Example1 in the site of “GitHub - acil-bwh/CIPDocker: Dockerfile for Chest Imaging Platform”, at first I convert CT DICOM files to NRRD and then generate partial lung labelmap.


sn@MP:~$ mkdir ~/testCIP

sn@MP:~$ cp -rf /home/sn/CT/SR_4 ./testCIP/

sn@MP:~$ cd ./testCIP/

sn@MP:~/testCIP$ ConvertDicom --dir SR_4/ -o CT.nrrd

Getting file names...

Reading DICOM header information...

Modality: CT

Getting file names...

Reading DICOM image...

Writing converted image...

DONE.

sn@MP:~/testCIP$ GenerateMedianFilteredImage -i CT.nrrd -o CTFiltered_ct.nrrd

Reading CT from file...

Executing median filter...

Writing filtered image...

DONE.

sn@MP:~/testCIP$ GeneratePartialLungLabelMap --ict CTFiltered_ct.nrrd -o partialLungLabelMap.nrrd

Clipping low CT image values...

Clipping upper CT image values...

Executing partial lung filter...

Writing lung mask image...

DONE.

sn@MP:~/testCIP$



At now, I want to execute the python code of cip_compute_vessel_particles.py.


sn@MP:~/testCIP$ python /home/sn/ChestImagingPlatform/Scripts/cip_compute_vessel_particles.py -i CT.nrrd -l partialLungLabelMap.nrrd -r WholeLung --tmpDir /home/sn/testCIP -o particles.vtk

/home/sn/ChestImagingPlatform-build/CIP-build/bin/CropLung --cipr WholeLung -m 0 -v -1000 --ict CT.nrrd --ilm partialLungLabelMap.nrrd --oct /home/sn/testCIP/wholeLung/CT_wholeLung.nrrd --olm /home/sn/testCIP/wholeLung/CT_wholeLung_partialLungLabelMap.nrrd

Reading CT from file...

Reading label map from file...

Reading label map...

Extracting region and type...

Computing Bounding Box...

0: 36

1: 452

2: 109

3: 392

4: 0

5: 147

0: 36

1: 452

2: 109

3: 392

4: 0

Writing CT cropped image...

Writing cropped label map...

DONE.

/home/sn/ChestImagingPlatform-build/CIP-build/bin/ExtractChestLabelMap -r WholeLung -i /home/sn/testCIP/wholeLung/CT_wholeLung_partialLungLabelMap.nrrd -o /home/sn/testCIP/wholeLung/CT_wholeLung_partialLungLabelMap.nrrd

Reading...

Extracting...

Writing...

DONE.

unu 2op gt /home/sn/testCIP/wholeLung/CT_wholeLung_partialLungLabelMap.nrrd 0.5 -o /home/sn/testCIP/wholeLung/CT_wholeLung_partialLungLabelMap.nrrd

/home/sn/ITKTools/bin/bin/pxdistancetransform -in /home/sn/testCIP/wholeLung/CT_wholeLung_partialLungLabelMap.nrrd -out /home/sn/testCIP/wholeLung/CT_wholeLung_partialLungLabelMap.nrrd

unu 2op lt /home/sn/testCIP/wholeLung/CT_wholeLung_partialLungLabelMap.nrrd -2.000000 -t short -o /home/sn/testCIP/wholeLung/CT_wholeLung_partialLungLabelMap.nrrd

/home/sn/ChestImagingPlatform-build/CIP-build/bin/ComputeFeatureStrength -i /home/sn/testCIP/wholeLung/CT_wholeLung.nrrd -m Frangi -f RidgeLine --std 0.700000,4.000000,7 --ssm 1 --alpha 0.63 --beta 0.51 --C 245 -o /home/sn/testCIP/wholeLung/CT_wholeLung_featureMap.nrrd

Reading CT from file...

0.7 4 7

DONE.

unu 2op x /home/sn/testCIP/wholeLung/CT_wholeLung_featureMap.nrrd /home/sn/testCIP/wholeLung/CT_wholeLung_partialLungLabelMap.nrrd -t float | unu heq -b 10000 -a 0.96 -s 5 | unu 2op gt - 0.380000 | unu convert -t short -o /home/sn/testCIP/wholeLung/CT_wholeLung_mask.nrrd

DONE.

Resetting param groups...

Building param groups...

Starting pass 1...

gageStackBlurGet: no file "/home/sn/testCIP/wholeLung/V-000-010.nrrd"; will recompute blurrings

gageStackBlur: (FFT-based blurring not applicable: need spatial blur=no, boundary=bleed, kernel=discretegauss:1,5)

_stackBlurSpatial: . . . blurring 0 / 10 (scale 0) . . .

_stackBlurSpatial: scale 0 == time 0 (tau 0);

timeLeft 0 = 0 - 0

pass 0 (timeLeft=0 => time=0, sigma=0) ...

done.

_stackBlurSpatial: . . . blurring 1 / 10 (scale 0.279195) . . .

_stackBlurSpatial: scale 0.279195 == time 0.07795 (tau 0.0222845);

timeLeft 0.07795 = 0.07795 - 0

pass 0 (timeLeft=0.07795 => time=0.07795, sigma=0.279195) ...

done.

_stackBlurSpatial: . . . blurring 2 / 10 (scale 0.568784) . . .

_stackBlurSpatial: scale 0.568784 == time 0.323515 (tau 0.103074);

timeLeft 0.245565 = 0.323515 - 0.07795

pass 0 (timeLeft=0.245565 => time=0.245565, sigma=0.495546) ...

done.

_stackBlurSpatial: . . . blurring 3 / 10 (scale 0.885916) . . .

_stackBlurSpatial: scale 0.885916 == time 0.784848 (tau 0.293208);

timeLeft 0.461333 = 0.784848 - 0.323515

pass 0 (timeLeft=0.461333 => time=0.461333, sigma=0.679215) ...

done.

_stackBlurSpatial: . . . blurring 4 / 10 (scale 1.26313) . . .

_stackBlurSpatial: scale 1.26313 == time 1.59551 (tau 0.649332);

timeLeft 0.810657 = 1.59551 - 0.784848

pass 0 (timeLeft=0.810657 => time=0.810657, sigma=0.900365) ...

done.

_stackBlurSpatial: . . . blurring 5 / 10 (scale 1.72014) . . .

_stackBlurSpatial: scale 1.72014 == time 2.95889 (tau 1.02565);

timeLeft 1.36339 = 2.95889 - 1.59551

pass 0 (timeLeft=1.36339 => time=1.36339, sigma=1.16764) ...

done.

_stackBlurSpatial: . . . blurring 6 / 10 (scale 2.38512) . . .

_stackBlurSpatial: scale 2.38512 == time 5.6888 (tau 1.38159);

timeLeft 2.72991 = 5.6888 - 2.95889

pass 0 (timeLeft=2.72991 => time=2.72991, sigma=1.65224) ...

done.

_stackBlurSpatial: . . . blurring 7 / 10 (scale 3.39289) . . .

_stackBlurSpatial: scale 3.39289 == time 11.5117 (tau 1.74687);

timeLeft 5.82289 = 11.5117 - 5.6888

pass 0 (timeLeft=5.82289 => time=5.82289, sigma=2.41307) ...

done.

_stackBlurSpatial: . . . blurring 8 / 10 (scale 4.62553) . . .

_stackBlurSpatial: scale 4.62553 == time 21.3955 (tau 2.06214);

timeLeft 9.88384 = 21.3955 - 11.5117

pass 0 (timeLeft=9.88384 => time=9.88384, sigma=3.14386) ...

done.

_stackBlurSpatial: . . . blurring 9 / 10 (scale 6) . . .

_stackBlurSpatial: scale 6 == time 36 (tau 2.32478);

timeLeft 14.6045 = 36 - 21.3955

pass 0 (timeLeft=14.6045 => time=14.6045, sigma=3.82158) ...

done.

puller: trouble starting system:

[pull] pullStart: trouble starting to set up context

[pull] _pullVolumeSetup: need equal shapes, but vol 0 and 2 different

[pull] [gage] gageShapeEqual: ItoW matrices of V and M not the same

Finished pass 1.

Starting pass 2...

ERROR: error parsing "/home/sn/testCIP/wholeLung/pass1.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/pass1.nrrd","rb") failed: No such file or directory



Usage: puller [@file ...] [-int <int>] [-enr <spec>] [-ens <spec>] \

...

Finished pass 2.

Starting pass 3...

ERROR: error parsing "/home/sn/testCIP/wholeLung/pass2.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/pass2.nrrd","rb") failed: No such file or directory



Usage: puller [@file ...] [-int <int>] [-enr <spec>] [-ens <spec>] \

...

Finished pass 3.

Probing...

ERROR: error parsing "/home/sn/testCIP/wholeLung/pass3.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/pass3.nrrd","rb") failed: No such file or directory



Usage: gprobe -i <nin> -k <kind> [-v <verbosity>] -q <query> [-gmc <min \

...


ERROR: error parsing "/home/sn/testCIP/wholeLung/pass3.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/pass3.nrrd","rb") failed: No such file or directory



Usage: gprobe -i <nin> -k <kind> [-v <verbosity>] -q <query> [-gmc <min \

...


ERROR: error parsing "/home/sn/testCIP/wholeLung/pass3.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/pass3.nrrd","rb") failed: No such file or directory



Usage: gprobe -i <nin> -k <kind> [-v <verbosity>] -q <query> [-gmc <min \

...


ERROR: error parsing "/home/sn/testCIP/wholeLung/pass3.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/pass3.nrrd","rb") failed: No such file or directory



Usage: gprobe -i <nin> -k <kind> [-v <verbosity>] -q <query> [-gmc <min \

...


ERROR: error parsing "/home/sn/testCIP/wholeLung/pass3.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/pass3.nrrd","rb") failed: No such file or directory



Usage: gprobe -i <nin> -k <kind> [-v <verbosity>] -q <query> [-gmc <min \

...


ERROR: error parsing "/home/sn/testCIP/wholeLung/pass3.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/pass3.nrrd","rb") failed: No such file or directory



Usage: gprobe -i <nin> -k <kind> [-v <verbosity>] -q <query> [-gmc <min \

...


ERROR: error parsing "/home/sn/testCIP/wholeLung/pass3.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/pass3.nrrd","rb") failed: No such file or directory



Usage: gprobe -i <nin> -k <kind> [-v <verbosity>] -q <query> [-gmc <min \

...


ERROR: error parsing "/home/sn/testCIP/wholeLung/pass3.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/pass3.nrrd","rb") failed: No such file or directory



Usage: gprobe -i <nin> -k <kind> [-v <verbosity>] -q <query> [-gmc <min \

...


ERROR: error parsing "/home/sn/testCIP/wholeLung/pass3.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/pass3.nrrd","rb") failed: No such file or directory



Usage: gprobe -i <nin> -k <kind> [-v <verbosity>] -q <query> [-gmc <min \

...


Finished probing.

Saving to vtk...

-o particles.vtk_wholeLungVesselParticles.vtk -b -i /home/sn/testCIP/wholeLung/pass3.nrrd -a NA -i /home/sn/testCIP/wholeLung/hevec1.nrrd -a hevec1 -i /home/sn/testCIP/wholeLung/hevec0.nrrd -a hevec0 -i /home/sn/testCIP/wholeLung/val.nrrd -a val -i /home/sn/testCIP/wholeLung/hevec2.nrrd -a hevec2 -i /home/sn/testCIP/wholeLung/heval0.nrrd -a h0 -i /home/sn/testCIP/wholeLung/heval1.nrrd -a h1 -i /home/sn/testCIP/wholeLung/heval2.nrrd -a h2 -i /home/sn/testCIP/wholeLung/hess.nrrd -a hess -i /home/sn/testCIP/wholeLung/hmode.nrrd -a hmode --irad 0.8 --srad 4 --liveth -90 --seedth -70 --spacing 0.763,0.763,2.0 --cipr UndefinedRegion --cipt Vessel

Reading file for NA...

Exception caught reading input:

itk::ImageFileReaderException (0x557f357f4a10)

Location: "unknown"

File: /home/sn/ChestImagingPlatform-build/ITKv4/Modules/IO/ImageBase/include/itkImageFileReader.hxx

Line: 143

Description: Could not create IO object for reading file /home/sn/testCIP/wholeLung/pass3.nrrd

The file doesn't exist.

Filename = /home/sn/testCIP/wholeLung/pass3.nrrd




sn@MP:~/testCIP$ ll -h

total 72M

drwxr-xr-x 4 sn sn 4.0K Nov 11 12:11 ./

drwxr-xr-x 157 sn sn 12K Nov 11 12:02 ../

-rw-r--r-- 1 sn sn 34M Nov 11 12:08 CTFiltered_ct.nrrd

-rw-r--r-- 1 sn sn 38M Nov 11 12:07 CT.nrrd

-rw-r--r-- 1 sn sn 320K Nov 11 12:10 partialLungLabelMap.nrrd

drwxr-xr-x 2 sn sn 4.0K Nov 11 12:07 SR_4/

drwxr-xr-x 2 sn sn 4.0K Nov 11 12:13 wholeLung/

sn@MP:~/testCIP$ ll -h wholeLung/

total 922M

drwxr-xr-x 2 sn sn 4.0K Nov 11 12:13 ./

drwxr-xr-x 4 sn sn 4.0K Nov 11 12:11 ../

-rw-r--r-- 1 sn sn 67M Nov 11 12:12 ct-deconv.nrrd

-rw-r--r-- 1 sn sn 98M Nov 11 12:12 CT_wholeLung_featureMap.nrrd

-rw-r--r-- 1 sn sn 34M Nov 11 12:12 CT_wholeLung_mask.nrrd

-rw-r--r-- 1 sn sn 22M Nov 11 12:11 CT_wholeLung.nrrd

-rw-r--r-- 1 sn sn 34M Nov 11 12:11 CT_wholeLung_partialLungLabelMap.nrrd

-rw-r--r-- 1 sn sn 67M Nov 11 12:13 V-000-010.nrrd

-rw-r--r-- 1 sn sn 67M Nov 11 12:13 V-001-010.nrrd

-rw-r--r-- 1 sn sn 67M Nov 11 12:13 V-002-010.nrrd

-rw-r--r-- 1 sn sn 67M Nov 11 12:13 V-003-010.nrrd

-rw-r--r-- 1 sn sn 67M Nov 11 12:13 V-004-010.nrrd

-rw-r--r-- 1 sn sn 67M Nov 11 12:13 V-005-010.nrrd

-rw-r--r-- 1 sn sn 67M Nov 11 12:13 V-006-010.nrrd

-rw-r--r-- 1 sn sn 67M Nov 11 12:13 V-007-010.nrrd

-rw-r--r-- 1 sn sn 67M Nov 11 12:13 V-008-010.nrrd

-rw-r--r-- 1 sn sn 67M Nov 11 12:13 V-009-010.nrrd

sn@MP:~/testCIP$


As seen aboe, I get some error messages. I really do not know how to solve it.

I'm not sure, but maybe this error is related to my CT images. For it, I share link this file (CT.nrrd) in Dropbox. Please check it when running cip_compute_vessel_particles.py code and please give me feedback.


Dropbox link:

https://www.dropbox.com/s/tmi8r2pbqg7ujbp/CT.nrrd?dl=0


Please help and guide me.

Shahrokh.




Shahrokh Nasseri

Assistant Professor of Medical Physics

Department and Research Center of Medical Physics

Mashhad University of Medical Sciences

Mashhad, Iran

Tel: +98 513 8002328
Fax: +98 513 8002 320
e-mail: nase...@mums.ac.ir, shahrokh...@gmail.com

San Jose Estepar, Raul,Ph.D.

unread,
Nov 11, 2020, 9:25:38 AM11/11/20
to Shahrokh Nasseri (PhD), chestimagingp...@googlegroups.com
Hi Shahrokh,


Regarding your initial email, we rely on ITKTools but CIP does not bundle that. You have to install it (https://github.com/ITKTools/ITKTools) and add the tool to your path as you are describing.

In relation to this new issue, the problem is that the volume does not match in space. Something this occurs because there are floating precision inconsistencies. You can override this sanity check adding the option “-usa” to puller. This will allow the different volumes involved to have different shapes.

That should take care of that issue.

Thanks

Raul

On Nov 11, 2020, at 5:18 AM, Shahrokh Nasseri (PhD) <Nase...@mums.ac.ir> wrote:

        External Email - Use Caution        
-- 
You received this message because you are subscribed to the Google Groups "ChestImagingPlatform-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chestimagingplatfor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chestimagingplatform-users/baf95578470440eea3a74384266a3a95%40mums.ac.ir.

The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at http://www.massgeneralbrigham.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.

Shahrokh Nasseri (PhD)

unread,
Nov 11, 2020, 9:36:08 AM11/11/20
to San Jose Estepar, Raul,Ph.D., chestimagingp...@googlegroups.com

Hello Dear Raul


Thank you very very much for your reply and help me…


Can you do sanity check?

You told me that “You can override this sanity check adding the option “-usa” to puller”.

Where and how should I do this?


Do I have to do this in the file of cip_compute_vessel_particles.py code?


I look forward to hearing from you soon.

Best regards.

Shahrokh.



Shahrokh Nasseri

Assistant Professor of Medical Physics

Department and Research Center of Medical Physics

Mashhad University of Medical Sciences

Mashhad, Iran

Tel: +98 513 8002328
Fax: +98 513 8002 320
e-mail: nase...@mums.ac.ir, shahrokh...@gmail.com

From: San Jose Estepar, Raul,Ph.D. <RSAN...@BWH.HARVARD.EDU>
Sent: Wednesday, November 11, 2020 5:55:31 PM
To: Shahrokh Nasseri (PhD)
Cc: chestimagingp...@googlegroups.com
Subject: Re: CIP settings to execute Python code in the Scripts folder of the CIP stored in Github
 

Shahrokh Nasseri (PhD)

unread,
Nov 11, 2020, 9:49:02 AM11/11/20
to San Jose Estepar, Raul,Ph.D., chestimagingp...@googlegroups.com

Dear Raul

Excuse me... this may be too preliminary…


I do not see the puller command being called in this code. Where should I add this option?


Best regards.

Shahrokh



From: Shahrokh Nasseri (PhD)
Sent: Wednesday, November 11, 2020 6:05:05 PM
To: San Jose Estepar, Raul,Ph.D.

San Jose Estepar, Raul,Ph.D.

unread,
Nov 11, 2020, 11:05:30 AM11/11/20
to Shahrokh Nasseri (PhD), chestimagingp...@googlegroups.com
Hi Shahrokh,

Puller is used by the particle wrapper class VesselParticles. If this is what you are using, you can set the permissive flag to True in the constructor. This will set up the proper params to avoid this issue.

Thanks

Raul

From: Shahrokh Nasseri (PhD) <Nase...@mums.ac.ir>
Sent: Wednesday, November 11, 2020 9:47 AM
To: San Jose Estepar, Raul,Ph.D. <RSAN...@BWH.HARVARD.EDU>
Cc: chestimagingp...@googlegroups.com <chestimagingp...@googlegroups.com>

Subject: Re: CIP settings to execute Python code in the Scripts folder of the CIP stored in Github
 

        External Email - Use Caution        

Shahrokh Nasseri (PhD)

unread,
Nov 12, 2020, 2:48:54 AM11/12/20
to San Jose Estepar, Raul,Ph.D., chestimagingp...@googlegroups.com

Hello Dear Raul


Thank you very much for your guidance.

Although I am very eager to extract particles according to your guidance in the last message as soon as possible, unfortunately I will not have access to my computer for the next two days.


Anyway, you mentioned that “you can set the permissive flag to True in the constructor.”  

Do you mean lines 19 and 20 in the file of cip_compute_vessel_particles.py?

In other words, is it true that I edit the following lines From

def __init__(self, ct_file_name, pl_file_name, regions, tmp_dir, output_prefix, init_method='Frangi', lth=-125,sth=-100, voxel_size=0, min_scale=0.7, max_scale=4, crop=0, rate=1, multires=False, justparticles=False, clean_cache=True):

To

def __init__(self, ct_file_name, pl_file_name, regions, tmp_dir, output_prefix, init_method='Frangi', lth=-125,sth=-100, voxel_size=0, min_scale=0.7, max_scale=4, crop=0, rate=1, multires=True, justparticles=True, clean_cache=True):

 

?

Best regards.

Shahrokh



From: San Jose Estepar, Raul,Ph.D. <RSAN...@BWH.HARVARD.EDU>
Sent: Wednesday, November 11, 2020 7:34 PM

San Jose Estepar, Raul,Ph.D.

unread,
Nov 12, 2020, 9:52:18 AM11/12/20
to Shahrokh Nasseri (PhD), chestimagingp...@googlegroups.com
Hi Shahrokh,

My guess is that you are on the master branch. I would use the develop branch. The permissive was not added into the master.

Thanks

Raul

Shahrokh Nasseri (PhD)

unread,
Nov 14, 2020, 3:14:58 AM11/14/20
to San Jose Estepar, Raul,Ph.D., chestimagingp...@googlegroups.com

Hello Dear Raul


Thanks a lot for your help.


As you told me I get develop branch. I enter the following commands and unfortunately I get error message when making it about Not File of itkMultiThreaderBase.h.


sn@MP:~$ git clone -b develop https://github.com/acil-bwh/ChestImagingPlatform.git

sn@MP:~$ mkdir ChestImagingPlatform-build

sn@MP:~$ cd ChestImagingPlatform-build

sn@MP:~/ChestImagingPlatform-build$ /home/sn/cmake-3.9.0-Linux-x86_64/bin/cmake ../ChestImagingPlatform

-- The C compiler identification is GNU 7.5.0

-- The CXX compiler identification is GNU 7.5.0

-- Check for working C compiler: /usr/bin/cc

-- Check for working C compiler: /usr/bin/cc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Detecting C compile features

-- Detecting C compile features - done

-- Check for working CXX compiler: /usr/bin/c++

-- Check for working CXX compiler: /usr/bin/c++ -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done

-- - C++11

----------- ENTRY ------------

Configuring Superbuild...

-- Setting build type to 'Release' as none was specified and there are not CMAKE_CONFIGURATION_TYPES

-- Found Git: /usr/bin/git (found version "2.17.1")

Using /home/sn/ChestImagingPlatform-build/CIPPython-install/bin/python2.7 as the active Python

-- PRIMARY_PROJECT_NAME_DEPENDENCIES: CIPPython;SlicerExecutionModel;VTKv8;ITKv4;Boost;teem

-- SuperBuild - First pass

Python Deep Learning modules (tensorflow) will be installed

-- SuperBuild - First pass - done

-- SuperBuild - CIP => Requires CIPPython[INCLUDED], SlicerExecutionModel, VTKv8, ITKv4, Boost[INCLUDED], teem,

-- SuperBuild - SlicerExecutionModel => Requires ITKv4,

-- SuperBuild - ITKv4 => Requires zlib, VTKv8,

-- SuperBuild - zlib[OK]

-- SuperBuild - ZLIB_INCLUDE_DIR:/home/sn/ChestImagingPlatform-build/zlib-install/include

-- SuperBuild - ZLIB_LIBRARY:/home/sn/ChestImagingPlatform-build/zlib-install/lib/libzlib.a

-- SuperBuild - ZLIB_ROOT:/home/sn/ChestImagingPlatform-build/zlib-install

-- SuperBuild - VTKv8 => Requires zlib[INCLUDED], Boost[INCLUDED],

-- SuperBuild - VTKv8[OK]

-- SuperBuild - PNG_INCLUDE_DIR:/home/sn/ChestImagingPlatform-build/VTKv8/Utilities/vtkpng

-- SuperBuild - PNG_LIBRARY:/home/sn/ChestImagingPlatform-build/VTKv8-build/bin/libvtkpng.so

-- SuperBuild - LIBXML_INCLUDE_DIR:/home/sn/ChestImagingPlatform-build/VTKv8/ThirdParty/libxml2/vtklibxml2

-- SuperBuild - ITKv4[OK]

-- SuperBuild - SlicerExecutionModel[OK]

-- SuperBuild - teem => Requires zlib[INCLUDED], VTKv8[INCLUDED],

-- SuperBuild - teem[OK]

-- SuperBuild - CIP[OK]

----------- DONE ------------

-- Configuring done

-- Generating done

-- Build files have been written to: /home/sn/ChestImagingPlatform-build

sn@MP:~/ChestImagingPlatform-build$ make

[ 14%] Linking CXX static library ../../bin/libExampleCLILib.a

[ 14%] Built target ExampleCLILib

Scanning dependencies of target ExampleCLI

[ 14%] Building CXX object CommandLineTools/ExampleCLI/CMakeFiles/ExampleCLI.dir/home/sn/ChestImagingPlatform-build/SlicerExecutionModel/CMake/SEMCommandLineLibraryWrapper.cxx.o

[ 14%] Linking CXX executable ../../bin/ExampleCLI

Copying XML file 'ExampleCLI.xml' along side the executable

[ 14%] Built target ExampleCLI

Scanning dependencies of target ExampleCLITest

[ 14%] Building CXX object CommandLineTools/ExampleCLI/CMakeFiles/ExampleCLITest.dir/Testing/ExampleCLITest.cxx.o

In file included from /home/sn/ChestImagingPlatform/CommandLineTools/ExampleCLI/Testing/ExampleCLITest.cxx:1:0:

/home/sn/ChestImagingPlatform/CommandLineTools/Testing/itkTestMain.h:41:10: fatal error: itkMultiThreaderBase.h: No such file or directory

#include "itkMultiThreaderBase.h"

^~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated.

CommandLineTools/ExampleCLI/CMakeFiles/ExampleCLITest.dir/build.make:62: recipe for target 'CommandLineTools/ExampleCLI/CMakeFiles/ExampleCLITest.dir/Testing/ExampleCLITest.cxx.o' failed

make[5]: *** [CommandLineTools/ExampleCLI/CMakeFiles/ExampleCLITest.dir/Testing/ExampleCLITest.cxx.o] Error 1

CMakeFiles/Makefile2:2046: recipe for target 'CommandLineTools/ExampleCLI/CMakeFiles/ExampleCLITest.dir/all' failed

make[4]: *** [CommandLineTools/ExampleCLI/CMakeFiles/ExampleCLITest.dir/all] Error 2

Makefile:140: recipe for target 'all' failed

make[3]: *** [all] Error 2

CMakeFiles/CIP.dir/build.make:118: recipe for target 'CIP-prefix/src/CIP-stamp/CIP-build' failed

make[2]: *** [CIP-prefix/src/CIP-stamp/CIP-build] Error 2

CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/CIP.dir/all' failed

make[1]: *** [CMakeFiles/CIP.dir/all] Error 2

Makefile:94: recipe for target 'all' failed

make: *** [all] Error 2

sn@MP:~/ChestImagingPlatform-build$


I search the include file of itkMultiThreaderBase.h. I get the following locations.


sn@MP:~/ChestImagingPlatform-build$ sudo updatedb

[sudo] password for sn:

sn@MP:~/ChestImagingPlatform-build$ locate itkMultiThreaderBase.h

/home/sn/ITK/Modules/Core/Common/include/itkMultiThreaderBase.h

/usr/local/include/ITK-5.1/itkMultiThreaderBase.h

sn@MP:~/ChestImagingPlatform-build$


As seen above, this file (itkMultiThreaderBase.h) is not here.

I include these files with these locations in the file of itkTestMain.h, I get many error messages.


Anyway, I must mentioned that the file of itkMultiThreader.h (Not itkMultiThreaderBase.h) is included in the file of itkTestMain.h on Master branch.


In other words this file (itkMultiThreader.h) is available on Master branch.

In my case when building of Develop branch, I do not have the file of itkMultiThreaderBase.h on Develop branch.


itkTestMain.h on Develop branch:

...

#include "itkMultiThreaderBase.h"

...


itkTestMain.h on Master branch:

...

#include "itkMultiThreader.h"
...

Please guide me.

Best regards.

Shahrokh.




From: San Jose Estepar, Raul,Ph.D. <RSAN...@BWH.HARVARD.EDU>
Sent: Thursday, November 12, 2020 6:22 PM

Shahrokh Nasseri (PhD)

unread,
Nov 14, 2020, 7:17:32 AM11/14/20
to San Jose Estepar, Raul,Ph.D., chestimagingp...@googlegroups.com

Hello Dear Raul


I guessed that the inculde file of itkMultiThreaderBase.h is in ITK version 5. So I changed ITK_VERSION_MAJOR from 4 to 5 when doing ccmake as following:


sn@MP:~$ cd /home/sn/ChestImagingPlatform-build

sn@MP:~/ChestImagingPlatform-build$ /home/sn/cmake-3.10.2-Linux-x86_64/bin/ccmake ../ChestImagingPlatform

...

Press [c] to configure

...

Page 1 of 1

BUILD_STYLE_UTILS              ON

BUILD_TESTING                  ON

CIP_PYTHON_INSTALL             ON

CIP_PYTHON_INSTALL_DIR         /home/sn/ChestImagingPlatform-build/CIPPython-install

CIP_PYTHON_INSTALL_DL_TOOLS    ON

CIP_PYTHON_SOURCE_DIR          /home/sn/ChestImagingPlatform-build/CIPPython

CIP_PYTHON_USE_QT4             OFF

CIP_SUPERBUILD                 ON

CIP_USE_GIT_PROTOCOL           ON

CIP_VTK_RENDERING_BACKEND      OpenGL2

CMAKE_BUILD_TYPE               Release

CMAKE_INCLUDE_DIRECTORIES_BEFO ON

CMAKE_INSTALL_PREFIX           /usr/local

EXTERNAL_PROJECT_BUILD_TYPE    Release

FORCE_EXTERNAL_BUILDS          OFF

FORCE_SYSTEM_LIBXML            OFF

ITK_VERSION_MAJOR              5 

PYTHON_EXECUTABLE              /home/sn/ChestImagingPlatform-build/CIPPython-install/bin/python2.7

USE_BOOST                      ON

USE_ITK_4.10                   OFF

USE_SYSTEM_Cppcheck            OFF

USE_SYSTEM_DCMTK               OFF

USE_SYSTEM_ITK                 OFF

USE_SYSTEM_KWStyle             OFF

USE_SYSTEM_SlicerExecutionMode OFF

USE_SYSTEM_Uncrustify          OFF

USE_SYSTEM_VTK                 OFF

USE_SYSTEM_zlib                OFF

VTK_VERSION_MAJOR              8

...

Press [g] to generate and exit

...

sn@MP:~/ChestImagingPlatform-build$ 


At now, I make it and unfortunately I get the following error message.

sn@MP:~/ChestImagingPlatform-build$ make

[ 90%] Generating SegmentLungAirwaysCLP.h

GenerateCLP --InputXML /home/sn/ChestImagingPlatform/CommandLineTools/SegmentLungAirways/SegmentLungAirways.xml --OutputCxx /home/sn/ChestImagingPlatform-build/CIP-build/CommandLineTools/SegmentLungAirways/SegmentLungAirwaysCLP.h

GenerateCLP: Found 2 parameters groups

GenerateCLP: Group "Segmentation Parameters" has 1 parameters

GenerateCLP: Group "IO" has 4 parameters

Scanning dependencies of target SegmentLungAirwaysLib

[ 90%] Building CXX object CommandLineTools/SegmentLungAirways/CMakeFiles/SegmentLungAirwaysLib.dir/SegmentLungAirways.cxx.o

/home/sn/ChestImagingPlatform/CommandLineTools/SegmentLungAirways/SegmentLungAirways.cxx: In function ‘int ModuleEntryPoint(int, char**)’:

/home/sn/ChestImagingPlatform/CommandLineTools/SegmentLungAirways/SegmentLungAirways.cxx:1835:33: error: ‘PACK’ is not a member of ‘itk’

mergeFilter->SetMethod(itk::PACK);

^~~~

CommandLineTools/SegmentLungAirways/CMakeFiles/SegmentLungAirwaysLib.dir/build.make:68: recipe for target 'CommandLineTools/SegmentLungAirways/CMakeFiles/SegmentLungAirwaysLib.dir/SegmentLungAirways.cxx.o' failed

make[5]: *** [CommandLineTools/SegmentLungAirways/CMakeFiles/SegmentLungAirwaysLib.dir/SegmentLungAirways.cxx.o] Error 1

CMakeFiles/Makefile2:12105: recipe for target 'CommandLineTools/SegmentLungAirways/CMakeFiles/SegmentLungAirwaysLib.dir/all' failed

make[4]: *** [CommandLineTools/SegmentLungAirways/CMakeFiles/SegmentLungAirwaysLib.dir/all] Error 2

Makefile:140: recipe for target 'all' failed

make[3]: *** [all] Error 2

CMakeFiles/CIP.dir/build.make:118: recipe for target 'CIP-prefix/src/CIP-stamp/CIP-build' failed

make[2]: *** [CIP-prefix/src/CIP-stamp/CIP-build] Error 2

CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/CIP.dir/all' failed

make[1]: *** [CMakeFiles/CIP.dir/all] Error 2

Makefile:94: recipe for target 'all' failed

make: *** [all] Error 2

sn@MP:~/ChestImagingPlatform-build$


At now, how can I fix this error?



Anyway, I checked that the include file of itkMultiThreaderBase.h is existed.


sn@MP:~/ChestImagingPlatform-build$ sudo updatedb

[sudo] password for sn:

sn@MP:~/ChestImagingPlatform-build$ locate itkMultiThreaderBase.h

/home/sn/ChestImagingPlatform-build/ITKv5/Modules/Core/Common/include/itkMultiThreaderBase.h

/home/sn/ITK/Modules/Core/Common/include/itkMultiThreaderBase.h

/usr/local/include/ITK-5.1/itkMultiThreaderBase.h

sn@MP:~/ChestImagingPlatform-build$ ll -h /home/sn/ChestImagingPlatform-build/ITKv5/Modules/Core/Common/include/itkMultiThreaderBase.h

-rw-r--r-- 1 sn sn 17K Nov 14 13:28 /home/sn/ChestImagingPlatform-build/ITKv5/Modules/Core/Common/include/itkMultiThreaderBase.h

sn@MP:~/ChestImagingPlatform-build$


As seen above with changing ITK_VERSION_MAJOR from 4 to 5, I have itkMultiThreaderBase.h in the path of /home/sn/ChestImagingPlatform-build/ITKv5/Modules/Core/Common/include/.

So the problem of NOT finding the include file (itkMultiThreaderBase.h) is solved by changing the ITK version from 4 to 5.


Please help me to solve the problem of error: ‘PACK’ is not a member of ‘itk’.



Please help me.

Best regards.

Shahrokh.




From: Shahrokh Nasseri (PhD)
Sent: Saturday, November 14, 2020 11:43 AM

To: San Jose Estepar, Raul,Ph.D.

Shahrokh Nasseri (PhD)

unread,
Nov 14, 2020, 8:23:31 AM11/14/20
to San Jose Estepar, Raul,Ph.D., chestimagingp...@googlegroups.com

Hello Dear Raul


I think the problem is solved using the changes that were mentioned in github.

I edit the file of /home/sn/ChestImagingPlatform/CommandLineTools/SegmentLungAirways/SegmentLungAirways.cxx.


In Line 1835 From:

...

mergeFilter->SetMethod(itk::PACK);

...

To

...

mergeFilter->SetMethod(MergeFilterType::PACK);


After doing it, I make again.


At this time, the make process was done without error.


sn@MP:~/ChestImagingPlatform-build$ make

...

[ 99%] Building CXX object CommandLineTools/LegacyCLIs/UpdateParticlesData/CMakeFiles/UpdateParticlesData.dir/home/sn/ChestImagingPlatform-build/SlicerExecutionModel/CMake/SEMCommandLineLibraryWrapper.cxx.o

[ 99%] Linking CXX executable ../../../bin/UpdateParticlesData

Copying XML file 'UpdateParticlesData.xml' along side the executable

[ 99%] Built target UpdateParticlesData

Scanning dependencies of target UpdateParticlesDataTest

[100%] Building CXX object CommandLineTools/LegacyCLIs/UpdateParticlesData/CMakeFiles/UpdateParticlesDataTest.dir/Testing/UpdateParticlesDataTest.cxx.o

[100%] Linking CXX executable ../../Testing/bin/UpdateParticlesDataTest

[100%] Built target UpdateParticlesDataTest

[ 94%] No install step for 'CIP'

[ 95%] Completed 'CIP'

[100%] Built target CIP

sn@MP:~/ChestImagingPlatform-build$


In your opinion, is it true?

Best regards.

Shahrokh



From: Shahrokh Nasseri (PhD)
Sent: Saturday, November 14, 2020 3:45 PM

Shahrokh Nasseri (PhD)

unread,
Nov 14, 2020, 9:20:29 AM11/14/20
to San Jose Estepar, Raul,Ph.D., chestimagingp...@googlegroups.com

Hello Dear Raul


At now, I want to check CIP installation on develop branch as following lines:


sn@MP:~$ export PYTHONPATH=/home/sn/ChestImagingPlatform-build/CIP-build:/home/sn/ChestImagingPlatform-build/CIP-build:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python27.zip:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/plat-linux2:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/lib-tk:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/lib-old:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/lib-dynload:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/site-packages

sn@MP:~$ export CIP_PATH=/home/sn/ChestImagingPlatform/Scripts

sn@MP:~$ export TEEM_PATH=/home/sn/ChestImagingPlatform-build/teem-build/bin

sn@MP:~$ export ITKTOOLS_PATH=/home/sn/ChestImagingPlatform-build/ITKv4-build/bin

sn@MP:~$ export PATH=$PATH:/home/sn/ChestImagingPlatform-build/CIP-build/bin:/home/sn/ChestImagingPlatform-build/teem-build/bin

sn@MP:~$ cd testCIP/

sn@MP:~/testCIP$ ls

SR_4


sn@MP:~/testCIP$ ConvertDicom --dir SR_4/ -o CT.nrrd

...
DONE.
sn@MP:~/testCIP$ GenerateMedianFilteredImage -i CT.nrrd -o CTFiltered.nrrd
...
DONE.
sn@MP:~/testCIP$ GeneratePartialLungLabelMap --ict CTFiltered.nrrd -o partialLungLabelMap.nrrd
...

DONE.

sn@MP:~/testCIP$ ls

CTFiltered.nrrd CT.nrrd partialLungLabelMap.nrrd SR_4

sn@MP:~/testCIP$ python /home/sn/ChestImagingPlatform/Scripts/cip_compute_vessel_particlesCorrected.py -i CT.nrrd -l partialLungLabelMap.nrrd -r WholeLung --tmpDir /home/sn/testCIP -o particles.vtk

/home/sn/ChestImagingPlatform-build/CIP-build/bin/ComputeDistanceMap -l /home/sn/testCIP/wholeLung/CT_wholeLung_partialLungLabelMap.nrrd -d /home/sn/testCIP/wholeLung/CT_wholeLung_distanceMap.nrrd -s 1 -p -m Maurer

Reading label map...

Skipping downsampling...

Computing distance map...

Writing to file...

DONE.

Distance from wall: 2.0

unu 2op gt /home/sn/testCIP/wholeLung/CT_wholeLung_distanceMap.nrrd 2.000000 | unu convert -t short -o /home/sn/testCIP/wholeLung/CT_wholeLung_partialLungLabelMap.nrrd

/home/sn/ChestImagingPlatform-build/CIP-build/bin/ComputeFeatureStrength -i /home/sn/testCIP/wholeLung/CT_wholeLung.nrrd -m Frangi -f RidgeLine --std 0.700000,4.000000,7 --ssm 1 --alpha 0.63 --beta 0.51 --C 245 -o /home/sn/testCIP/wholeLung/CT_wholeLung_featureMap.nrrd

Reading CT from file...

0.7 4 7

Exception caught executing method

itk::ExceptionObject (0x7f32a40012f0)

Location: "unknown"

File: /home/sn/ChestImagingPlatform-build/ITKv5/Modules/Core/Common/include/itkImageSource.hxx

Line: 280

Description: itk::ERROR: UnaryFunctorImageFilter2(0x55be8bb74440): Subclass should override this method!!! If old behavior is desired invoke this->DynamicMultiThreadingOff(); before Update() is called. The best place is in class constructor.



unu 2op x /home/sn/testCIP/wholeLung/CT_wholeLung_featureMap.nrrd /home/sn/testCIP/wholeLung/CT_wholeLung_partialLungLabelMap.nrrd -t float | unu heq -b 10000 -a 0.96 -s 5 | unu 2op gt - 0.380000 | unu convert -t short -o /home/sn/testCIP/wholeLung/CT_wholeLung_mask.nrrd

unu 2op: error parsing "/home/sn/testCIP/wholeLung/CT_wholeLung_featureMap.nrrd" as nrrd/value for <in1> option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/CT_wholeLung_featureMap.nrrd","rb") failed: No such file or directory



Usage: unu 2op <operator> <in1> <in2> [-s,--seed <seed>] [-t,--type <type>] \

[-w,--which <arg>] [-o,--output <nout>]

...

unu heq: error parsing "-" as nrrd for -i,--input option:

[nrrd] nrrdLoad: trouble reading "-"

[nrrd] nrrdRead: trouble

[nrrd] _nrrdRead: immediately hit EOF



Usage: unu heq -b,--bin <bins> [-s,--smart [<bins>]] [-a,--amount <amount>] \

[-m,--map <filename>] [-i,--input <nin>] [-o,--output <nout>]

...

unu 2op: error parsing "-" as nrrd/value for <in1> option:

[nrrd] nrrdLoad: trouble reading "-"

[nrrd] nrrdRead: trouble

[nrrd] _nrrdRead: immediately hit EOF



Usage: unu 2op <operator> <in1> <in2> [-s,--seed <seed>] [-t,--type <type>] \

[-w,--which <arg>] [-o,--output <nout>]

...

unu convert: error parsing "-" as nrrd for -i,--input option:

[nrrd] nrrdLoad: trouble reading "-"

[nrrd] nrrdRead: trouble

[nrrd] _nrrdRead: immediately hit EOF



Usage: unu convert -t,--type <type> [-i,--input <nin>] [-clamp] \

[-o,--output <nout>]


-t <type> , --type <type> = type to convert to

-i <nin> , --input <nin> = input nrrd

-clamp = clamp input values to representable range of values of output

type, to avoid wrap-around problems

-o <nout> , --output <nout> = output nrrd (string); default: "-"

/bin/sh: 1: /home/sn/ChestImagingPlatform/Scripts/GenerateBinaryThinning3D: not found

Traceback (most recent call last):

File "/home/sn/ChestImagingPlatform/Scripts/cip_compute_vessel_particlesCorrected.py", line 414, in <module>

vp.execute()

File "/home/sn/ChestImagingPlatform/Scripts/cip_compute_vessel_particlesCorrected.py", line 321, in execute

adjust_irad_factor=0.625/self._voxel_size

ZeroDivisionError: float division by zero

sn@MP:~/testCIP$


I must mentioned that I edited cip_compute_vessel_particles.py with to add the paths to executable files CropLung, ExtractChestLabelMap, ComputeDistanceMap and ComputeFeatureStrength and renamed it to cip_compute_vessel_particlesCorrected.py.


It seems that the changes mentioned in my message on 14 Nov 4:53 PM may not be correct. As mentioned this message, I edited the file of /home/sn/ChestImagingPlatform/CommandLineTools/SegmentLungAirways/SegmentLungAirways.cxx.

In Line 1835 this file From:

...

mergeFilter->SetMethod(itk::PACK);

...

To

...

mergeFilter->SetMethod(MergeFilterType::PACK);


Please guide me to run this code.

I do not know what to do.


Best regards.

Shahrokh.



From: Shahrokh Nasseri (PhD)
Sent: Saturday, November 14, 2020 4:51:33 PM

Shahrokh Nasseri (PhD)

unread,
Nov 15, 2020, 6:49:09 AM11/15/20
to San Jose Estepar, Raul,Ph.D., chestimagingp...@googlegroups.com

Hello Dear Raul


As you can see in yesterday's message (Nov 14, 2020, 5:50:29 PM), I get the following error message:


Exception caught executing method

itk::ExceptionObject (0x7f32a40012f0)

Location: "unknown"

File: /home/sn/ChestImagingPlatform-build/ITKv5/Modules/Core/Common/include/itkImageSource.hxx

Line: 280

Description: itk::ERROR: UnaryFunctorImageFilter2(0x55be8bb74440): Subclass should override this method!!! If old behavior is desired invoke this->DynamicMultiThreadingOff(); before Update() is called. The best place is in class constructor.


Accordingly, I edited the file of itkImageSource.hxx by adding the following line in the constructor.

Then in the file of itkImageSource.hxx:

From:

...

line 39 {

line 40 template< typename TOutputImage >

line 41 ImageSource< TOutputImage >

line 42 ::ImageSource()

...

line 57 // Set the default behavior of an image source to NOT release its

line 58 // output bulk data prior to GenerateData() in case that bulk data

line 59 // can be reused (an thus avoid a costly deallocate/allocate cycle).

line 60 this->ReleaseDataBeforeUpdateFlagOff();

line 61 }


To:

...

line 39 {

line 40 template< typename TOutputImage >

line 41 ImageSource< TOutputImage >

line 42 ::ImageSource()

...

line 57 // Set the default behavior of an image source to NOT release its

line 58 // output bulk data prior to GenerateData() in case that bulk data

line 59 // can be reused (an thus avoid a costly deallocate/allocate cycle).

line 60 this->ReleaseDataBeforeUpdateFlagOff();

line 61 this->DynamicMultiThreadingOff();

}


After doing it, I make again:


sn@MP:~$ cd ChestImagingPlatform-build/

sn@MP:~/ChestImagingPlatform-build$ make

...

[ 99%] Built target UpdateParticlesData

Scanning dependencies of target UpdateParticlesDataTest

[100%] Building CXX object CommandLineTools/LegacyCLIs/UpdateParticlesData/CMakeFiles/UpdateParticlesDataTest.dir/Testing/UpdateParticlesDataTest.cxx.o

[100%] Linking CXX executable ../../Testing/bin/UpdateParticlesDataTest

[100%] Built target UpdateParticlesDataTest

[ 94%] No install step for 'CIP'

[ 95%] Completed 'CIP'

[100%] Built target CIP

sn@MP:~/ChestImagingPlatform-build$


As again, I check it as following:

DONE.

unu 2op x /home/sn/testCIP/wholeLung/CT_wholeLung_featureMap.nrrd /home/sn/testCIP/wholeLung/CT_wholeLung_partialLungLabelMap.nrrd -t float | unu heq -b 10000 -a 0.96 -s 5 | unu 2op gt - 0.380000 | unu convert -t short -o /home/sn/testCIP/wholeLung/CT_wholeLung_mask.nrrd

DONE.

Traceback (most recent call last):

File "/home/sn/ChestImagingPlatform/Scripts/cip_compute_vessel_particlesCorrected.py", line 414, in <module>

vp.execute()

File "/home/sn/ChestImagingPlatform/Scripts/cip_compute_vessel_particlesCorrected.py", line 321, in execute

adjust_irad_factor=0.625/self._voxel_size

ZeroDivisionError: float division by zero

sn@MP:~/testCIP$


At now, how can I solve it?

Please guide me.


Best regards.

Shahrokh




From: Shahrokh Nasseri (PhD)
Sent: Saturday, November 14, 2020 5:48 PM

Shahrokh Nasseri (PhD)

unread,
Nov 15, 2020, 8:01:24 AM11/15/20
to San Jose Estepar, Raul,Ph.D., chestimagingp...@googlegroups.com

Hello Dear Raul


I run this python code with –perm arguments as following.

Do you mean permissive in your message (Nov 12, 2020, 6:22:18 PM) as this –perm argument?


Anyway I run it with --multires and –perm arguments.


sn@MP:~/testCIP$ export PYTHONPATH=/home/sn/ChestImagingPlatform-build/CIP-build:/home/sn/ChestImagingPlatform-build/CIP-build:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python27.zip:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/plat-linux2:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/lib-tk:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/lib-old:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/lib-dynload:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/site-packages

sn@MP:~/testCIP$ export CIP_PATH=/home/sn/ChestImagingPlatform/Scripts

sn@MP:~/testCIP$ export TEEM_PATH=/home/sn/ChestImagingPlatform-build/teem-build/bin

sn@MP:~/testCIP$ export ITKTOOLS_PATH=/home/sn/ChestImagingPlatform-build/ITKv4-build/bin

sn@MP:~/testCIP$ export PATH=$PATH:/home/sn/ChestImagingPlatform-build/CIP-build/bin:/home/sn/ChestImagingPlatform-build/teem-build/bin

sn@MP:~/testCIP$ python /home/sn/ChestImagingPlatform/Scripts/cip_compute_vessel_particlesCorrected.py -i CT.nrrd -l partialLungLabelMap.nrrd -r WholeLung --tmpDir /home/sn/testCIP -o particles.vtk --multires --perm

finished deconvolution


Starting pass 1


gageStackBlurGet: will reuse 5 /home/sn/testCIP/wholeLung/V-%03u-005.nrrd pre-blurrings.

puller: trouble starting system:

[pull] pullStart: trouble starting to set up context

[pull] _pullVolumeSetup: need equal shapes, but vol 0 and 2 different

[pull] [gage] gageShapeEqual: ItoW matrices of V and M not the same

Finished pass 1


starting pass 2


ERROR: error parsing "/home/sn/testCIP/wholeLung/pass1-l2.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/pass1-l2.nrrd","rb") failed: No such file or directory



Usage: puller [@file ...] [-int <int>] [-enr <spec>] [-ens <spec>] \

...

finished pass 2


starting pass 3


ERROR: error parsing "/home/sn/testCIP/wholeLung/pass2-l2.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/pass2-l2.nrrd","rb") failed: No such file or directory



Usage: puller [@file ...] [-int <int>] [-enr <spec>] [-ens <spec>] \

...

finished pass 3


unu crop: error parsing "/home/sn/testCIP/wholeLung/pass3-l2.nrrd" as nrrd for -i,--input option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/pass3-l2.nrrd","rb") failed: No such file or directory



Usage: unu crop [-min,--minimum [<pos0 ...>]] [-max,--maximum [<pos0 ...>]] \

...

unu 2op: error parsing "-" as nrrd/value for <in1> option:

[nrrd] nrrdLoad: trouble reading "-"

[nrrd] nrrdRead: trouble

[nrrd] _nrrdRead: immediately hit EOF



Usage: unu 2op <operator> <in1> <in2> [-s,--seed <seed>] [-t,--type <type>] \

...

-o <nout> , --output <nout> = output nrrd (string); default: "-"

unu inset: error parsing "-" as nrrd for -s,--subset option:

[nrrd] nrrdLoad: trouble reading "-"

[nrrd] nrrdRead: trouble

[nrrd] _nrrdRead: immediately hit EOF



Usage: unu inset -min,--minimum <pos0 ...> -s,--subset <nsub> \

[-i,--input <nin>] [-o,--output <nout>]


...

finished deconvolution


Starting pass 1


gageStackBlurGet: will reuse 5 /home/sn/testCIP/wholeLung/V-%03u-005.nrrd pre-blurrings.

puller: trouble starting system:

[pull] pullStart: trouble starting to set up context

[pull] _pullVolumeSetup: need equal shapes, but vol 0 and 2 different

[pull] [gage] gageShapeEqual: ItoW matrices of V and M not the same

Finished pass 1


starting pass 2


ERROR: error parsing "/home/sn/testCIP/wholeLung/pass1-l1.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/pass1-l1.nrrd","rb") failed: No such file or directory



Usage: puller [@file ...] [-int <int>] [-enr <spec>] [-ens <spec>] \

...

finished pass 2


starting pass 3


ERROR: error parsing "/home/sn/testCIP/wholeLung/pass2-l1.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/pass2-l1.nrrd","rb") failed: No such file or directory



Usage: puller [@file ...] [-int <int>] [-enr <spec>] [-ens <spec>] \

...

finished pass 3


unu join: error parsing "/home/sn/testCIP/wholeLung/pass3-l2.nrrd" (in "/home/sn/testCIP/wholeLung/pass3-l2.nrrd /home/sn/testCIP/wholeLung/pass3-l1.nrrd") as nrrd for -i,--input option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/pass3-l2.nrrd","rb") failed: No such file or directory



Usage: unu join [@file ...] -i,--input <nin0 ...> -a,--axis <axis> [-incr] \

...

starting final pass


ERROR: error parsing "/home/sn/testCIP/wholeLung/merged-particles.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/merged-particles.nrrd","rb") failed: No such file or directory



Usage: puller [@file ...] [-int <int>] [-enr <spec>] [-ens <spec>] \

...

finished final pass


about to probe


ERROR: error parsing "/home/sn/testCIP/wholeLung/merged-particles.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/merged-particles.nrrd","rb") failed: No such file or directory



Usage: gprobe -i <nin> -k <kind> [-v <verbosity>] -q <query> [-gmc <min \

...


ERROR: error parsing "/home/sn/testCIP/wholeLung/merged-particles.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/merged-particles.nrrd","rb") failed: No such file or directory



Usage: gprobe -i <nin> -k <kind> [-v <verbosity>] -q <query> [-gmc <min \

...


ERROR: error parsing "/home/sn/testCIP/wholeLung/merged-particles.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/merged-particles.nrrd","rb") failed: No such file or directory



Usage: gprobe -i <nin> -k <kind> [-v <verbosity>] -q <query> [-gmc <min \

...


ERROR: error parsing "/home/sn/testCIP/wholeLung/merged-particles.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/merged-particles.nrrd","rb") failed: No such file or directory



Usage: gprobe -i <nin> -k <kind> [-v <verbosity>] -q <query> [-gmc <min \

...


ERROR: error parsing "/home/sn/testCIP/wholeLung/merged-particles.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/merged-particles.nrrd","rb") failed: No such file or directory



Usage: gprobe -i <nin> -k <kind> [-v <verbosity>] -q <query> [-gmc <min \

...


ERROR: error parsing "/home/sn/testCIP/wholeLung/merged-particles.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/merged-particles.nrrd","rb") failed: No such file or directory



Usage: gprobe -i <nin> -k <kind> [-v <verbosity>] -q <query> [-gmc <min \

...


ERROR: error parsing "/home/sn/testCIP/wholeLung/merged-particles.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/merged-particles.nrrd","rb") failed: No such file or directory



Usage: gprobe -i <nin> -k <kind> [-v <verbosity>] -q <query> [-gmc <min \

...


ERROR: error parsing "/home/sn/testCIP/wholeLung/merged-particles.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/merged-particles.nrrd","rb") failed: No such file or directory



Usage: gprobe -i <nin> -k <kind> [-v <verbosity>] -q <query> [-gmc <min \

...


ERROR: error parsing "/home/sn/testCIP/wholeLung/merged-particles.nrrd" as nrrd for "-pi" option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/wholeLung/merged-particles.nrrd","rb") failed: No such file or directory



Usage: gprobe -i <nin> -k <kind> [-v <verbosity>] -q <query> [-gmc <min \

...


finished probing


about to save to vtk


-o particles.vtk_wholeLungVesselParticles.vtk -b -i /home/sn/testCIP/wholeLung/merged-particles.nrrd -a NA -i /home/sn/testCIP/wholeLung/hevec1.nrrd -a hevec1 -i /home/sn/testCIP/wholeLung/hevec0.nrrd -a hevec0 -i /home/sn/testCIP/wholeLung/val.nrrd -a val -i /home/sn/testCIP/wholeLung/hevec2.nrrd -a hevec2 -i /home/sn/testCIP/wholeLung/heval0.nrrd -a h0 -i /home/sn/testCIP/wholeLung/heval1.nrrd -a h1 -i /home/sn/testCIP/wholeLung/heval2.nrrd -a h2 -i /home/sn/testCIP/wholeLung/hess.nrrd -a hess -i /home/sn/testCIP/wholeLung/hmode.nrrd -a hmode --irad 1.15 --srad 4 --liveth -600 --seedth -600 --spacing 0.763,0.763,2.65882416362 --cipr UndefinedRegion --cipt UndefinedType

Reading file for NA...

Exception caught reading input:

itk::ImageFileReaderException (0x559554400330)

Location: "unknown"

File: /home/sn/ChestImagingPlatform-build/ITKv5/Modules/IO/ImageBase/include/itkImageFileReader.hxx

Line: 136

Description: Could not create IO object for reading file /home/sn/testCIP/wholeLung/merged-particles.nrrd

The file doesn't exist.

Filename = /home/sn/testCIP/wholeLung/merged-particles.nrrd




finished saving\#####n

sn@MP:~/testCIP$


Please guide me.

Best regards.

Shahrokh.




From: Shahrokh Nasseri (PhD)
Sent: Sunday, November 15, 2020 3:17 PM

San Jose Estepar, Raul,Ph.D.

unread,
Nov 15, 2020, 11:05:17 AM11/15/20
to Shahrokh Nasseri (PhD), chestimagingp...@googlegroups.com
Hi Shahrokh,

Were you able to fix the issue with ComputeFeatureStrength? We are in the middle of the transition from ITK 4.x to ITK 5.x and some of the changes might not be backwards compatible. 
You could use commit 7a4413f (https://github.com/acil-bwh/ChestImagingPlatform/tree/7a4413f7542838366d71bdb74764f4893905899d). That was just before we started the transition.

In relation to your question, I would not try the multi res option. That is experimental and can lead into some issues. 

What happens if you just run with —perm?

To speed up the computation, you can just run with lung using -r LeftLung or -r RightLung

Thanks

Raul


On Nov 15, 2020, at 8:00 AM, Shahrokh Nasseri (PhD) <Nase...@mums.ac.ir> wrote:

        External Email - Use Caution        

Hello Dear Raul

Hello Dear Raul

I guessed that the inculde file of itkMultiThreaderBase.h is in ITK version 5. So I changed ITK_VERSION_MAJOR from 4 to 5 when doing ccmakeas following:

Shahrokh Nasseri (PhD)

unread,
Nov 16, 2020, 6:14:18 AM11/16/20
to San Jose Estepar, Raul,Ph.D., chestimagingp...@googlegroups.com

Hello Dear Raul.


As you mentioned, I try commit 7a4413f with the follownig commands and then make it.


sn@MP:~$ git clone https://github.com/acil-bwh/ChestImagingPlatform.git

...

sn@MP:~$ cd ChestImagingPlatform

sn@MP:~/ChestImagingPlatform$ git checkout 7a4413f

Note: checking out '7a4413f'.


You are in 'detached HEAD' state. You can look around, make experimental

changes and commit them, and you can discard any commits you make in this

state without impacting any branches by performing another checkout.


If you want to create a new branch to retain commits you create, you may

do so (now or later) by using -b with the checkout command again. Example:


git checkout -b <new-branch-name>


HEAD is now at 7a4413f7 ENH: fixing error to load test data

sn@MP:~/ChestImagingPlatform$ cd ..

sn@MP:~$ mkdir ChestImagingPlatform-build

sn@MP:~$ cd ./ChestImagingPlatform-build/

sn@MP:~/ChestImagingPlatform-build$ /home/sn/cmake-3.10.2-Linux-x86_64/bin/cmake ../ChestImagingPlatform

sn@MP:~/ChestImagingPlatform-build$ make -j 4

...

[ 38%] Building CXX object CommandLineTools/ComputeFeatureStrength/CMakeFiles/ComputeFeatureStrengthLib.dir/ComputeFeatureStrength.cxx.o

/home/sn/ChestImagingPlatform/CommandLineTools/ComputeFeatureStrength/ComputeFeatureStrength.cxx: In function ‘int ModuleEntryPoint(int, char**)’:

/home/sn/ChestImagingPlatform/CommandLineTools/ComputeFeatureStrength/ComputeFeatureStrength.cxx:125:34: error: ‘itk::MultiThreaderBase’ has not been declared

unsigned int maxThreads = itk::MultiThreaderBase::GetGlobalDefaultNumberOfThreads();

^~~~~~~~~~~~~~~~~

/home/sn/ChestImagingPlatform/CommandLineTools/ComputeFeatureStrength/ComputeFeatureStrength.cxx:132:8: error: ‘itk::MultiThreaderBase’ has not been declared

itk::MultiThreaderBase::SetGlobalMaximumNumberOfThreads( maxThreads );

^~~~~~~~~~~~~~~~~

In file included from /home/sn/ChestImagingPlatform/Utilities/ITK/itkMultiScaleGaussianEnhancementImageFilter.h:233:0,

from /home/sn/ChestImagingPlatform/CommandLineTools/ComputeFeatureStrength/ComputeFeatureStrength.cxx:18:

/home/sn/ChestImagingPlatform/Utilities/ITK/itkMultiScaleGaussianEnhancementImageFilter.hxx: In instantiation of ‘void itk::MultiScaleGaussianEnhancementImageFilter<TInputImage, TOutputImage>::UpdateMaximumResponse(const OutputImageType*, const unsigned int&) [with TInputImage = itk::Image<short int, 3>; TOutputImage = itk::Image<double, 3>; itk::MultiScaleGaussianEnhancementImageFilter<TInputImage, TOutputImage>::OutputImageType = itk::Image<double, 3>]’:

/home/sn/ChestImagingPlatform/Utilities/ITK/itkMultiScaleGaussianEnhancementImageFilter.hxx:217:11: required from ‘void itk::MultiScaleGaussianEnhancementImageFilter<TInputImage, TOutputImage>::GenerateData() [with TInputImage = itk::Image<short int, 3>; TOutputImage = itk::Image<double, 3>]’

/home/sn/ChestImagingPlatform/CommandLineTools/ComputeFeatureStrength/ComputeFeatureStrength.cxx:430:1: required from here

/home/sn/ChestImagingPlatform/Utilities/ITK/itkMultiScaleGaussianEnhancementImageFilter.hxx:268:14: error: ‘itk::SmartPointer<itk::MaximumImageFilter<itk::Image<double, 3>, itk::Image<double, 3>, itk::Image<double, 3> > >::ObjectType {aka class itk::MaximumImageFilter<itk::Image<double, 3>, itk::Image<double, 3>, itk::Image<double, 3> >}’ has no member named ‘SetNumberOfWorkUnits’; did you mean ‘SetNumberOfThreads’?

maxFilter->SetNumberOfWorkUnits(this->GetNumberOfWorkUnits());

~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~

SetNumberOfThreads

/home/sn/ChestImagingPlatform/Utilities/ITK/itkMultiScaleGaussianEnhancementImageFilter.hxx:268:41: error: ‘class itk::MultiScaleGaussianEnhancementImageFilter<itk::Image<short int, 3>, itk::Image<double, 3> >’ has no member named ‘GetNumberOfWorkUnits’; did you mean ‘SetNumberOfWorkUnits’?

maxFilter->SetNumberOfWorkUnits(this->GetNumberOfWorkUnits());

~~~~~~^~~~~~~~~~~~~~~~~~~~

SetNumberOfWorkUnits

CommandLineTools/ComputeFeatureStrength/CMakeFiles/ComputeFeatureStrengthLib.dir/build.make:68: recipe for target 'CommandLineTools/ComputeFeatureStrength/CMakeFiles/ComputeFeatureStrengthLib.dir/ComputeFeatureStrength.cxx.o' failed

make[5]: *** [CommandLineTools/ComputeFeatureStrength/CMakeFiles/ComputeFeatureStrengthLib.dir/ComputeFeatureStrength.cxx.o] Error 1

CMakeFiles/Makefile2:9664: recipe for target 'CommandLineTools/ComputeFeatureStrength/CMakeFiles/ComputeFeatureStrengthLib.dir/all' failed

make[4]: *** [CommandLineTools/ComputeFeatureStrength/CMakeFiles/ComputeFeatureStrengthLib.dir/all] Error 2

make[4]: *** Waiting for unfinished jobs....

[ 39%] Linking CXX static library ../../bin/libMaskOutLabelMapStructuresLib.a

[ 39%] Built target MaskOutLabelMapStructuresLib

[ 40%] Linking CXX static library ../../bin/libRegisterLabelMapsLib.a

[ 40%] Built target RegisterLabelMapsLib

[ 41%] Linking CXX static library ../../bin/libRegisterCTLib.a

[ 41%] Built target RegisterCTLib

Makefile:140: recipe for target 'all' failed

make[3]: *** [all] Error 2

CMakeFiles/CIP.dir/build.make:118: recipe for target 'CIP-prefix/src/CIP-stamp/CIP-build' failed

make[2]: *** [CIP-prefix/src/CIP-stamp/CIP-build] Error 2

CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/CIP.dir/all' failed

make[1]: *** [CMakeFiles/CIP.dir/all] Error 2

Makefile:94: recipe for target 'all' failed

make: *** [all] Error 2

sn@MP:~/ChestImagingPlatform-build$


I guessed that this error is related to ITK Version. So I changed ITK_VERSION_MAJOR from 4 to 5 when doing ccmake as following:


sn@MP:~/ChestImagingPlatform-build$ /home/sn/cmake-3.10.2-Linux-x86_64/bin/ccmake ../ChestImagingPlatform

...

Page 1 of 1

Press [c] to configure

...

Press [g] to generate and exit


sn@MP:~/ChestImagingPlatform-build$ make -j 6

...

[ 98%] Linking CXX executable ../../Testing/bin/UpdateParticlesDataTest

[ 98%] Built target UpdateParticlesDataTest

[ 99%] Linking CXX executable ../Testing/bin/GenerateLobeSurfaceModelsTest

[100%] Linking CXX executable ../Testing/bin/FilterConnectedComponentsTest

[100%] Built target GenerateLobeSurfaceModelsTest

[100%] Built target FilterConnectedComponentsTest

[ 94%] No install step for 'CIP'

[ 95%] Completed 'CIP'

[100%] Built target CIP

sn@MP:~/ChestImagingPlatform-build$ cd ..

sn@MP:~/ChestImagingPlatform-build$


At now, I want to check it.


sn@MP:~$ export PYTHONPATH=/home/sn/ChestImagingPlatform-build/CIP-build:/home/sn/ChestImagingPlatform-build/CIP-build:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python27.zip:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/plat-linux2:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/lib-tk:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/lib-old:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/lib-dynload:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/site-packages

sn@MP:~$ export CIP_PATH=/home/sn/ChestImagingPlatform/Scripts

sn@MP:~$ export TEEM_PATH=/home/sn/ChestImagingPlatform-build/teem-build/bin

sn@MP:~$ export ITKTOOLS_PATH=/home/sn/ChestImagingPlatform-build/ITKv4-build/bin

sn@MP:~$ export PATH=$PATH:/home/sn/ChestImagingPlatform-build/CIP-build/bin:/home/sn/ChestImagingPlatform-build/teem-build/bin

sn@MP:~$ cd testCIP/

sn@MP:~/testCIP$ ls

SR_4

sn@MP:~/testCIP$ ConvertDicom --dir SR_4/ -o CT.nrrd

...

DONE.

sn@MP:~/testCIP$ GenerateMedianFilteredImage -i CT.nrrd -o CTFiltered.nrrd

...

DONE.

sn@MP:~/testCIP$ GeneratePartialLungLabelMap --ict CTFiltered.nrrd -o partialLungLabelMap.nrrd

...

DONE.

sn@MP:~/testCIP$ python /home/sn/ChestImagingPlatform/Scripts/cip_compute_vessel_particlesCorrected.py -i CT.nrrd -l partialLungLabelMap.nrrd -r WholeLung --tmpDir /home/sn/testCIP -o particles.vtk --perm -r LeftLung

/home/sn/ChestImagingPlatform-build/CIP-build/bin/CropLung --cipr LeftLung -m 0 -v -1000 --ict CT.nrrd --ilm partialLungLabelMap.nrrd --oct /home/sn/testCIP/leftLung/CT_leftLung.nrrd --olm /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd

Reading CT from file...

Reading label map from file...

Reading label map...

Extracting region and type...

Computing Bounding Box...

0: 245

1: 452

2: 109

3: 388

4: 7

5: 144

0: 245

1: 452

2: 109

3: 388

4: 7

Writing CT cropped image...

Writing cropped label map...

DONE.

/home/sn/ChestImagingPlatform-build/CIP-build/bin/ExtractChestLabelMap -r LeftLung -i /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd -o /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd

Reading...

Extracting...

Writing...

DONE.

unu 2op gt /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd 0.5 -o /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd

/home/sn/ChestImagingPlatform-build/CIP-build/bin/ComputeDistanceMap -l /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd -d /home/sn/testCIP/leftLung/CT_leftLung_distanceMap.nrrd -s 1 -p -m Maurer

Reading label map...

Skipping downsampling...

Computing distance map...

Writing to file...

DONE.

Distance from wall: 2.0

unu 2op gt /home/sn/testCIP/leftLung/CT_leftLung_distanceMap.nrrd 2.000000 | unu convert -t short -o /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd

/home/sn/ChestImagingPlatform-build/CIP-build/bin/ComputeFeatureStrength -i /home/sn/testCIP/leftLung/CT_leftLung.nrrd -m Frangi -f RidgeLine --std 0.700000,4.000000,7 --ssm 1 --alpha 0.63 --beta 0.51 --C 245 -o /home/sn/testCIP/leftLung/CT_leftLung_featureMap.nrrd

Reading CT from file...

0.7 4 7

Exception caught executing method

itk::ExceptionObject (0x7f9158001500)

Location: "unknown"

File: /home/sn/ChestImagingPlatform-build/ITKv5/Modules/Core/Common/include/itkImageSource.hxx

Line: 280

Description: itk::ERROR: UnaryFunctorImageFilter2(0x55e6dd136440): Subclass should override this method!!! If old behavior is desired invoke this->DynamicMultiThreadingOff(); before Update() is called. The best place is in class constructor.



unu 2op x /home/sn/testCIP/leftLung/CT_leftLung_featureMap.nrrd /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd -t float | unu heq -b 10000 -a 0.96 -s 5 | unu 2op gt - 0.380000 | unu convert -t short -o /home/sn/testCIP/leftLung/CT_leftLung_mask.nrrd

unu 2op: error parsing "/home/sn/testCIP/leftLung/CT_leftLung_featureMap.nrrd" as nrrd/value for <in1> option:

[nrrd] nrrdLoad: fopen("/home/sn/testCIP/leftLung/CT_leftLung_featureMap.nrrd","rb") failed: No such file or directory



Usage: unu 2op <operator> <in1> <in2> [-s,--seed <seed>] [-t,--type <type>] \

...

unu heq: error parsing "-" as nrrd for -i,--input option:

[nrrd] nrrdLoad: trouble reading "-"

[nrrd] nrrdRead: trouble

[nrrd] _nrrdRead: immediately hit EOF



Usage: unu heq -b,--bin <bins> [-s,--smart [<bins>]] [-a,--amount <amount>] \

...

unu 2op: error parsing "-" as nrrd/value for <in1> option:

[nrrd] nrrdLoad: trouble reading "-"

[nrrd] nrrdRead: trouble

[nrrd] _nrrdRead: immediately hit EOF



Usage: unu 2op <operator> <in1> <in2> [-s,--seed <seed>] [-t,--type <type>] \

...

unu convert: error parsing "-" as nrrd for -i,--input option:

[nrrd] nrrdLoad: trouble reading "-"

[nrrd] nrrdRead: trouble

[nrrd] _nrrdRead: immediately hit EOF



Usage: unu convert -t,--type <type> [-i,--input <nin>] [-clamp] \

...

Exception caught reading label map:

itk::ImageFileReaderException (0x56346f145b40)

Location: "unknown"

File: /home/sn/ChestImagingPlatform-build/ITKv5/Modules/IO/ImageBase/include/itkImageFileReader.hxx

Line: 136

Description: Could not create IO object for reading file /home/sn/testCIP/leftLung/CT_leftLung_mask.nrrd

The file doesn't exist.

Filename = /home/sn/testCIP/leftLung/CT_leftLung_mask.nrrd




Traceback (most recent call last):

File "/home/sn/ChestImagingPlatform/Scripts/cip_compute_vessel_particlesCorrected.py", line 414, in <module>

vp.execute()

File "/home/sn/ChestImagingPlatform/Scripts/cip_compute_vessel_particlesCorrected.py", line 321, in execute

adjust_irad_factor=0.625/self._voxel_size

ZeroDivisionError: float division by zero

sn@MP:~/testCIP$ gedit /home/sn/ChestImagingPlatform-build/ITKv5/Modules/Core/Common/include/itkImageSource.hxx



As mentioned in my previous meesage, for solving it (Nov 15, 2020, 3:19:09 PM), I edit the file of /home/sn/ChestImagingPlatform-build/ITKv5/Modules/Core/Common/include/itkImageSource.hxx.

I add the following line 61.

From:

...

// Set the default behavior of an image source to NOT release its

// output bulk data prior to GenerateData() in case that bulk data

// can be reused (an thus avoid a costly deallocate/allocate cycle).

this->ReleaseDataBeforeUpdateFlagOff();

}

...

To:

...

// Set the default behavior of an image source to NOT release its

// output bulk data prior to GenerateData() in case that bulk data

// can be reused (an thus avoid a costly deallocate/allocate cycle).

this->ReleaseDataBeforeUpdateFlagOff();

this->DynamicMultiThreadingOff();

}

...


Again I do make it.

sn@MP:~/testCIP$ cd ../ChestImagingPlatform-build/

sn@MP:~/ChestImagingPlatform-build$ make clean

sn@MP:~/ChestImagingPlatform-build$ make -j 8

...

[100%] Linking CXX executable ../Testing/bin/FilterConnectedComponentsTest

[100%] Built target FilterConnectedComponentsTest

[ 98%] No install step for 'CIP'

[100%] Completed 'CIP'

[100%] Built target CIP

sn@MP:~/ChestImagingPlatform-build$


After editing this file (itkImageSource.hxx), I do not get error.


Again checking it:


sn@MP:~/ChestImagingPlatform-build$ cd ~/testCIP/

sn@MP:~/testCIP$ python /home/sn/ChestImagingPlatform/Scripts/cip_compute_vessel_particlesCorrected.py -i CT.nrrd -l partialLungLabelMap.nrrd -r WholeLung --tmpDir /home/sn/testCIP -o particles.vtk --perm -r LeftLung

/home/sn/ChestImagingPlatform-build/CIP-build/bin/CropLung --cipr LeftLung -m 0 -v -1000 --ict CT.nrrd --ilm partialLungLabelMap.nrrd --oct /home/sn/testCIP/leftLung/CT_leftLung.nrrd --olm /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd

Reading CT from file...

Reading label map from file...

Reading label map...

Extracting region and type...

Computing Bounding Box...

0: 245

1: 452

2: 109

3: 388

4: 7

5: 144

0: 245

1: 452

2: 109

3: 388

4: 7

Writing CT cropped image...

Writing cropped label map...

DONE.

/home/sn/ChestImagingPlatform-build/CIP-build/bin/ExtractChestLabelMap -r LeftLung -i /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd -o /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd

Reading...

Extracting...

Writing...

DONE.

unu 2op gt /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd 0.5 -o /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd

/home/sn/ChestImagingPlatform-build/CIP-build/bin/ComputeDistanceMap -l /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd -d /home/sn/testCIP/leftLung/CT_leftLung_distanceMap.nrrd -s 1 -p -m Maurer

Reading label map...

Skipping downsampling...

Computing distance map...

Writing to file...

DONE.

Distance from wall: 2.0

unu 2op gt /home/sn/testCIP/leftLung/CT_leftLung_distanceMap.nrrd 2.000000 | unu convert -t short -o /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd

/home/sn/ChestImagingPlatform-build/CIP-build/bin/ComputeFeatureStrength -i /home/sn/testCIP/leftLung/CT_leftLung.nrrd -m Frangi -f RidgeLine --std 0.700000,4.000000,7 --ssm 1 --alpha 0.63 --beta 0.51 --C 245 -o /home/sn/testCIP/leftLung/CT_leftLung_featureMap.nrrd

Reading CT from file...

0.7 4 7

DONE.

unu 2op x /home/sn/testCIP/leftLung/CT_leftLung_featureMap.nrrd /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd -t float | unu heq -b 10000 -a 0.96 -s 5 | unu 2op gt - 0.380000 | unu convert -t short -o /home/sn/testCIP/leftLung/CT_leftLung_mask.nrrd

DONE.

Traceback (most recent call last):

File "/home/sn/ChestImagingPlatform/Scripts/cip_compute_vessel_particlesCorrected.py", line 414, in <module>

vp.execute()

File "/home/sn/ChestImagingPlatform/Scripts/cip_compute_vessel_particlesCorrected.py", line 321, in execute

adjust_irad_factor=0.625/self._voxel_size

ZeroDivisionError: float division by zero

sn@MP:~/testCIP$


As seen above, fortunately I do not get error message of "Description: itk::ERROR: UnaryFunctorImageFilter2(0x55e6dd136440): ...", But I still get the following error:


Traceback (most recent call last):

File "/home/sn/ChestImagingPlatform/Scripts/cip_compute_vessel_particlesCorrected.py", line 414, in <module>

vp.execute()

File "/home/sn/ChestImagingPlatform/Scripts/cip_compute_vessel_particlesCorrected.py", line 321, in execute

adjust_irad_factor=0.625/self._voxel_size

ZeroDivisionError: float division by zero


At now, with your help and guidance, I only see this single error.

Please help me to solve it.


You asked me that “What happens if you just run with —perm?”

When I run with and without —perm option, I get same error message this error that mentioned above.

adjust_irad_factor=0.625/self._voxel_size

ZeroDivisionError: float division by zero


Also I change permissive from True to False in cip_compute_vessel_particles.py, nothing special happened.


Please help me.

Best regards.

Shahrokh






From: San Jose Estepar, Raul,Ph.D. <RSAN...@BWH.HARVARD.EDU>
Sent: Sunday, November 15, 2020 7:35 PM

Shahrokh Nasseri (PhD)

unread,
Nov 17, 2020, 12:30:00 AM11/17/20
to San Jose Estepar, Raul,Ph.D., chestimagingp...@googlegroups.com

Hello Dear Raul

Good morning

 

With your guidance and support, I was able to extract the particles system.

Thank you for sharing your wisdom and knowledge with me.

 

Commands:

sn@MP:~$ export PYTHONPATH=/home/sn/ChestImagingPlatform-build/CIP-build:/home/sn/ChestImagingPlatform-build/CIP-build:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python27.zip:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/plat-linux2:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/lib-tk:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/lib-old:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/lib-dynload:/home/sn/ChestImagingPlatform-build/CIPPython-install/lib/python2.7/site-packages

sn@MP:~$ export CIP_PATH=/home/sn/ChestImagingPlatform/Scripts

sn@MP:~$ export TEEM_PATH=/home/sn/ChestImagingPlatform-build/teem-build/bin

sn@MP:~$ export ITKTOOLS_PATH=/home/sn/ChestImagingPlatform-build/ITKv4-build/bin

sn@MP:~$ export PATH=$PATH:/home/sn/ChestImagingPlatform-build/CIP-build/bin:/home/sn/ChestImagingPlatform-build/teem-build/bin

sn@MP:~$ cd testCIP/

sn@MP:~/testCIP$ ls

SR_4

sn@MP:~/testCIP$ ConvertDicom --dir SR_4/ -o CT.nrrd

...

DONE.

sn@MP:~/testCIP$ GenerateMedianFilteredImage -i CT.nrrd -o CTFiltered.nrrd

...

DONE.

sn@MP:~/testCIP$ GeneratePartialLungLabelMap --ict CTFiltered.nrrd -o partialLungLabelMap.nrrd

...

DONE.

sn@MP:~/testCIP$ python /home/sn/ChestImagingPlatform/Scripts/cip_compute_vessel_particlesCorrected.py -i CT.nrrd -l partialLungLabelMap.nrrd -r WholeLung --tmpDir /home/sn/testCIP -o particles.vtk --perm -r LeftLung -s 0.625

unu resample -k tent -s x1.220090 x1.220090 x4.254119 -i CT.nrrd -o /home/sn/testCIP/CT_resample.nrrd -c cell

unu resample -k cheap -s x1.220090 x1.220090 x4.254119 -i partialLungLabelMap.nrrd -o /home/sn/testCIP/CT_resamplepartialLungLabelMap.nrrd -c cell

/home/sn/ChestImagingPlatform-build/CIP-build/bin/CropLung --cipr LeftLung -m 0 -v -1000 --ict /home/sn/testCIP/CT_resample.nrrd --ilm /home/sn/testCIP/CT_resamplepartialLungLabelMap.nrrd --oct /home/sn/testCIP/leftLung/CT_leftLung.nrrd --olm /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd

Reading CT from file...

Reading label map from file...

Reading label map...

Extracting region and type...

Computing Bounding Box...

0: 299

1: 552

2: 133

3: 474

4: 30

5: 615

0: 299

1: 552

2: 133

3: 474

4: 30

Writing CT cropped image...

Writing cropped label map...

DONE.

/home/sn/ChestImagingPlatform-build/CIP-build/bin/ExtractChestLabelMap -r LeftLung -i /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd -o /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd

Reading...

Extracting...

Writing...

DONE.

unu 2op gt /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd 0.5 -o /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd

/home/sn/ChestImagingPlatform-build/CIP-build/bin/ComputeDistanceMap -l /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd -d /home/sn/testCIP/leftLung/CT_leftLung_distanceMap.nrrd -s 1 -p -m Maurer

Reading label map...

Skipping downsampling...

Computing distance map...

Writing to file...

DONE.

Distance from wall: 2.0

unu 2op gt /home/sn/testCIP/leftLung/CT_leftLung_distanceMap.nrrd 2.000000 | unu convert -t short -o /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd

/home/sn/ChestImagingPlatform-build/CIP-build/bin/ComputeFeatureStrength -i /home/sn/testCIP/leftLung/CT_leftLung.nrrd -m Frangi -f RidgeLine --std 0.700000,4.000000,7 --ssm 1 --alpha 0.63 --beta 0.51 --C 245 -o /home/sn/testCIP/leftLung/CT_leftLung_featureMap.nrrd

Reading CT from file...

0.7 4 7

DONE.

unu 2op x /home/sn/testCIP/leftLung/CT_leftLung_featureMap.nrrd /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd -t float | unu heq -b 10000 -a 0.96 -s 5 | unu 2op gt - 0.380000  | unu convert -t short -o /home/sn/testCIP/leftLung/CT_leftLung_mask.nrrd

DONE.

Resetting param groups...

Building param groups...

Starting pass 1...

gageStackBlurGet: no file "/home/sn/testCIP/leftLung/V-000-010.nrrd"; will recompute blurrings

Finished pass 1.

Starting pass 2...

gageStackBlurGet: will reuse 10 /home/sn/testCIP/leftLung/V-%03u-010.nrrd pre-blurrings.

Finished pass 2.

Starting pass 3...

gageStackBlurGet: will reuse 10 /home/sn/testCIP/leftLung/V-%03u-010.nrrd pre-blurrings.

Finished pass 3.

Probing...

 

gageStackBlurParmScaleSet: !!! This function is deprecated; use gageStackBlurParmSigmaSet instead !!!

 

 

gageStackBlurParmScaleSet: !!! This function is deprecated; use gageStackBlurParmSigmaSet instead !!!

 

 

gageStackBlurParmScaleSet: !!! This function is deprecated; use gageStackBlurParmSigmaSet instead !!!

 

 

gageStackBlurParmScaleSet: !!! This function is deprecated; use gageStackBlurParmSigmaSet instead !!!

 

 

gageStackBlurParmScaleSet: !!! This function is deprecated; use gageStackBlurParmSigmaSet instead !!!

 

 

gageStackBlurParmScaleSet: !!! This function is deprecated; use gageStackBlurParmSigmaSet instead !!!

 

 

gageStackBlurParmScaleSet: !!! This function is deprecated; use gageStackBlurParmSigmaSet instead !!!

 

 

gageStackBlurParmScaleSet: !!! This function is deprecated; use gageStackBlurParmSigmaSet instead !!!

 

 

gageStackBlurParmScaleSet: !!! This function is deprecated; use gageStackBlurParmSigmaSet instead !!!

 

Finished probing.

Saving to vtk...

 -o particles.vtk_leftLungVesselParticles.vtk -b -i /home/sn/testCIP/leftLung/pass3.nrrd -a NA -i /home/sn/testCIP/leftLung/hevec1.nrrd -a hevec1 -i /home/sn/testCIP/leftLung/hevec0.nrrd -a hevec0 -i /home/sn/testCIP/leftLung/val.nrrd -a val -i /home/sn/testCIP/leftLung/hevec2.nrrd -a hevec2 -i /home/sn/testCIP/leftLung/heval0.nrrd -a h0 -i /home/sn/testCIP/leftLung/heval1.nrrd -a h1 -i /home/sn/testCIP/leftLung/heval2.nrrd -a h2 -i /home/sn/testCIP/leftLung/hess.nrrd -a hess -i /home/sn/testCIP/leftLung/hmode.nrrd -a hmode --irad 0.8 --srad 4 --liveth -90 --seedth -70 --spacing 0.6250496,0.6250496,0.625362069636 --cipr UndefinedRegion --cipt Vessel

Reading file for NA...

Reading file for hevec1...

Reading file for hevec0...

Reading file for val...

Reading file for hevec2...

Reading file for h0...

Reading file for h1...

Reading file for h2...

Reading file for hess...

Reading file for hmode...

Writing poly data...

DONE.

sn@MP:~/testCIP$ ll -h

total 1.1G

drwxr-xr-x   4 sn sn 4.0K Nov 16 18:01 ./

drwxr-xr-x 163 sn sn  12K Nov 16 17:35 ../

-rw-r--r--   1 sn sn  35M Nov 16 13:29 CTFiltered.nrrd

-rw-r--r--   1 sn sn  38M Nov 16 13:29 CT.nrrd

-rw-r--r--   1 sn sn 479M Nov 16 17:08 CT_resample.nrrd

-rw-r--r--   1 sn sn 479M Nov 16 17:08 CT_resamplepartialLungLabelMap.nrrd

drwxr-xr-x   2 sn sn 4.0K Nov 16 18:01 leftLung/

-rw-r--r--   1 sn sn 733K Nov 16 13:29 partialLungLabelMap.nrrd

-rw-r--r--   1 sn sn 2.6M Nov 16 18:01 particles.vtk_leftLungVesselParticles.vtk

drwxr-xr-x   2 sn sn 4.0K Nov 11 12:07 SR_4/

sn@MP:~/testCIP$ ll -h leftLung/

total 2.8G

drwxr-xr-x 2 sn sn 4.0K Nov 16 18:01 ./

drwxr-xr-x 4 sn sn 4.0K Nov 16 18:01 ../

-rw-r--r-- 1 sn sn 195M Nov 16 17:11 ct-deconv.nrrd

-rw-r--r-- 1 sn sn 107M Nov 16 17:09 CT_leftLung_distanceMap.nrrd

-rw-r--r-- 1 sn sn 281M Nov 16 17:11 CT_leftLung_featureMap.nrrd

-rw-r--r-- 1 sn sn  98M Nov 16 17:11 CT_leftLung_mask.nrrd

-rw-r--r-- 1 sn sn  60M Nov 16 17:08 CT_leftLung.nrrd

-rw-r--r-- 1 sn sn  98M Nov 16 17:09 CT_leftLung_partialLungLabelMap.nrrd

-rw-r--r-- 1 sn sn 793K Nov 16 18:01 hess.nrrd

-rw-r--r-- 1 sn sn  89K Nov 16 18:01 heval0.nrrd

-rw-r--r-- 1 sn sn  89K Nov 16 18:01 heval1.nrrd

-rw-r--r-- 1 sn sn  89K Nov 16 18:01 heval2.nrrd

-rw-r--r-- 1 sn sn 265K Nov 16 18:01 hevec0.nrrd

-rw-r--r-- 1 sn sn 265K Nov 16 18:01 hevec1.nrrd

-rw-r--r-- 1 sn sn 265K Nov 16 18:01 hevec2.nrrd

-rw-r--r-- 1 sn sn  89K Nov 16 18:01 hmode.nrrd

-rw-r--r-- 1 sn sn 2.0M Nov 16 17:51 pass1.nrrd

-rw-r--r-- 1 sn sn 2.0M Nov 16 17:53 pass2.nrrd

-rw-r--r-- 1 sn sn 705K Nov 16 18:01 pass3.nrrd

-rw-r--r-- 1 sn sn 195M Nov 16 17:13 V-000-010.nrrd

-rw-r--r-- 1 sn sn 195M Nov 16 17:13 V-001-010.nrrd

-rw-r--r-- 1 sn sn 195M Nov 16 17:13 V-002-010.nrrd

-rw-r--r-- 1 sn sn 195M Nov 16 17:13 V-003-010.nrrd

-rw-r--r-- 1 sn sn 195M Nov 16 17:13 V-004-010.nrrd

-rw-r--r-- 1 sn sn 195M Nov 16 17:13 V-005-010.nrrd

-rw-r--r-- 1 sn sn 195M Nov 16 17:13 V-006-010.nrrd

-rw-r--r-- 1 sn sn 195M Nov 16 17:13 V-007-010.nrrd

-rw-r--r-- 1 sn sn 195M Nov 16 17:13 V-008-010.nrrd

-rw-r--r-- 1 sn sn 195M Nov 16 17:13 V-009-010.nrrd

-rw-r--r-- 1 sn sn  89K Nov 16 18:01 val.nrrd

sn@MP:~/testCIP$

 

 

At now, I can see the particle system in the vtk file (particles.vtk_leftLungVesselParticles.vtk).


Dear Raul, I will definitely give you feedback in the future.

The following figure is a screenshot of two files particles.vtk_leftLungVesselParticles.vtk and CT_leftLung.nrrd.

 

 

 

In the leftLung folder, I see files with names such as homde, hess, heval[0-2], val, hevec[0-1], pass[1-3] and v-[001-009].

What are these files and where can I find descriptions about these files?

 

The size of particle appear to be the same, when I add the files of particles.vtk_leftLungVesselParticles.vtk and CT_leftLung.nrrd into the scene of 3DSlicer as seen above.

How can I show the particle size with color bar?

 

As seen the following figure, in the section of Scalars in the Model module of 3DSlicer, I can select options such as scale, hevec0, hevec1, hevec2, val, h0, h1, h2, hess, hmode and ChestRegionChestType. The names of these options are similar to the files mentioned above. What are these options and what do they want to show?

 




Best regards.

Shahrokh.

 

 

 



From: Shahrokh Nasseri (PhD)
Sent: Monday, November 16, 2020 2:42 PM

Shahrokh Nasseri (PhD)

unread,
Nov 17, 2020, 12:47:03 AM11/17/20
to San Jose Estepar, Raul,Ph.D., chestimagingp...@googlegroups.com

Hello Dear Raul


Excuse me, I have a question about -s argument. When I run the python code of cip_compute_vessel_particles.py, I get error message of ZeroDivisionError.


sn@MP:~/testCIP$ python /home/sn/ChestImagingPlatform/Scripts/cip_compute_vessel_particlesCorrected.py -i CT.nrrd -l partialLungLabelMap.nrrd -r WholeLung --tmpDir /home/sn/testCIP -o particles.vtk --perm -r LeftLung

unu 2op x /home/sn/testCIP/leftLung/CT_leftLung_featureMap.nrrd /home/sn/testCIP/leftLung/CT_leftLung_partialLungLabelMap.nrrd -t float | unu heq -b 10000 -a 0.96 -s 5 | unu 2op gt - 0.380000 | unu convert -t short -o /home/sn/testCIP/leftLung/CT_leftLung_mask.nrrd

DONE.

Traceback (most recent call last):

File "/home/sn/ChestImagingPlatform/Scripts/cip_compute_vessel_particlesCorrected.py", line 414, in <module>

vp.execute()

File "/home/sn/ChestImagingPlatform/Scripts/cip_compute_vessel_particlesCorrected.py", line 321, in execute

adjust_irad_factor=0.625/self._voxel_size

ZeroDivisionError: float division by zero

sn@MP:~/testCIP$


In the help of this code states that this argument is for setting the voxel size (VOXEL_SIZE).

Does this mean that this size is the minimum particle size?


Best regards.

Shahrokh.




From: Shahrokh Nasseri (PhD)
Sent: Tuesday, November 17, 2020 8:57:59 AM

Yonni Friedlander

unread,
Aug 15, 2023, 7:17:34 AM8/15/23
to ChestImagingPlatform-users
Hi Shahrokh (and Raul and friends),

Was this question ever resolved? Specifically, I was wondering if, when running in batch, the -s variable needs to be changed for each case or if it simply needs to be larger than the largest voxel size in the batch?

Thanks,
Yonni

p.s. Thank you to both Raul and Shahrokh. The threads of you two going back and forth have been very helpful for setting up the analysis. 

San Jose Estepar, Raul,Ph.D.

unread,
Aug 15, 2023, 10:26:11 AM8/15/23
to Yonni Friedlander, ChestImagingPlatform-users
Hi Yonni,

That option defines the resampling voxel size at which the whole pipeline operates. This is a trade off between the your native imaging resolution and the resolution at which you want to obtain measurements. It is recommended that is constant for your whole study. We usually set this parameters to 0.625 for our studies. Something to keep in mind is that vessel particles need isotropic voxel size, so this value is used for all the sizes.

I hope this helps

Raul



The information in this e-mail is intended only for the person to whom it is addressed.  If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline .


Please note that this e-mail is not secure (encrypted).  If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately.  Continuing to send or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail. 

Reply all
Reply to author
Forward
0 new messages