tbaudier [Thu, 15 Nov 2018 15:50:13 +0000 (16:50 +0100)]
Check if mask and input have the same spacing to compute SUVPeak
Before, the output of the SUVPeak was unrealistic with a mask with a spacing different from the input.
Now, check if they have the same spacing. If not, the script raises an error.
I add an option (--allow_resize) to automatically resize the mask according to the input like in the clitkImageStatistics script
tbaudier [Thu, 15 Nov 2018 15:24:18 +0000 (16:24 +0100)]
Change behavior of clitkCropImage with like option
Before, if we cropped an image like another, the output's origin was set at the origin of the input.
But we prefer to keep the registration correctly, so we prefer to have an output's origin defined to still have the registration between the output and the input.
This is the normal behavior of the itk::PasteImageFilter.
I removed the SetNumberOfRequiredInputs to avoid this error: PasteImageFilter(0x1927770): At least 2 of the first 2 indexed inputs are required but only 1 are specified. The required inputs are expected to be the first inputs.
I add the updateOrigin flag to keep the previous behavior. If the flag is set to On (default is off), the origin of the output is set to the same origin than the input.
I update the description of the filte about this origin managment
tbaudier [Wed, 14 Nov 2018 12:28:25 +0000 (13:28 +0100)]
Merge dose by region uncertainties using Gate uncertainty calculation
Instead of using partial uncertainty, I use the total dose or edep and the square of the dose and edep like
I removed a bash function because it's useless
tbaudier [Fri, 9 Nov 2018 08:49:28 +0000 (09:49 +0100)]
Modify mergeDoseByRegion
Before, it summed 2 files to write the result.
But I had to modify it to be able to sum partial std. So I created 3 functions:
-addToPartialResult with the previous code
- addWithoutPartialResult for the first file
- divideUncertaintyResult for the last step
tbaudier [Tue, 16 Oct 2018 08:41:26 +0000 (10:41 +0200)]
Add like option in clitkExtrude tool
Before we had to set size, spacing and origin for the new dimension
But we could want to have the same size, spacing and origin than another image.
So I add the like option
I remove the required for the size option because if like is set , size is not mandatory
I controled that like and origin, size or spacing are not set at the same time
Add AffineRegistration library to avoid compilation error
With a lot of cores, clitkElastixTransformToMatrix (that need clitkAffineTransform) can be compiled before clitkAffineTransform
And the gengetopt of clitkAffineTransform is not compiled leading to an error
David Boersma [Fri, 9 Mar 2018 14:11:26 +0000 (15:11 +0100)]
avoid segfault when adding ROI to image w/o trafo
we got segfaults with VV when doing the following
1. start VV
2. select CT image set (DICOM)
3. open ROI from DICOM
The segfault happened right after we had selected the names of the ROIs to be selected from the RS.* file.
After compiling VV as a "Debug" build and running the above steps in gdb, the
backtrace showed that the crash was caused in line 125 of
vvBinaryImageOverlayActor.cxx. Apparently our CT image was represented without
any transformation at that point in the code, while the code assumed that there
would always be a transformation.
If it is DICOM-wise or VTK-wise legal for an image to have an empty vector of
transformations, then I think that my fix is sufficient.
If you think that it is anomalous that this vector was empty in our case, then
I think more work is needed. For instance, if this situation could really only
happen if the input data is somehow corrupt, then the user should get an
informative error message about that, and maybe VV just terminates after that
in a more controlled way. Or maybe VV should just provide identity trafo to
images that have an empty trafo vector. Or, less likely, maybe the image did
have a trafo but VV somehow manages to lose it? In all these cases this PR is
insufficient. I can't tell myself, because I am not an image expert. :-)