[Vv] clitkDicom2Image + clitkWriteDicomSeries to apply a rotation to a dicom series gives zero-valued pixels: perhaps a "missing library" problem?

Giorgio De Nunzio giorgio.denunzio at unisalento.it
Mon Jun 4 19:32:50 CEST 2018


Dear vv users,

I am trying to apply an arbitrary rotation to a CT dicom series. Following what Thomas Baudier suggested me (thanks!), I am doing something like:

clitkDicom2Image 12031838/* -o image.mhd --verbose

to convert the dicom series contained in 12031838 into a mhd image, followed by

clitkWriteDicomSeries  -i image.mhd   -d 12031838 -o 12031838out  -k '0020|0037'  -t  '0\1\0\-1\0\0' --verbose

to apply the rotation (by changing the DICOM tags) and to write the new series to disk to the 12031838out directory.

The first command works (I can look at the converted image by vv) but the second doesn't: a series is actually produced,
but when I try and read it back into vv, all the pixels in all the slices have value equal to 0.

The --verbose parameter allows me to see the following output, containing two warnings:

clitkWriteDicomSeries    -i image.mhd  -d 12031838  -o  12031838out -k   '0020|0037'  -t  '0\1\0\-1\0\0' --verbose

Image was detected to be 3D and short...
Launching filter in 3D and signed short...
279 were read in the directory 12031838...

filename # 0 = 12031838/24085725
filename # 1 = 12031838/24085707
......  <omissis>  .......
filename # 277 = 12031838/24088089
filename # 278 = 12031838/24088071

Warning: The image spacing differs between the MHD file and the input
dicom series. Performing resampling with default options using spacing
as reference (for advanced options, use clitkResampleImage).

MHD -> [0.585938, 0.585938, 1]
dicom -> [0.585938, 0.585938, 1]
Output Spacing = [0.585938, 0.585938, 1]
Output Size    = [512, 512, 279]
Gaussian       = 0
Interpol       = NearestNeighbor
Threads        = 4
LastDimIsTime  = 0
ImageRegion (0x7ffffa883020)
   Dimension: 3
   Index: [0, 0, 0]
   Size: [512, 512, 279]
[512, 512, 279]
numberOfKeysGiven = [ 1 ]
entryId = [ 0020|0037 ]
seriesUID = [  ]
frameOfReferenceUID = [  ]
studyUID = [  ]
ImageSeriesWriter (0x32b9310)
   RTTI typeinfo:   itk::ImageSeriesWriter<itk::Image<short, 3u>,
itk::Image<short, 2u> >
   Reference Count: 2
   Modified Time: 9954
   Debug: Off
   Object Name:
   Observers:
     none
   Inputs:
     Primary: (0x32bc360)
   Indexed Inputs:
     0: Primary (0x32bc360)
   No Required Input Names
   NumberOfRequiredInputs: 0
   Outputs:
     Primary: (0)
   Indexed Outputs:
     0: Primary (0)
   NumberOfRequiredOutputs: 0
   Number Of Threads: 4

  WARNING: In
/home/tbaudier/vv/vv_static/ITK/InsightToolkit-4.9.0/Modules/Core/Common/src/itkProcessObject.cxx,
line 1212
ImageSeriesWriter (0x32b9310): Output doesn't exist!

   ReleaseDataFlag: Off
   ReleaseDataBeforeUpdateFlag: On
   AbortGenerateData: Off
   Progress: 0
   Multithreader:
     RTTI typeinfo:   itk::MultiThreader
     Reference Count: 1
     Modified Time: 9949
     Debug: Off
     Object Name:
     Observers:
       none
     Thread Count: 4
     Global Maximum Number Of Threads: 128
     Global Default Number Of Threads: 4
   Image IO: GDCMImageIO (0x29a3ed0)
   RTTI typeinfo:   itk::GDCMImageIO
   Reference Count: 4
   Modified Time: 9596
   Debug: Off
   Object Name:
   Observers:
     none
   AbortGenerateData: Off
   Progress: 0
   FileName: 12031838/24088071
   FileType: Binary
   ByteOrder: LittleEndian
   IORegion:
     ImageIORegion (0x29a3f38)
       Dimension: 3
       Index: 0 0 0
       Size: 512 512 1
   Number of Components/Pixel: 1
   Pixel Type: scalar
   Component Type: short
   Dimensions: ( 512 512 1 )
   Origin: ( -139.707 -296.707 -15 )
   UseCompression: Off
   UseStreamedReading: On
   UseStreamedWriting: Off
   Internal Component Type: unsigned_short
   RescaleSlope: 1
   RescaleIntercept: -1024
   KeepOriginalUID:Off
   LoadPrivateTags:Off
   UIDPrefix: 1.2.826.0.1.3680043.2.1125.1
   StudyInstanceUID:
   SeriesInstanceUID:
   FrameOfReferenceInstanceUID:
   CompressionType:1
   Patient Name:ANONYMOUS
   Patient ID:368378
   Patient Sex:F
   Patient Age:058Y
   Study ID:305
   Patient DOB:19461003
   Study Description:Thorax^LungLowDose
   Body Part:CHEST
   Number Of Series In Study:
   Number Of Study Related Series:
   Study Date:20041203
   Modality:CT
   Manufacturer:SIEMENS
   Institution Name:ANONYMOUS
   Model:Volume Zoom
   Scan Options:

   StartIndex: 1
   IncrementIndex: 1
   SeriesFormat: %d
   MetaDataDictionaryArray: 0x2e96b78
   Compression: Off


The first warning is

Warning: The image spacing differs between the MHD file and the input
dicom series. Performing resampling with default options using spacing
as reference (for advanced options, use clitkResampleImage).

and the second one is

  WARNING: In
/home/tbaudier/vv/vv_static/ITK/InsightToolkit-4.9.0/Modules/Core/Common/src/itkProcessObject.cxx,
line 1212
ImageSeriesWriter (0x32b9310): Output doesn't exist!

I am uncertain concerning the first one, but the meaning of the second warning is with no doubt related to writing to disk, and could explain why the produced series is made of 0-valued pixels.

I have tried in Windows 10 ubuntu subsystem, in Windows 10 openSUSE subsystem, and in "real" openSUSE within VirtualBox (all of them, latest releases) with the same outcome.

Any hint?

Thank you very much.

Giorgio



---
Questa e-mail è stata controllata per individuare virus con Avast antivirus.
https://www.avast.com/antivirus



More information about the vv mailing list