<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.slicer.org/w/index.php?action=history&amp;feed=atom&amp;title=Documentation%2F4.1%2FDevelopers%2FIO</id>
	<title>Documentation/4.1/Developers/IO - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.slicer.org/w/index.php?action=history&amp;feed=atom&amp;title=Documentation%2F4.1%2FDevelopers%2FIO"/>
	<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/4.1/Developers/IO&amp;action=history"/>
	<updated>2026-05-03T09:51:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/4.1/Developers/IO&amp;diff=32219&amp;oldid=prev</id>
		<title>UpdateBot: Prepend documentation/versioncheck template. See http://na-mic.org/Mantis/view.php?id=2887</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/4.1/Developers/IO&amp;diff=32219&amp;oldid=prev"/>
		<updated>2013-06-14T07:22:48Z</updated>

		<summary type="html">&lt;p&gt;Prepend documentation/versioncheck template. See http://na-mic.org/Mantis/view.php?id=2887&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 07:22, 14 June 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Read=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Read=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:IOOverview.png|600px|center]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:IOOverview.png|600px|center]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>UpdateBot</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/4.1/Developers/IO&amp;diff=28125&amp;oldid=prev</id>
		<title>Finetjul: /* How to add support for reading a new file format ? */</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/4.1/Developers/IO&amp;diff=28125&amp;oldid=prev"/>
		<updated>2012-08-22T22:48:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;How to add support for reading a new file format ?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 22:48, 22 August 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l17&quot; &gt;Line 17:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 17:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# In &amp;lt;code&amp;gt;qSlicerXYZsModule::setup()&amp;lt;/code&amp;gt;, instantiate and register &amp;lt;code&amp;gt;qSlicerXYZsIO&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;qSlicerCoreIOManager&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# In &amp;lt;code&amp;gt;qSlicerXYZsModule::setup()&amp;lt;/code&amp;gt;, instantiate and register &amp;lt;code&amp;gt;qSlicerXYZsIO&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;qSlicerCoreIOManager&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Add file format to [Documentation/{{documentation/version}}/SlicerApplication/SupportedDataFormat|SupportedDataFormat] wiki page&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Add file format to [Documentation/{{documentation/version}}/SlicerApplication/SupportedDataFormat|SupportedDataFormat] wiki page&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==How to I open a volume file programmatically ?==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;qSlicerIO::IOProperties parameters;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;parameters[&amp;quot;fileName&amp;quot;] = QString(&amp;quot;/path/to/volume.vtk&amp;quot;);&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;// optionally specify options: e.g. parameters[&amp;quot;labelmap&amp;quot;] = true;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;qSlicerCoreApplication::application()-&amp;gt;coreIOManager()-&amp;gt;loadNodes(&amp;quot;VolumeFile&amp;quot;, parameters);&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== ModifiedSinceRead ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== ModifiedSinceRead ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Finetjul</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/4.1/Developers/IO&amp;diff=27842&amp;oldid=prev</id>
		<title>Finetjul at 02:51, 21 August 2012</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/4.1/Developers/IO&amp;diff=27842&amp;oldid=prev"/>
		<updated>2012-08-21T02:51:32Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 02:51, 21 August 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Read=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Read=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Image:IOOverview.png|600px|center]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Main classes ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Main classes ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;vtkSlicer&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;Node&amp;lt;/code&amp;gt; is a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[&lt;/del&gt;[http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Libs/MRML/Core/vtkMRMLStorableNode.h?view=markup storable node&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/del&gt;] that represents the data from file (e.g. [[http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Libs/MRML/Core/vtkMRMLModelNode.h?view=markup vtkMRMLModelNode&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/del&gt;])&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;vtkSlicer&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;Node&amp;lt;/code&amp;gt; is a [http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Libs/MRML/Core/vtkMRMLStorableNode.h?view=markup storable node] that represents the data from file (e.g. [[http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Libs/MRML/Core/vtkMRMLModelNode.h?view=markup vtkMRMLModelNode])&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;vtkSlicer&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;StorageNode&amp;lt;/code&amp;gt; is the file reader. It populates the storable node using the method  &amp;lt;code&amp;gt;vtkMRML&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;StorageNode::ReadData(vtkMRMLStorableNode*,bool)&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;vtkSlicer&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;StorageNode&amp;lt;/code&amp;gt; is the file reader. It populates the storable node using the method  &amp;lt;code&amp;gt;vtkMRML&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;StorageNode::ReadData(vtkMRMLStorableNode*,bool)&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;vtkSlicer&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;sLogic&amp;lt;/code&amp;gt; is the MRML logic of the &amp;lt;code&amp;gt;XYZ&amp;lt;/code&amp;gt; module. It exposes a convenient method &amp;lt;code&amp;gt;AddXYZ(const char* fileName, const char* nodeName=0);&amp;lt;/code&amp;gt; that creates a MRML &amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt; node (&amp;lt;code&amp;gt;vtkMRML&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;Node&amp;lt;/code&amp;gt;)and its associated storage node (&amp;lt;code&amp;gt;vtkMRML&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;StorageNode&amp;lt;/code&amp;gt;), add them into the scene, and call &amp;lt;code&amp;gt;vtkMRML&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;StorageNode::ReadData(vtkMRMLStorableNode*,bool);&amp;lt;/code&amp;gt; on the storage node to load the file. If the loading fails, it removes the previously created nodes from the scene.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;vtkSlicer&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;sLogic&amp;lt;/code&amp;gt; is the MRML logic of the &amp;lt;code&amp;gt;XYZ&amp;lt;/code&amp;gt; module. It exposes a convenient method &amp;lt;code&amp;gt;AddXYZ(const char* fileName, const char* nodeName=0);&amp;lt;/code&amp;gt; that creates a MRML &amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt; node (&amp;lt;code&amp;gt;vtkMRML&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;Node&amp;lt;/code&amp;gt;)and its associated storage node (&amp;lt;code&amp;gt;vtkMRML&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;StorageNode&amp;lt;/code&amp;gt;), add them into the scene, and call &amp;lt;code&amp;gt;vtkMRML&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;StorageNode::ReadData(vtkMRMLStorableNode*,bool);&amp;lt;/code&amp;gt; on the storage node to load the file. If the loading fails, it removes the previously created nodes from the scene.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l8&quot; &gt;Line 8:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;qSlicerCoreIOManager&amp;lt;/code&amp;gt; is the central class where any IO operation must go through. qSlicerIOs can be registered using &amp;lt;code&amp;gt;qSlicerCoreIOManager::registerIO(qSlicerIO*)&amp;lt;/code&amp;gt; and nodes can be loaded using &amp;lt;code&amp;gt;qSlicerCoreIOManager::loadNodes(...)&amp;lt;/code&amp;gt;. It exposes a set of convenient methods such as &amp;quot;what reader must be used for what file&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;qSlicerCoreIOManager&amp;lt;/code&amp;gt; is the central class where any IO operation must go through. qSlicerIOs can be registered using &amp;lt;code&amp;gt;qSlicerCoreIOManager::registerIO(qSlicerIO*)&amp;lt;/code&amp;gt; and nodes can be loaded using &amp;lt;code&amp;gt;qSlicerCoreIOManager::loadNodes(...)&amp;lt;/code&amp;gt;. It exposes a set of convenient methods such as &amp;quot;what reader must be used for what file&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;qSlicerDataDialog&amp;lt;/code&amp;gt; is the dialog that allows the user to select the files to load.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;qSlicerDataDialog&amp;lt;/code&amp;gt; is the dialog that allows the user to select the files to load.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==How to add support for reading a new file format ?==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# Write method &amp;lt;code&amp;gt;vtkMRMLXYZStorageNode::ReadDataInternal(vtkMRMLStorableNode*, bool temporary);&amp;lt;/code&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# Write method &amp;lt;code&amp;gt;vtkMRMLXYZsLogic::AddXYZ(const char* fileName, const char nodeName =0);&amp;lt;/code&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# Write class &amp;lt;code&amp;gt;qSlicerXYZsIO&amp;lt;/code&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# Optional: Write class &amp;lt;code&amp;gt;qSlicerXYZsIOOptionsWidget&amp;lt;/code&amp;gt; if you want the user to optionally specify loading options.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# In &amp;lt;code&amp;gt;qSlicerXYZsModule::setup()&amp;lt;/code&amp;gt;, instantiate and register &amp;lt;code&amp;gt;qSlicerXYZsIO&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;qSlicerCoreIOManager&amp;lt;/code&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# Add file format to [Documentation/{{documentation/version}}/SlicerApplication/SupportedDataFormat|SupportedDataFormat] wiki page&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== ModifiedSinceRead ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== ModifiedSinceRead ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l16&quot; &gt;Line 16:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 25:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;At exit time (&amp;lt;code&amp;gt;qSlicerMainWindow::closeEvent()&amp;lt;/code&amp;gt;), &amp;lt;code&amp;gt;vtkMRMLStorableNode::GetModifiedSinceRead()&amp;lt;/code&amp;gt; is called to check if the data in the node is the same as in the file or if it has been modified after the file was last read or written. It internally checks &amp;lt;code&amp;gt;vtkTimeStamp* vtkMRMLStorageNode::StoredTime&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;vtkTimeStamp vtkMRMLStorableNode::StorableModifiedTime&amp;lt;/code&amp;gt;. If the data is more recent, then a message dialog is shown to the user telling him that some data is different from file; leaving without saving will loose the changes.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;At exit time (&amp;lt;code&amp;gt;qSlicerMainWindow::closeEvent()&amp;lt;/code&amp;gt;), &amp;lt;code&amp;gt;vtkMRMLStorableNode::GetModifiedSinceRead()&amp;lt;/code&amp;gt; is called to check if the data in the node is the same as in the file or if it has been modified after the file was last read or written. It internally checks &amp;lt;code&amp;gt;vtkTimeStamp* vtkMRMLStorageNode::StoredTime&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;vtkTimeStamp vtkMRMLStorableNode::StorableModifiedTime&amp;lt;/code&amp;gt;. If the data is more recent, then a message dialog is shown to the user telling him that some data is different from file; leaving without saving will loose the changes.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;How to add support for reading a new file format ?&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Example &lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;# Write method &amp;lt;code&amp;gt;vtkMRMLXYZStorageNode&lt;/del&gt;:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;:ReadDataInternal(vtkMRMLStorableNode*, bool temporary);&amp;lt;&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* Models &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;# Write method &amp;lt;code&amp;gt;vtkMRMLXYZsLogic&lt;/del&gt;:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;:AddXYZ(const char* fileName, const char nodeName &lt;/del&gt;=&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;0);&amp;lt;&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;** [http&lt;/ins&gt;:/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;/viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Libs/MRML/Core/vtkMRMLModelNode.h?view=markup Libs/MRML/Core/vtkMRMLModelNode]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;# Write class &amp;lt;code&amp;gt;qSlicerXYZsIO&amp;lt;&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;** [http&lt;/ins&gt;:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;//viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Libs/MRML/Core/vtkMRMLModelStorageNode.h?view&lt;/ins&gt;=&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;markup Libs&lt;/ins&gt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;MRML/Core&lt;/ins&gt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;vtkMRMLModelStorageNode]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;# Optional&lt;/del&gt;: &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Write class &amp;lt;code&amp;gt;qSlicerXYZsIOOptionsWidget&amp;lt;&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&amp;gt; if you want the user to optionally specify loading options&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;** [http&lt;/ins&gt;:/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;/viewvc&lt;/ins&gt;.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;slicer.org/viewvc.cgi/Slicer4/trunk/Modules/Loadable/Models/Logic/vtkSlicerModelsLogic.h?view=markup Modules/Loadable/Models/Logic/vtkSlicerModelsLogic]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;# In &amp;lt;code&amp;gt;qSlicerXYZsModule&lt;/del&gt;:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;:setup()&amp;lt;&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&amp;gt;, instantiate and register &amp;lt;code&amp;gt;qSlicerXYZsIO&amp;lt;&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&amp;gt; to &amp;lt;code&amp;gt;qSlicerCoreIOManager&amp;lt;&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;** [http&lt;/ins&gt;://&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Modules/Loadable/Models/qSlicerModelsIO.h?view=markup Modules/Loadable/Models&lt;/ins&gt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;qSlicerModelsIO]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;# Add file format to &lt;/del&gt;[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Documentation&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;{{documentation&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;version}}&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;SlicerApplication&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;SupportedDataFormat|SupportedDataFormat&lt;/del&gt;] &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;wiki page&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;** &lt;/ins&gt;[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;http://viewvc.slicer.org&lt;/ins&gt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;viewvc.cgi/Slicer4/trunk/Modules/Loadable/Models/qSlicerModelsModule.h?view=markup Modules&lt;/ins&gt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Loadable&lt;/ins&gt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Models&lt;/ins&gt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;qSlicerModelsModule&lt;/ins&gt;]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Write=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Write=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The mechanism is &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;very &lt;/del&gt;similar to '''Read'''.  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The mechanism is similar to '''Read'''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;. &amp;lt;code&amp;gt;vtkMRMLXYZStorageNode::WriteDataInternal(...)&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;qSlicerXYZWriter&amp;lt;/code&amp;gt; must implemented&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=IO Dialogs=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=IO Dialogs=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;By default, all the IOs must be done through &amp;lt;code&amp;gt;qSlicerDataDialog&amp;lt;/code&amp;gt; for reading files and &amp;lt;code&amp;gt;qSlicerSaveDataDialog&amp;lt;/code&amp;gt; for writting files. However, due to historical reasons, it is possible to have custom dialogs for each node types.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;By default, all the IOs must be done through &amp;lt;code&amp;gt;qSlicerDataDialog&amp;lt;/code&amp;gt; for reading files and &amp;lt;code&amp;gt;qSlicerSaveDataDialog&amp;lt;/code&amp;gt; for writting files. However, due to historical reasons, it is possible to have custom dialogs for each node types.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Finetjul</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/4.1/Developers/IO&amp;diff=27840&amp;oldid=prev</id>
		<title>Finetjul: Created page with '=Read= == Main classes == * &lt;code&gt;vtkSlicer&lt;i&gt;XYZ&lt;/i&gt;Node&lt;/code&gt; is a [[http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Libs/MRML/Core/vtkMRMLStorableNode.h?view=markup storabl…'</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/4.1/Developers/IO&amp;diff=27840&amp;oldid=prev"/>
		<updated>2012-08-21T02:00:49Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;=Read= == Main classes == * &amp;lt;code&amp;gt;vtkSlicer&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;Node&amp;lt;/code&amp;gt; is a [[http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Libs/MRML/Core/vtkMRMLStorableNode.h?view=markup storabl…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=Read=&lt;br /&gt;
== Main classes ==&lt;br /&gt;
* &amp;lt;code&amp;gt;vtkSlicer&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;Node&amp;lt;/code&amp;gt; is a [[http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Libs/MRML/Core/vtkMRMLStorableNode.h?view=markup storable node]] that represents the data from file (e.g. [[http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Libs/MRML/Core/vtkMRMLModelNode.h?view=markup vtkMRMLModelNode]])&lt;br /&gt;
* &amp;lt;code&amp;gt;vtkSlicer&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;StorageNode&amp;lt;/code&amp;gt; is the file reader. It populates the storable node using the method  &amp;lt;code&amp;gt;vtkMRML&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;StorageNode::ReadData(vtkMRMLStorableNode*,bool)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;vtkSlicer&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;sLogic&amp;lt;/code&amp;gt; is the MRML logic of the &amp;lt;code&amp;gt;XYZ&amp;lt;/code&amp;gt; module. It exposes a convenient method &amp;lt;code&amp;gt;AddXYZ(const char* fileName, const char* nodeName=0);&amp;lt;/code&amp;gt; that creates a MRML &amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt; node (&amp;lt;code&amp;gt;vtkMRML&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;Node&amp;lt;/code&amp;gt;)and its associated storage node (&amp;lt;code&amp;gt;vtkMRML&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;StorageNode&amp;lt;/code&amp;gt;), add them into the scene, and call &amp;lt;code&amp;gt;vtkMRML&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;StorageNode::ReadData(vtkMRMLStorableNode*,bool);&amp;lt;/code&amp;gt; on the storage node to load the file. If the loading fails, it removes the previously created nodes from the scene.&lt;br /&gt;
* &amp;lt;code&amp;gt;qSlicer&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;sIO&amp;lt;/code&amp;gt; is a plugin that is registered by modules into the &amp;lt;code&amp;gt;qSlicerCoreIOManager&amp;lt;/code&amp;gt;. It is the interface between Qt and MRML logics. It internally calls &amp;lt;code&amp;gt;vtkSlicer&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;sLogic::Add&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;&amp;lt;/code&amp;gt;().&lt;br /&gt;
* &amp;lt;code&amp;gt;qSlicer&amp;lt;i&amp;gt;XYZ&amp;lt;/i&amp;gt;sIOOptionsWidget&amp;lt;/code&amp;gt; is a widget that sets loading options that gets passed to the logic.&lt;br /&gt;
* &amp;lt;code&amp;gt;qSlicerCoreIOManager&amp;lt;/code&amp;gt; is the central class where any IO operation must go through. qSlicerIOs can be registered using &amp;lt;code&amp;gt;qSlicerCoreIOManager::registerIO(qSlicerIO*)&amp;lt;/code&amp;gt; and nodes can be loaded using &amp;lt;code&amp;gt;qSlicerCoreIOManager::loadNodes(...)&amp;lt;/code&amp;gt;. It exposes a set of convenient methods such as &amp;quot;what reader must be used for what file&amp;quot;.&lt;br /&gt;
* &amp;lt;code&amp;gt;qSlicerDataDialog&amp;lt;/code&amp;gt; is the dialog that allows the user to select the files to load.&lt;br /&gt;
&lt;br /&gt;
== ModifiedSinceRead ==&lt;br /&gt;
In order to inform the user what data has been changed since it was last read, a ModifiedSinceRead mechanism is in place to track when was the file last read and when was the data last modified. If a modification happened , the storable node &amp;lt;code&amp;gt;vtkMRMLStorableNode::GetModifiedSinceRead()&amp;lt;/code&amp;gt; must return true. If the data in the node is the same as in the file, then &amp;lt;code&amp;gt;vtkMRMLStorableNode::GetModifiedSinceRead()&amp;lt;/code&amp;gt; must return false.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;vtkMRMLStorageNode&amp;lt;/code&amp;gt; keeps track of when a file was last read or written (&amp;lt;code&amp;gt;vtkTimeStamp* vtkMRMLStorageNode::StoredTime&amp;lt;/code&amp;gt;). &amp;lt;code&amp;gt;vtkMRMLStorableNode&amp;lt;/code&amp;gt; keeps track of when the data was last modified (&amp;lt;code&amp;gt;vtkTimeStamp vtkMRMLStorableNode::StorableModifiedTime&amp;lt;/code&amp;gt;). Anytime a &amp;lt;code&amp;gt;vtkMRMLStorableNode&amp;lt;/code&amp;gt; property that is saved in file is modified, the &amp;lt;code&amp;gt;StorableModifiedTime&amp;lt;/code&amp;gt; time stamp must be modified.&lt;br /&gt;
&lt;br /&gt;
At exit time (&amp;lt;code&amp;gt;qSlicerMainWindow::closeEvent()&amp;lt;/code&amp;gt;), &amp;lt;code&amp;gt;vtkMRMLStorableNode::GetModifiedSinceRead()&amp;lt;/code&amp;gt; is called to check if the data in the node is the same as in the file or if it has been modified after the file was last read or written. It internally checks &amp;lt;code&amp;gt;vtkTimeStamp* vtkMRMLStorageNode::StoredTime&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;vtkTimeStamp vtkMRMLStorableNode::StorableModifiedTime&amp;lt;/code&amp;gt;. If the data is more recent, then a message dialog is shown to the user telling him that some data is different from file; leaving without saving will loose the changes.&lt;br /&gt;
&lt;br /&gt;
==How to add support for reading a new file format ?==&lt;br /&gt;
# Write method &amp;lt;code&amp;gt;vtkMRMLXYZStorageNode::ReadDataInternal(vtkMRMLStorableNode*, bool temporary);&amp;lt;/code&amp;gt;&lt;br /&gt;
# Write method &amp;lt;code&amp;gt;vtkMRMLXYZsLogic::AddXYZ(const char* fileName, const char nodeName =0);&amp;lt;/code&amp;gt;&lt;br /&gt;
# Write class &amp;lt;code&amp;gt;qSlicerXYZsIO&amp;lt;/code&amp;gt;&lt;br /&gt;
# Optional: Write class &amp;lt;code&amp;gt;qSlicerXYZsIOOptionsWidget&amp;lt;/code&amp;gt; if you want the user to optionally specify loading options.&lt;br /&gt;
# In &amp;lt;code&amp;gt;qSlicerXYZsModule::setup()&amp;lt;/code&amp;gt;, instantiate and register &amp;lt;code&amp;gt;qSlicerXYZsIO&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;qSlicerCoreIOManager&amp;lt;/code&amp;gt;&lt;br /&gt;
# Add file format to [Documentation/{{documentation/version}}/SlicerApplication/SupportedDataFormat|SupportedDataFormat] wiki page&lt;br /&gt;
&lt;br /&gt;
=Write=&lt;br /&gt;
The mechanism is very similar to '''Read'''. &lt;br /&gt;
&lt;br /&gt;
=IO Dialogs=&lt;br /&gt;
By default, all the IOs must be done through &amp;lt;code&amp;gt;qSlicerDataDialog&amp;lt;/code&amp;gt; for reading files and &amp;lt;code&amp;gt;qSlicerSaveDataDialog&amp;lt;/code&amp;gt; for writting files. However, due to historical reasons, it is possible to have custom dialogs for each node types.&lt;/div&gt;</summary>
		<author><name>Finetjul</name></author>
		
	</entry>
</feed>