€cdocutils.nodes document q)q}q(U nametypesq}q(XtestsqNX7caf tests: type property (bargenericstructure, barpath)qNuUsubstitution_defsq}q Uparse_messagesq ]q Ucurrent_sourceq NU decorationq NUautofootnote_startqKUnameidsq}q(hUtestsqhU3caf-tests-type-property-bargenericstructure-barpathquUchildrenq]q(cdocutils.nodes comment q)q}q(U rawsourceqX -*- rest -*-qUparentqhUsourceqcdocutils.nodes reprunicode qX6/home/pmajka/4/doc/sphinx/source/test_feature-type.rstq…q}qbUtagnameq Ucommentq!U attributesq"}q#(U xml:spaceq$Upreserveq%Uidsq&]q'Ubackrefsq(]q)Udupnamesq*]q+Uclassesq,]q-Unamesq.]q/uUlineq0KUdocumentq1hh]q2cdocutils.nodes Text q3X -*- rest -*-q4…q5}q6(hUhhubaubh)q7}q8(hXvim:syntax=restq9hhhhh h!h"}q:(h$h%h&]q;h(]qh.]q?uh0Kh1hh]q@h3Xvim:syntax=restqA…qB}qC(hUhh7ubaubcdocutils.nodes section qD)qE}qF(hUhhhhh UsectionqGh"}qH(h*]qIh,]qJh(]qKh&]qLhah.]qMhauh0Kh1hh]qN(cdocutils.nodes title qO)qP}qQ(hX;CAF tests: ``type`` property (barGenericStructure, barPath)qRhhEhhh UtitleqSh"}qT(h*]qUh,]qVh(]qWh&]qXh.]qYuh0Kh1hh]qZ(h3X CAF tests: q[…q\}q](hX CAF tests: q^hhPubcdocutils.nodes literal q_)q`}qa(hX``type``qbh"}qc(h*]qdh,]qeh(]qfh&]qgh.]qhuhhPh]qih3Xtypeqj…qk}ql(hUhh`ubah Uliteralqmubh3X( property (barGenericStructure, barPath)qn…qo}qp(hX( property (barGenericStructure, barPath)qqhhPubeubcdocutils.nodes paragraph qr)qs}qt(hX#Attribute holding type of the feature delineated by given path. For example it can be like `gray matter`, `white matter`, `single cell`, `ventricle`, and other... This property tries to mimic INCF DAI `feature` attribute would be extended after establishing the INCF DAI common metadata set.quhhEhhh U paragraphqvh"}qw(h*]qxh,]qyh(]qzh&]q{h.]q|uh0Kh1hh]q}(h3X[Attribute holding type of the feature delineated by given path. For example it can be like q~…q}q€(hX[Attribute holding type of the feature delineated by given path. For example it can be like qhhsubcdocutils.nodes title_reference q‚)qƒ}q„(hX `gray matter`q…h"}q†(h*]q‡h,]qˆh(]q‰h&]qŠh.]q‹uhhsh]qŒh3X gray matterq…qŽ}q(hUhhƒubah Utitle_referencequbh3X, q‘…q’}q“(hX, q”hhsubh‚)q•}q–(hX`white matter`q—h"}q˜(h*]q™h,]qšh(]q›h&]qœh.]quhhsh]qžh3X white matterqŸ…q }q¡(hUhh•ubah hubh3X, q¢…q£}q¤(hX, q¥hhsubh‚)q¦}q§(hX `single cell`q¨h"}q©(h*]qªh,]q«h(]q¬h&]q­h.]q®uhhsh]q¯h3X single cellq°…q±}q²(hUhh¦ubah hubh3X, q³…q´}qµ(hX, q¶hhsubh‚)q·}q¸(hX `ventricle`q¹h"}qº(h*]q»h,]q¼h(]q½h&]q¾h.]q¿uhhsh]qÀh3X ventricleqÁ…qÂ}qÃ(hUhh·ubah hubh3X5, and other... This property tries to mimic INCF DAI qÄ…qÅ}qÆ(hX5, and other... This property tries to mimic INCF DAI qÇhhsubh‚)qÈ}qÉ(hX `feature`qÊh"}qË(h*]qÌh,]qÍh(]qÎh&]qÏh.]qÐuhhsh]qÑh3XfeatureqÒ…qÓ}qÔ(hUhhÈubah hubh3XQ attribute would be extended after establishing the INCF DAI common metadata set.qÕ…qÖ}q×(hXQ attribute would be extended after establishing the INCF DAI common metadata set.qØhhsubeubhD)qÙ}qÚ(hUhhEhhh hGh"}qÛ(h*]qÜh,]qÝh(]qÞh&]qßhah.]qàhauh0Kh1hh]qá(hO)qâ}qã(hXTestsqähhÙhhh hSh"}qå(h*]qæh,]qçh(]qèh&]qéh.]qêuh0Kh1hh]qëh3XTestsqì…qí}qî(hhähhâubaubcdocutils.nodes literal_block qï)qð}qñ(hX>>> import barqòhhÙhhh U literal_blockqóh"}qô(U testnodetypeqõXdoctestqöh$h%h&]q÷h(]qøh*]qùh,]qúh.]qûUgroupsqü]qýUdefaultqþaUoptionsqÿ}ruh0Kh1hh]rh3X>>> import barr…r}r(hUhhðubaubhr)r}r(hXLet's create simple path:rhhÙhhh hvh"}r(h*]r h,]r h(]r h&]r h.]r uh0Kh1hh]rh3XLet's create simple path:r…r}r(hjhjubaubhï)r}r(hX]>>> path = bar.barPath("structure_test00_test", "M 100 100 L 100 200 L 200 200 Z", "#00ff00")rhhÙhhh hóh"}r(U testnodetyperXdoctestrh$h%h&]rh(]rh*]rh,]rh.]rUgroupsr]rhþahÿ}ruh0Kh1hh]r h3X]>>> path = bar.barPath("structure_test00_test", "M 100 100 L 100 200 L 200 200 Z", "#00ff00")r!…r"}r#(hUhjubaubhr)r$}r%(hX(By default, path has no `type` assigned:r&hhÙhhh hvh"}r'(h*]r(h,]r)h(]r*h&]r+h.]r,uh0Kh1hh]r-(h3XBy default, path has no r.…r/}r0(hXBy default, path has no r1hj$ubh‚)r2}r3(hX`type`r4h"}r5(h*]r6h,]r7h(]r8h&]r9h.]r:uhj$h]r;h3Xtyper<…r=}r>(hUhj2ubah hubh3X assigned:r?…r@}rA(hX assigned:rBhj$ubeubhï)rC}rD(hX>>> print path.type NonerEhhÙhhh hóh"}rF(U testnodetyperGXdoctestrHh$h%h&]rIh(]rJh*]rKh,]rLh.]rMUgroupsrN]rOhþahÿ}rPuh0Kh1hh]rQh3X>>> print path.type NonerR…rS}rT(hUhjCubaubhr)rU}rV(hX5We can assingn any consistent string as feature type:rWhhÙhhh hvh"}rX(h*]rYh,]rZh(]r[h&]r\h.]r]uh0K!h1hh]r^h3X5We can assingn any consistent string as feature type:r_…r`}ra(hjWhjUubaubhï)rb}rc(hX>>> path.type="white-matter"rdhhÙhhh hóh"}re(U testnodetyperfXdoctestrgh$h%h&]rhh(]rih*]rjh,]rkh.]rlUgroupsrm]rnhþahÿ}rouh0K#h1hh]rph3X>>> path.type="white-matter"rq…rr}rs(hUhjbubaubhr)rt}ru(hX&But inconsistent string will not work:rvhhÙhhh hvh"}rw(h*]rxh,]ryh(]rzh&]r{h.]r|uh0K'h1hh]r}h3X&But inconsistent string will not work:r~…r}r€(hjvhjtubaubhï)r}r‚(hX”>>> path.type="invalid: hite-mat ter" Traceback (most recent call last): AssertionError: Invalid feature type name provided: invalid: hite-mat terrƒhhÙhhh hóh"}r„(U testnodetyper…Xdoctestr†h$h%h&]r‡h(]rˆh*]r‰h,]rŠh.]r‹UgroupsrŒ]rhþahÿ}rŽuh0K)h1hh]rh3X”>>> path.type="invalid: hite-mat ter" Traceback (most recent call last): AssertionError: Invalid feature type name provided: invalid: hite-mat terr…r‘}r’(hUhjubaubhr)r“}r”(hXAAlso, any non-string value (except None) will raise an exception:r•hhÙhhh hvh"}r–(h*]r—h,]r˜h(]r™h&]ršh.]r›uh0K/h1hh]rœh3XAAlso, any non-string value (except None) will raise an exception:r…rž}rŸ(hj•hj“ubaubhï)r }r¡(hXy>>> path.type= [] Traceback (most recent call last): AssertionError: String or 'None' value expected >>> path.type = Noner¢hhÙhhh hóh"}r£(U testnodetyper¤Xdoctestr¥h$h%h&]r¦h(]r§h*]r¨h,]r©h.]rªUgroupsr«]r¬hþahÿ}r­uh0K1h1hh]r®h3Xy>>> path.type= [] Traceback (most recent call last): AssertionError: String or 'None' value expected >>> path.type = Noner¯…r°}r±(hUhj ubaubhr)r²}r³(hX‹Similarly as for single path, you can define the type attribute for the whole structure Let's create exemplary structure and assign a type:r´hhÙhhh hvh"}rµ(h*]r¶h,]r·h(]r¸h&]r¹h.]rºuh0K8h1hh]r»h3X‹Similarly as for single path, you can define the type attribute for the whole structure Let's create exemplary structure and assign a type:r¼…r½}r¾(hj´hj²ubaubhï)r¿}rÀ(hX:>>> structure = bar.barGenericStructure("test", "#00ff00")rÁhhÙhhh hóh"}rÂ(U testnodetyperÃXdoctestrÄh$h%h&]rÅh(]rÆh*]rÇh,]rÈh.]rÉUgroupsrÊ]rËhþahÿ}rÌuh0K;h1hh]rÍh3X:>>> structure = bar.barGenericStructure("test", "#00ff00")rÎ…rÏ}rÐ(hUhj¿ubaubhr)rÑ}rÒ(hX5By default, structure `type` property is also `None`:rÓhhÙhhh hvh"}rÔ(h*]rÕh,]rÖh(]r×h&]rØh.]rÙuh0K?h1hh]rÚ(h3XBy default, structure rÛ…rÜ}rÝ(hXBy default, structure rÞhjÑubh‚)rß}rà(hX`type`ráh"}râ(h*]rãh,]räh(]råh&]ræh.]rçuhjÑh]rèh3Xtyperé…rê}rë(hUhjßubah hubh3X property is also rì…rí}rî(hX property is also rïhjÑubh‚)rð}rñ(hX`None`ròh"}ró(h*]rôh,]rõh(]röh&]r÷h.]røuhjÑh]rùh3XNonerú…rû}rü(hUhjðubah hubh3X:…rý}rþ(hX:hjÑubeubhï)rÿ}r(hX>>> print structure.type NonerhhÙhhh hóh"}r(U testnodetyperXdoctestrh$h%h&]rh(]rh*]rh,]rh.]r Ugroupsr ]r hþahÿ}r uh0KAh1hh]r h3X>>> print structure.type Noner…r}r(hUhjÿubaubhr)r}r(hX5You can assign any reasonable string or `None` value:rhhÙhhh hvh"}r(h*]rh,]rh(]rh&]rh.]ruh0KFh1hh]r(h3X(You can assign any reasonable string or r…r}r(hX(You can assign any reasonable string or rhjubh‚)r}r (hX`None`r!h"}r"(h*]r#h,]r$h(]r%h&]r&h.]r'uhjh]r(h3XNoner)…r*}r+(hUhjubah hubh3X value:r,…r-}r.(hX value:r/hjubeubhï)r0}r1(hX:>>> structure.type = "test-type" >>> structure.type = Noner2hhÙhhh hóh"}r3(U testnodetyper4Xdoctestr5h$h%h&]r6h(]r7h*]r8h,]r9h.]r:Ugroupsr;]r<hþahÿ}r=uh0KHh1hh]r>h3X:>>> structure.type = "test-type" >>> structure.type = Noner?…r@}rA(hUhj0ubaubhr)rB}rC(hX;But you cannot assign any other type than string or `None`:rDhhÙhhh hvh"}rE(h*]rFh,]rGh(]rHh&]rIh.]rJuh0KMh1hh]rK(h3X4But you cannot assign any other type than string or rL…rM}rN(hX4But you cannot assign any other type than string or rOhjBubh‚)rP}rQ(hX`None`rRh"}rS(h*]rTh,]rUh(]rVh&]rWh.]rXuhjBh]rYh3XNonerZ…r[}r\(hUhjPubah hubh3X:…r]}r^(hX:hjBubeubhï)r_}r`(hXÝ>>> structure.type = ['dsf'] Traceback (most recent call last): AssertionError: String or 'None' value expected >>> structure.type = True Traceback (most recent call last): AssertionError: String or 'None' value expectedrahhÙhhh hóh"}rb(U testnodetypercXdoctestrdh$h%h&]reh(]rfh*]rgh,]rhh.]riUgroupsrj]rkhþahÿ}rluh0KOh1hh]rmh3XÝ>>> structure.type = ['dsf'] Traceback (most recent call last): AssertionError: String or 'None' value expected >>> structure.type = True Traceback (most recent call last): AssertionError: String or 'None' value expectedrn…ro}rp(hUhj_ubaubhr)rq}rr(hX%You can assign a path to a structure:rshhÙhhh hvh"}rt(h*]ruh,]rvh(]rwh&]rxh.]ryuh0KYh1hh]rzh3X%You can assign a path to a structure:r{…r|}r}(hjshjqubaubhï)r~}r(hX>>> structure.addPaths(path)r€hhÙhhh hóh"}r(U testnodetyper‚Xdoctestrƒh$h%h&]r„h(]r…h*]r†h,]r‡h.]rˆUgroupsr‰]rŠhþahÿ}r‹uh0K[h1hh]rŒh3X>>> structure.addPaths(path)r…rŽ}r(hUhj~ubaubhr)r}r‘(hXjAfter that, their types match. Type from structure is copied to the all paths belonging to this structure.r’hhÙhhh hvh"}r“(h*]r”h,]r•h(]r–h&]r—h.]r˜uh0K_h1hh]r™h3XjAfter that, their types match. Type from structure is copied to the all paths belonging to this structure.rš…r›}rœ(hj’hjubaubhï)r}rž(hXO>>> path.type, structure.type (None, None) >>> path.type == structure.type TruerŸhhÙhhh hóh"}r (U testnodetyper¡Xdoctestr¢h$h%h&]r£h(]r¤h*]r¥h,]r¦h.]r§Ugroupsr¨]r©hþahÿ}rªuh0Kah1hh]r«h3XO>>> path.type, structure.type (None, None) >>> path.type == structure.type Truer¬…r­}r®(hUhjubaubhr)r¯}r°(hXKAfter altering type of the structure, the type of its path is also altered:r±hhÙhhh hvh"}r²(h*]r³h,]r´h(]rµh&]r¶h.]r·uh0Khh1hh]r¸h3XKAfter altering type of the structure, the type of its path is also altered:r¹…rº}r»(hj±hj¯ubaubhï)r¼}r½(hX}>>> structure.type="test-type" >>> path.type, structure.type ('test-type', 'test-type') >>> path.type == structure.type Truer¾hhÙhhh hóh"}r¿(U testnodetyperÀXdoctestrÁh$h%h&]rÂh(]rÃh*]rÄh,]rÅh.]rÆUgroupsrÇ]rÈhþahÿ}rÉuh0Kjh1hh]rÊh3X}>>> structure.type="test-type" >>> path.type, structure.type ('test-type', 'test-type') >>> path.type == structure.type TruerË…rÌ}rÍ(hUhj¼ubaubhr)rÎ}rÏ(hX.But it doesn't work at the opposite direction:rÐhhÙhhh hvh"}rÑ(h*]rÒh,]rÓh(]rÔh&]rÕh.]rÖuh0Ksh1hh]r×h3X.But it doesn't work at the opposite direction:rØ…rÙ}rÚ(hjÐhjÎubaubhï)rÛ}rÜ(hX}>>> path.type = "other-type" >>> path.type, structure.type ('other-type', 'test-type') >>> path.type == structure.type FalserÝhhÙhhh hóh"}rÞ(U testnodetyperßXdoctestràh$h%h&]ráh(]râh*]rãh,]räh.]råUgroupsræ]rçhþahÿ}rèuh0Kuh1hh]réh3X}>>> path.type = "other-type" >>> path.type, structure.type ('other-type', 'test-type') >>> path.type == structure.type Falserê…rë}rì(hUhjÛubaubhr)rí}rî(hXÃThus after adding given path to the structure it is recommended to define type of the path indirectly - thought the structure. `Type` property is stored with CAF slide and can be loaded from XML.rïhhÙhhh hvh"}rð(h*]rñh,]ròh(]róh&]rôh.]rõuh0K~h1hh]rö(h3XThus after adding given path to the structure it is recommended to define type of the path indirectly - thought the structure. r÷…rø}rù(hXThus after adding given path to the structure it is recommended to define type of the path indirectly - thought the structure. rúhjíubh‚)rû}rü(hX`Type`rýh"}rþ(h*]rÿh,]rh(]rh&]rh.]ruhjíh]rh3XTyper…r}r(hUhjûubah hubh3X> property is stored with CAF slide and can be loaded from XML.r…r }r (hX> property is stored with CAF slide and can be loaded from XML.r hjíubeubeubeubehUU transformerr NU footnote_refsr }rUrefnamesr}rUsymbol_footnotesr]rUautofootnote_refsr]rUsymbol_footnote_refsr]rU citationsr]rh1hU current_linerNUtransform_messagesr]rUreporterrNUid_startrKU autofootnotesr]rU citation_refsr }r!Uindirect_targetsr"]r#Usettingsr$(cdocutils.frontend Values r%or&}r'(Ufootnote_backlinksr(KUrecord_dependenciesr)NU rfc_base_urlr*Uhttp://tools.ietf.org/html/r+U tracebackr,ˆUpep_referencesr-NUstrip_commentsr.NU toc_backlinksr/Uentryr0U language_coder1Uenr2U datestampr3NU report_levelr4KU _destinationr5NU halt_levelr6KU strip_classesr7NhSNUerror_encoding_error_handlerr8Ubackslashreplacer9Udebugr:NUembed_stylesheetr;‰Uoutput_encoding_error_handlerr<Ustrictr=U sectnum_xformr>KUdump_transformsr?NU docinfo_xformr@KUwarning_streamrANUpep_file_url_templaterBUpep-%04drCUexit_status_levelrDKUconfigrENUstrict_visitorrFNUcloak_email_addressesrGˆUtrim_footnote_reference_spacerH‰UenvrINUdump_pseudo_xmlrJNUexpose_internalsrKNUsectsubtitle_xformrL‰U source_linkrMNUrfc_referencesrNNUoutput_encodingrOUutf-8rPU source_urlrQNUinput_encodingrRU utf-8-sigrSU_disable_configrTNU id_prefixrUUU tab_widthrVKUerror_encodingrWUANSI_X3.4-1968rXU_sourcerYU6/home/pmajka/4/doc/sphinx/source/test_feature-type.rstrZUgettext_compactr[ˆU generatorr\NUdump_internalsr]NU pep_base_urlr^Uhttp://www.python.org/dev/peps/r_Usyntax_highlightr`UshortraUinput_encoding_error_handlerrbj=Uauto_id_prefixrcUidrdUdoctitle_xformre‰Ustrip_elements_with_classesrfNU _config_filesrg]rhUfile_insertion_enabledriKU raw_enabledrjKU dump_settingsrkNubUsymbol_footnote_startrlKUidsrm}rn(hhÙhhEuUsubstitution_namesro}rph h1h"}rq(h*]rrh&]rsh(]rtUsourceruhh,]rvh.]rwuU footnotesrx]ryUrefidsrz}r{ub.