With a image with a non-null direction matrix, it failed during min/max computation
Set direction matrix to output and mask copying the input direction matrix to solve the problem
tbaudier [Wed, 20 Mar 2019 09:02:24 +0000 (10:02 +0100)]
Add 2 options to clitkImage2Dicom
volum option:
To save a volume instead of a slice serie
Need to know the output dimension before compilitaion, so the template of the function is modified
tag and key options:
To change dicom tag
Keep the model of clitkWriteDicomSeries
tbaudier [Fri, 8 Mar 2019 08:23:46 +0000 (09:23 +0100)]
Revert previsous commit with Roi name
With RoiType instead of RoiName, the name of the previous ROI is not correct (ORGAN)
and the name of the new ROI correspond to the filename with ROIName
So I choose to pass ROIName and to change the name of the new ROI to the same than in RoiType
tbaudier [Thu, 7 Mar 2019 15:48:24 +0000 (16:48 +0100)]
Changment of cursor color value to keep the same color than before VTK8
With VTK update, the color of the cursor was white
I found that, passing value from int (base 256) to double (base 1.0) change the behavior
So I adapted the color to keep the red for the activated image, the green, unactivated slice and light blue for unactivated linked image
tbaudier [Tue, 5 Mar 2019 09:46:40 +0000 (10:46 +0100)]
Into ImageArithm GUI in vv, add other operations
Add Difference and relative difference between 2 images
Add Divide, normalize and log for single image
Rename, 2 buttons to adapt to real function (without V)
tbaudier [Mon, 4 Mar 2019 15:49:12 +0000 (16:49 +0100)]
Better control to avoid segfault
With one input, the accept function is called 3 times instead of 2 (I do not know why)
It leads to a segfault in mListOfSimpleInputWidget[3] so to avoid it I added a check
tbaudier [Mon, 4 Mar 2019 15:47:12 +0000 (16:47 +0100)]
Change name of the button in Image Arithm tool
Before, it was QDialogButtonBox::Discard, but according to https://doc.qt.io/archives/qt-4.8/qdialogbuttonbox.html#StandardButton-enum
it can be displayed "Don't save".
For this tool, we want to select 1 image instead of 2, so the name of the button is not appropriate.
Moreover in skip function, the comparision to "Discard" can be complicated with another name.
So I prefer to use Ignore button because it's more appropriate
tbaudier [Mon, 4 Mar 2019 13:25:06 +0000 (14:25 +0100)]
Inverse VTK_VERSION VERSION_GREATER to VERSION_LESS
It seems that VERSION_GREATER is not granter and equal, so I prefer to use VERSION_LESS to include the version 8.2.0
tbaudier [Thu, 28 Feb 2019 13:05:14 +0000 (14:05 +0100)]
Add instanceNumber sorting for clitkDicom2Image
Sometimes (eg: with MR from HEH), the basic algorithm is not sufficient to sort dicom slices
It is the case when multiples sequences are in the same image, the z position is the same for a same slice in all sequences, it creates conflict
In such a case, we can sort slices according instanceNumber
tbaudier [Thu, 28 Feb 2019 10:10:16 +0000 (11:10 +0100)]
Change header includion from .h to .cxx file
With ITK5, it was not possible to compile clitkAffineRegistrationGenericFilter with the included file clitkTransformUtilities.h
when the include were in the .h file
With include in the .cxx file it works
tbaudier [Fri, 15 Feb 2019 15:43:37 +0000 (16:43 +0100)]
Change itkSimpleFastMutexLock to std::mutex
This is mandatory with ITK5 and c++11
The filters created an itk::Image<itk::SimpleFastMutexLock, dim> but this procedure is not possible with itk::Image<std::mutex, dim>
(cannot copy a mutex)
So I created a mutex alone and lock/unlock it when it is necessary
tbaudier [Fri, 15 Feb 2019 12:23:42 +0000 (13:23 +0100)]
Remove vcl_math calls
In the early days of itk development, many c++ compilers treated
math functions inconsistently. The vcl_math routines provided a
platform independent interface. Now, with modern c++ compilers, math
functions are treated more uniformly. This patch removes the vcl_math
calls. The extra layer provided by vcl is no longer needed and may
even cause problems with newer compilers.
tbaudier [Thu, 17 Jan 2019 15:34:32 +0000 (16:34 +0100)]
Correct roi name into DicomRTStruct
Replace RoiName by RoiType because into the DicomRTStruct, before, it displayed the RoiName (name of the file) instead of the name of the ROI (RoiType)
tbaudier [Mon, 14 Jan 2019 12:21:02 +0000 (13:21 +0100)]
Add a watcher to file
vv reload automatically a file if it changed on the disk.
The watcher is on the mhd file, and when it send a signal:
we find the item in the data tree corresponding to that file (in the data tree the items are written with an extra 0 at the end of the pathname)
We reload all these items stored in a vector
tbaudier [Fri, 11 Jan 2019 10:55:04 +0000 (11:55 +0100)]
Remove extract_series option
With the itk::GDCMSeriesFileNames, we automatically have the dicom sorted according series, so this option is not necessary anymore.
So I removed the option in the .ggo file and I remove the if conditions.
I add .c_str() to series_UID to remove trailling white spaces
tbaudier [Thu, 20 Dec 2018 12:53:01 +0000 (13:53 +0100)]
Add condition into clitkDicom2Image
The name return by GDCMSeriesFileNames starts by ./ if it is in the current folder or not if not. And the filenames never stat by ./
So I need to remove ./ only if it starts with ./
tbaudier [Thu, 20 Dec 2018 12:08:55 +0000 (13:08 +0100)]
Change dicom file sorting procedure in clitkDicom2Image
In clitkDicom2Image, the sorting of files was based on the slice position but it's not correct when a transformation matrix is set.
It's ok when you open a dicom serie with vv. So I used GDCMSeriesFileNames like with vv to sort filenames correctly
tbaudier [Thu, 20 Dec 2018 10:01:48 +0000 (11:01 +0100)]
Change serie number to serie UID
In clitkDicom2Image, change serie number to serie UID.
Serie UID is more restrictive and better to separate series
Change number to string because series UID is a string
Series UID is better to use itk::GDCMSeriesFileNames
tbaudier [Wed, 19 Dec 2018 14:50:37 +0000 (15:50 +0100)]
Debug opening dicom with rotation matrix
With the introduction of the choose in the Image reader to open the dicom with or without the patient coordinate system, I need to pass the value of the patient flag to take into account the transformation matrix
tbaudier [Thu, 22 Nov 2018 15:36:11 +0000 (16:36 +0100)]
Debug: correct wrong flag in condition
When the flag patientSystem was introduced in clitkDicom2Image to save the patient matrix, the flag to check the tool has to compute this matrix was not correct
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