View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003363 | Slicer4 | Core: Base Code | public | 2013-09-03 07:09 | 2014-03-06 10:17 |
Reporter | lassoan | Assigned To | millerjv | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | |||||
Target Version | Slicer 4.4.0 | Fixed in Version | Slicer 4.4.0 | ||
Summary | 0003363: Vector fields cannot be read from nrrd files | ||||
Description | When a vector field (3D array of 3-component vectors) is loaded from a nrrd (or nhdr) file then an empty volume is created. In contrast, the same content is loaded correctly from mha (or mhd) file. The problem is fully reproducible with the attached file. | ||||
Tags | No tags attached. | ||||
2013-09-03 07:09
|
SmallDefField.nrrd (58,599 bytes) |
2013-09-03 07:09
|
SmallDefField.mha (51,506 bytes) |
2013-09-03 07:10
|
SmallDefField.vti (58,817 bytes) |
By the way, loading of vector fields doesn't work for vti format either. |
|
Probably the transform is being read by ITK's transform IO classes so it doesn't support the same types as the image IO classes. I've assigned this to Alex because we've been talking about having him take on a lot of the non-linear transform related issues now that diffusion is in good shape. |
|
The factory mechanism in vtkSlicerVolumesLogic treats vector volume as a DTI volume currently. If I change the order of creation of the factories, it then reads DTI volume as vectors. I need Jim's help in figuring out the factory logic, since he is the original author. Re-targeting to future release. |
|
When I load SmallDefField.nnrd, it gets loaded as a VectorVolumeNode. Printing out the details, it contains both scalars and vectors. ID: vtkMRMLVectorVolumeNode3 Origin: 25.67 102.917 129.554 Order: -1 |
|
Another way to reproduce it: Reassigning to Jim since he is looking into it. |
|
Note the differences in the vtkMRMLVectorVolumeNode created from mha and nrrd: In case of mha files loading (correct behavior):
In case of nrrd files loading (wrong behavior):
It seems that a garbage "NRRDImage" array is created when importing the data from NRRD. This array has only one component and it has incorrect values (some random values in a smaller rectangular region; all zeros outside). |
|
The mha loads the data as scalars. Is this what you wanted? Or do you really want vectors? For reference, the Multivolume code loads time series data as multi component scalars. |
|
I would prefer to have the data imported into a format that Slicer can deal with. Slicer seems to be able to handle vtkMRMLVectorVolumeNodes with 3-component scalar image data quite well: you can probe them, you can visualize them correctly. RGB color images are loaded into this format as well (from jpg, png, ...). So, I would prefer if nrrd volumes with 3 scalar components would be loaded into this same format. |
|
SmallDefField.nrrd has a "nrrd kind" of "vector". If I change the "nrrd kind" to "list", then the data loads properly into Slicer and can be visualized (assuming this deformation field looks like a gradient fill). Interestingly, while the data loads into a MRMLVectorVolumeNode, the data is actually stored in the Scalars as 3 component scalars. |
|
Fixed in r22607. Unified Slicer's treatment of vector images in vtkNRRDReader. Previously, 3-vector images were stored on the Vectors of the underlying ImageData. All other length vectors were stored as multi-component Scalars on the ImageData. This patch always assigns vector data as multi-component Scalars on the ImageData. |
|
Backported to Slicer-4-3 branch as r22643 |
|
Thank you. Tested on Slicer 4.3.1-2013-11-29 (Win64) and it works correctly. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2013-09-03 07:09 | lassoan | New Issue | |
2013-09-03 07:09 | lassoan | Status | new => assigned |
2013-09-03 07:09 | lassoan | Assigned To | => jcfr |
2013-09-03 07:09 | lassoan | File Added: SmallDefField.nrrd | |
2013-09-03 07:09 | lassoan | File Added: SmallDefField.mha | |
2013-09-03 07:10 | lassoan | File Added: SmallDefField.vti | |
2013-09-03 07:10 | lassoan | Note Added: 0009829 | |
2013-09-03 07:17 | jcfr | Target Version | => Slicer 4.3.1 |
2013-09-03 09:01 | pieper | Note Added: 0009834 | |
2013-09-03 09:01 | pieper | Assigned To | jcfr => alexy |
2013-09-22 10:00 | alexy | Note Added: 0010040 | |
2013-09-22 10:00 | alexy | Target Version | Slicer 4.3.1 => Slicer 4.3.2 |
2013-09-23 10:35 | millerjv | Note Added: 0010051 | |
2013-09-23 13:11 | alexy | Note Added: 0010069 | |
2013-09-23 13:11 | alexy | Assigned To | alexy => millerjv |
2013-09-23 13:39 | lassoan | Note Added: 0010070 | |
2013-09-23 13:45 | millerjv | Note Added: 0010071 | |
2013-09-23 14:00 | lassoan | Note Added: 0010072 | |
2013-09-25 04:09 | millerjv | Note Added: 0010088 | |
2013-10-09 03:45 | millerjv | Note Added: 0010157 | |
2013-10-09 03:45 | millerjv | Status | assigned => resolved |
2013-10-09 03:45 | millerjv | Resolution | open => fixed |
2013-10-26 19:14 | jcfr | Note Added: 0010228 | |
2013-10-26 19:14 | jcfr | Fixed in Version | => Slicer 4.3.2 |
2013-12-02 10:43 | lassoan | Note Added: 0010394 | |
2013-12-02 10:43 | lassoan | Status | resolved => closed |
2014-03-06 10:16 | nicole | Target Version | Slicer 4.3.2 => Slicer 4.4.0 |
2014-03-06 10:17 | nicole | Fixed in Version | Slicer 4.3.2 => Slicer 4.4.0 |