View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003125 | Slicer4 | Core: MRML | public | 2013-05-20 09:08 | 2017-06-07 23:27 |
Reporter | hjmjohnson | Assigned To | pieper | ||
Priority | immediate | Severity | block | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | Slicer 4.2.2-1 | ||||
Target Version | Slicer 4.3.0 | Fixed in Version | Slicer 4.3.0 | ||
Summary | 0003125: Compressed Nifti files not stored properly in MRML | ||||
Description | The double extension of .nii.gz is not being preserved. when writing the file in the MRML scene. | ||||
Steps To Reproduce | After starting Slicer with any compressed nifti file: ANY_COMPRESSED_NIFTI_FILE=/Users/johnsonhj/Dropbox/DATA/ANTS_NIPYPE_SMALL_TEST/orig_data/SUBJ_A_small_T1.nii.gz /Applications/Slicer.app/Contents/MacOS/Slicer $ANY_COMPRESSED_NIFTI_FILE Then save the MRML scene. grep $(basename ${ANY_COMPRESSED_NIFTI_FILE//.nii.gz/}) *.mrml
NOTE THE fileName: SUBJ_A_small_T1.gz <-- is missing the .nii part. | ||||
Tags | No tags attached. | ||||
echo "STEP 1: Download any compressed nifti file" echo "STEP 2: Load file in slicer" echo "STEP 3: Save mrml scene" echo "STEP 4: Load mrml scene" echo "STEP 5: scratch head as to why the scene looks wrong" ERROR: In /scratch/johnsonhj/src/Slicer/Libs/MRML/Core/vtkMRMLVolumeArchetypeStorageNode.cxx, line 367 echo "STEP 5: Notice file name is wrong: '/scratch/test.gz' instead of '/scratch/test.nii.gz'" |
|
Reminder sent to: finetjul, pieper I've added myself and Julien to monitor this issue. I'm hoping Julien can provide a pointer to the right place to look for a fix to this (or even better maybe he knows a good fix). |
|
I'll bet it's related to this change [1] that was an attempt to fix [2]. I could believe it because QFileInfo::suffix probably doesn't understand .nii.gz. |
|
The file path is ...nii.gz until the save data dialog is open. it then becomes .gz |
|
Function "completeSuffix" should probably be used. |
|
@Hans: did it ever work in slicer4 to open a .nii.gz file and save the scene with a reference to it? I'm just trying to get a sense of how extensive the changes need to be. I don't think my recent changes related to 0002326 are the only thing going on here. |
|
Never mind - I see now. The behavior is different because now the volume is selected for saving by default, whereas previously the filename was wrong (test.nii.nrrd) but wasn't being used. You can ignore the question in comment 9273. |
|
Thanks for looking into this. It has been a major source of frustration for our lab. Hans |
|
Please try r22246. |
|
Number of instantiated modules: 125 The issue is still not fixed. now the file that is attempting to be read has ".nii.nii.gz" as the extension. |
|
Okay I'll keep investigating. |
|
Okay - I think I've got it this time. We could investigate other ways of managing default filenames but this should at least fix the regression. Try r22259 |
|
This is now working. Hans |
|
Slicer: 2145-support-for-installing-extension-from-file 88f78008 2013-07-30 14:08:47 Details Diff |
BUG: 0003125 preserve .nii.gz extension on scene save Use completeSuffix per suggestion from jcfr. Note this code may still change as I work on fixes for 0002326. git-svn-id: http://svn.slicer.org/Slicer4/trunk@22246 3bd1e089-480b-0410-8dfb-8563597acbee |
||
mod - Base/QTGUI/qSlicerSaveDataDialog.cxx | Diff File | ||
Slicer: 2145-support-for-installing-extension-from-file b1db2147 2013-08-06 09:20:50 Details Diff |
BUG: 0003125 filename not changed if it is still default from load The file load mechanism assigns a default node name based on the filename. If the node no longer has that default name, update the filename to match what the user provided. git-svn-id: http://svn.slicer.org/Slicer4/trunk@22259 3bd1e089-480b-0410-8dfb-8563597acbee |
||
mod - Base/QTGUI/qSlicerSaveDataDialog.cxx | Diff File | ||
Slicer: 2145-support-for-installing-extension-from-file 2c0985ad 2013-08-06 09:43:58 Details Diff |
BUG: 0002326 mark a node as modified if the name has changed When the user has changed the name of a node this is reflected in the suggested name of the file (see issue 0003125). With this fix the node is also marked as modified so that it will be checked for saving. This means that changing the name of a node in the scene will cause it to be saved to a new file on disk which is a slight change in behavior and may cause people to use more disk space. But in general I think this is safer and more clear, since file names will always match the name of the node in the scene and users will prefer that I believe. git-svn-id: http://svn.slicer.org/Slicer4/trunk@22260 3bd1e089-480b-0410-8dfb-8563597acbee |
||
mod - Base/QTGUI/qSlicerSaveDataDialog.cxx | Diff File | ||
mod - Libs/MRML/Core/vtkMRMLStorableNode.h | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-05-20 09:08 | hjmjohnson | New Issue | |
2013-05-20 09:08 | hjmjohnson | Status | new => assigned |
2013-05-20 09:08 | hjmjohnson | Assigned To | => jcfr |
2013-05-20 11:39 | jcfr | Target Version | Slicer 4.4.0 => Slicer 4.3.0 |
2013-07-11 05:36 | hjmjohnson | Note Added: 0009005 | |
2013-07-11 05:37 | hjmjohnson | Priority | high => immediate |
2013-07-11 05:37 | hjmjohnson | Severity | major => block |
2013-07-11 05:37 | hjmjohnson | Projection | none => tweak |
2013-07-11 05:37 | hjmjohnson | ETA | none => < 1 week |
2013-07-11 13:19 | pieper | Note Added: 0009017 | |
2013-07-11 13:32 | pieper | Relationship added | related to 0002326 |
2013-07-11 13:32 | pieper | Note Added: 0009018 | |
2013-07-11 13:33 | pieper | Assigned To | jcfr => pieper |
2013-07-11 13:42 | finetjul | Note Added: 0009019 | |
2013-07-11 13:50 | jcfr | Note Added: 0009020 | |
2013-07-30 09:48 | pieper | Note Added: 0009273 | |
2013-07-30 09:52 | pieper | Note Added: 0009274 | |
2013-07-30 09:55 | hjmjohnson | Note Added: 0009275 | |
2013-07-30 10:09 | pieper | Note Added: 0009276 | |
2013-07-30 10:09 | pieper | Status | assigned => resolved |
2013-07-30 10:09 | pieper | Fixed in Version | => Slicer 4.3.0 |
2013-07-30 10:09 | pieper | Resolution | open => fixed |
2013-07-30 11:25 | hjmjohnson | Note Added: 0009283 | |
2013-07-30 11:25 | hjmjohnson | Status | resolved => feedback |
2013-07-30 11:25 | hjmjohnson | Resolution | fixed => reopened |
2013-07-30 12:00 | pieper | Note Added: 0009286 | |
2013-08-06 05:21 | pieper | Note Added: 0009388 | |
2013-08-06 05:21 | pieper | Status | feedback => resolved |
2013-08-06 05:21 | pieper | Resolution | reopened => fixed |
2013-09-04 19:05 | fedorov | Relationship added | parent of 0003373 |
2013-09-05 15:13 | fedorov | Relationship added | related to 0003374 |
2013-10-08 06:31 | hjmjohnson | Note Added: 0010152 | |
2013-10-08 06:31 | hjmjohnson | Status | resolved => closed |
2017-06-07 23:27 | pieper | Changeset attached | => Slicer 2145-support-for-installing-extension-from-file 2c0985ad |
2017-06-07 23:27 | pieper | Changeset attached | => Slicer 2145-support-for-installing-extension-from-file b1db2147 |
2017-06-07 23:27 | pieper | Changeset attached | => Slicer 2145-support-for-installing-extension-from-file 88f78008 |