View Issue Details

IDProjectCategoryView StatusLast Update
0003306Slicer4Core: MRMLpublic2015-11-12 14:54
ReporterpieperAssigned Toalexy 
PrioritynormalSeverityminorReproducibilityhave not tried
Status assignedResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0003306: should have a meaningful version in the mrml scene file
Description

Currently all slicer4 mrml scenes have the version "Slicer4" which is not helpful.

Slicer3 scenes included the svn revision number as the version, and when you loaded a scene file you were warned if the file came "from the future" in the sense that it was written by a newer version of slicer than the one you are trying to load with since older versions may not support everything in a new version.

Steps To Reproduce

This is where the version is set when writing:

[1] https://github.com/Slicer/Slicer/blob/master/Modules/Loadable/Data/qSlicerSceneWriter.cxx#L169

TagsNo tags attached.

Relationships

related to 0003231 assignedalexy mrml should be versioned (and documented) 

Activities

pieper

pieper

2013-08-21 10:04

administrator   ~0009540

In slicer3 a version file was generated in the build tree which also was copied into the installation.

This script generated the file:

http://viewvc.slicer.org/viewvc.cgi/Slicer3/trunk/Scripts/versioner.tcl?revision=16989&view=markup

Which was accessed in slicer3 with the following application methods:

//----------------------------------------------------------------------------
const char* vtkSlicerApplication::GetSvnRevision()
{
if (strlen(this->SvnRevision) == 0)
{
this->InitializeSlicer3Version();
}
return this->SvnRevision;
}

//----------------------------------------------------------------------------
void vtkSlicerApplication::InitializeSlicer3Version()
{
std::string txtfile(this->GetBinDir());
txtfile += "/../";
txtfile += Slicer3_INSTALL_LIB_DIR;
txtfile += "/";
txtfile += "Slicer3Version.txt";

std::string platform("");
std::string build_date("");
std::string svnurl("");
std::string svnrevision("");

std::ifstream ifs(txtfile.c_str());

std::string line;
while (std::getline(ifs, line, '\n')) {
if (line.find("build ") == 0) {
platform = line.substr(6);
} else if (line.find("buildDate ") == 0) {
build_date = line.substr(10);
} else if (line.find("svnurl ") == 0) {
svnurl = line.substr(7);
int pos = svnurl.find_last_of("/");
svnurl = svnurl.substr(pos + 1 );
} else if (line.find("svnrevision ") == 0) {
svnrevision = line.substr(12);
}
}

ifs.close();

strcpy(this->Platform, platform.c_str());
strcpy(this->BuildDate, build_date.c_str());
strcpy(this->SvnUrl, svnurl.c_str());
strcpy(this->SvnRevision, svnrevision.c_str());
}

Issue History

Date Modified Username Field Change
2013-08-21 10:00 pieper New Issue
2013-08-21 10:00 pieper Status new => assigned
2013-08-21 10:00 pieper Assigned To => alexy
2013-08-21 10:04 pieper Note Added: 0009540
2014-09-19 06:47 fedorov Relationship added related to 0003231
2014-09-25 12:49 jcfr Target Version => Slicer 4.4.1
2015-09-09 08:28 jcfr Target Version Slicer 4.4.1 => Slicer 4.5.0-1
2015-11-02 11:19 jcfr Target Version Slicer 4.5.0-1 =>
2015-11-12 14:54 jcfr Severity major => minor