Difference between revisions of "Documentation/4.0/Developers/Sandbox"

From Slicer Wiki
Jump to: navigation, search
m (Text replacement - "slicerWiki/index.php" to "wiki")
 
(54 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{documentation/{{documentation/version}}/module-introduction-start|Foo}}
+
<noinclude>{{documentation/versioncheck}}</noinclude>
This work is part of the National Alliance for Medical Image Computing (NA-MIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149. Information on NA-MIC can be obtained from the [http://www.na-mic.org/ NA-MIC website].<br>Contact: Jim Miller, <email>miller@ge.com</email>
+
= Use of get_web_data and for_external_table =
{{documentation/{{documentation/version}}/module-introduction-logo-gallery}}
+
 
|Image:Logo-namicnew2.jpg|img1
+
The raw set of data retrieved using this [http://wiki.slicer.org/wiki/Special:GetData/Documentation/4.0/Developers/Sandbox_data URL] is reported below:
|Image:GE-logo.png|img2
+
 
|Image:ITK logo.png|img3
+
{{ambox
 +
| type      = content
 +
| text      = There are two extra empty lines !
 +
}}
 +
 
 +
<pre>
 +
 
 +
 
 +
Name,Color,Shape
 +
Apple,Red,Round
 +
Banana,Yellow,Oblong
 +
Orange,Orange,Round
 +
Pear,Yellow,"Pear-shaped"
 +
</pre>
 +
 
 +
{{ambox
 +
| type      = speedy
 +
| text      = The following table should contains Fruits
 +
}}
 +
 
 +
<pre>
 +
{{#get_web_data:url=http://wiki.slicer.org/wiki/Special:GetData/Documentation/4.0/Developers/Sandbox_data|format=CSV with header|data=name=Name,color=Color,shape=Shape}}
 +
{| class="wikitable"
 +
! Name
 +
! Color {{#for_external_table:<nowiki/>
 +
{{!}}-
 +
{{!}} [[{{{name}}}]]
 +
{{!}} {{{color}}} }}
 +
|}
 +
</pre>
 +
 
 +
= Use of get_web_data and external_value =
 +
 
 +
 
 +
== Using filter as template parameter ==
 +
<pre>
 +
{{#get_web_data:
 +
url=http://wiki.slicer.org/wiki/Special:GetData/Documentation/4.0/Developers/Sandbox_data
 +
|format=CSV with header
 +
|data=bananashape0=Shape
 +
|filters=Name=Banana
 +
}}
 +
* {{#external_value:bananashape0}}
 +
</pre>
 +
 
 +
{{#get_web_data:
 +
url=http://wiki.slicer.org/wiki/Special:GetData/Documentation/4.0/Developers/Sandbox_data
 +
|format=CSV with header
 +
|data=bananashape0=Shape
 +
|filters=Name=Banana
 +
}}
 +
* {{#external_value:bananashape0}}
 +
 
 +
 
 +
== Using filter as URL parameter ==
 +
<pre>
 +
{{#get_web_data:
 +
url=http://wiki.slicer.org/wiki/Special:GetData/Documentation/4.0/Developers/Sandbox_data,Name=Banana
 +
|format=CSV with header
 +
|data=bananashape1=Shape
 +
}}
 +
* {{#external_value:bananashape1}}
 +
</pre>
 +
 
 +
{{#get_web_data:
 +
url=http://wiki.slicer.org/wiki/Special:GetData/Documentation/4.0/Developers/Sandbox_data,Name=Banana
 +
|format=CSV with header
 +
|data=bananashape1=Shape
 +
}}
 +
* {{#external_value:bananashape1}}
 +
 
 +
 
 +
== Using fullurl ==
 +
 
 +
<pre>
 +
{{#get_web_data:
 +
url={{fullurl:Special:GetData/Documentation/4.0/Developers/Sandbox_data}}
 +
|format=CSV with header
 +
|data=bananashape2=Shape
 +
|filters=Name=Banana
 +
}}
 +
* {{#external_value:bananashape2}}
 +
</pre>
 +
 
 +
{{fullurl:Special:GetData/Documentation/4.0/Developers/Sandbox_data,Name=Banana}}
 +
 
 +
{{#get_web_data:
 +
url={{fullurl:Special:GetData/Documentation/4.0/Developers/Sandbox_data}}
 +
|format=CSV with header
 +
|data=bananashape2=Shape
 +
|filters=Name=Banana
 
}}
 
}}
{{documentation/{{documentation/version}}/module-introduction-end}}
+
* {{#external_value:bananashape2}}
  
 +
= Debug module-footer template =
  
{{documentation/{{documentation/version}}/module-introduction-start|Foo}}
+
[[Category:Documentation/{{documentation/version}}/Modules|DicomToNrrdConverter]]
* This work is part of the National Alliance for Medical Image Computing (NA-MIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149. Information on NA-MIC can be obtained from the [http://www.na-mic.org/ NA-MIC website].
+
{{#if: {{documentation/{{documentation/version}}/module-category}} | <!-- The following category will be 'MainCategory' assuming category parameter was 'MainCategory.SubCategory'-->
* Contact: Jim Miller, <email>miller@ge.com</email>
+
[[Category:Documentation/{{documentation/version}}/Modules/{{Strloc_prefix|{{documentation/{{documentation/version}}/module-category}}|strloc= {{strfind_short|{{documentation/{{documentation/version}}/module-category}}|.|1|lenstr={{strlen_quick|{{documentation/{{documentation/version}}/module-category}}}}|}}-1}}|DicomToNrrdConverter]]
{{documentation/{{documentation/version}}/module-introduction-logo-start}}
+
[[Category:Documentation/{{documentation/version}}/Modules/{{documentation/{{documentation/version}}/module-category}}|DicomToNrrdConverter]]
{{documentation/{{documentation/version}}/module-introduction-logo|image=Logo-namicnew2.jpg|caption=NA-MIC}}
+
| }}
{{documentation/{{documentation/version}}/module-introduction-logo|image=GE-logo.png|caption=GE}}
 
{{documentation/{{documentation/version}}/module-introduction-logo|image=ITK logo.png|caption=ITK}}
 
{{documentation/{{documentation/version}}/module-introduction-logo-end}}
 
{{documentation/{{documentation/version}}/module-introduction-end}}
 

Latest revision as of 17:02, 21 November 2019

Home < Documentation < 4.0 < Developers < Sandbox


For the latest Slicer documentation, visit the read-the-docs.


Use of get_web_data and for_external_table

The raw set of data retrieved using this URL is reported below:



Name,Color,Shape
Apple,Red,Round
Banana,Yellow,Oblong
Orange,Orange,Round
Pear,Yellow,"Pear-shaped"
{{#get_web_data:url=http://wiki.slicer.org/wiki/Special:GetData/Documentation/4.0/Developers/Sandbox_data|format=CSV with header|data=name=Name,color=Color,shape=Shape}}
{| class="wikitable"
! Name
! Color {{#for_external_table:<nowiki/>
{{!}}-
{{!}} [[{{{name}}}]]
{{!}} {{{color}}} }}
|}

Use of get_web_data and external_value

Using filter as template parameter

{{#get_web_data:
url=http://wiki.slicer.org/wiki/Special:GetData/Documentation/4.0/Developers/Sandbox_data
|format=CSV with header
|data=bananashape0=Shape
|filters=Name=Banana
}}
* {{#external_value:bananashape0}}


  • Error: no local variable "bananashape0" was set.


Using filter as URL parameter

{{#get_web_data:
url=http://wiki.slicer.org/wiki/Special:GetData/Documentation/4.0/Developers/Sandbox_data,Name=Banana
|format=CSV with header
|data=bananashape1=Shape
}}
* {{#external_value:bananashape1}}


  • Error: no local variable "bananashape1" was set.


Using fullurl

{{#get_web_data:
url={{fullurl:Special:GetData/Documentation/4.0/Developers/Sandbox_data}}
|format=CSV with header
|data=bananashape2=Shape
|filters=Name=Banana
}}
* {{#external_value:bananashape2}}

https://www.slicer.org/wiki/Special:GetData/Documentation/4.0/Developers/Sandbox_data,Name%3DBanana


  • Oblong

Debug module-footer template