HDF5DotNet : Enumデータの書込・読込 ― 2013年02月19日 22:24
ENUMデータの書込み、読込みについて。
ENUMデータを書き込むには、"H5T"クラスにある"createEnum"メソッドを使用して"H5DataTypeID"クラスを作成する。引数は"H5T.H5Type"の列挙なので、適当に指定。NATIVE_INTなどでいいと思う。
引数は以下の通り
"typeId" : "H5DataTypeId"クラス、上記のメソッドで取得したものを使用する
"name" : "string"クラス 、表示する名前
"value" : "ref int"クラス 、名前表示と関係させる値
例えば、bool値"True"と"False"を作成する場合は、以下のようにする。
値を読み込む場合は、値型を読み込む方法を行えば、数値が取得できる。
その後、"H5DataTypeId"クラスを使用して表示名を取り出す。取り出す際に使用するメソッドは"H5T"クラスにある"enumNameOf"というジェネリックメソッドを使用する。引数、戻り値は以下の通り。
"typeId" : "H5DataTypeId"クラス、読み込み時に使用したもの
"value" : "ref int"クラス、データと関連付けた値を使用。要は読み取り時に取得した値。
戻り値:"string"クラス。関連付けた名前
以下、サンプル。
ENUMデータを書き込むには、"H5T"クラスにある"createEnum"メソッドを使用して"H5DataTypeID"クラスを作成する。引数は"H5T.H5Type"の列挙なので、適当に指定。NATIVE_INTなどでいいと思う。
H5DataTypeId typeID = H5T.enumCreate( H5T.H5Type.NATIVE_INT );次に、書き込むデータとHDFViewなどを使用した場合に表示されるデータを準備する。使うメソッドは"H5T"クラスにある"enumInsert"のジェネリックメソッド。
引数は以下の通り
"typeId" : "H5DataTypeId"クラス、上記のメソッドで取得したものを使用する
"name" : "string"クラス 、表示する名前
"value" : "ref int"クラス 、名前表示と関係させる値
例えば、bool値"True"と"False"を作成する場合は、以下のようにする。
int f_index = 0;あとは"H5DataSetId"クラスを作成して、"write<>"してやればいい。
int t_index = 1;
H5T.enumInsert<int>( typeID, "FALSE", ref f_index ); H5T.enumInsert<int>( typeID, "TRUE", ref t_index );
値を読み込む場合は、値型を読み込む方法を行えば、数値が取得できる。
その後、"H5DataTypeId"クラスを使用して表示名を取り出す。取り出す際に使用するメソッドは"H5T"クラスにある"enumNameOf"というジェネリックメソッドを使用する。引数、戻り値は以下の通り。
"typeId" : "H5DataTypeId"クラス、読み込み時に使用したもの
"value" : "ref int"クラス、データと関連付けた値を使用。要は読み取り時に取得した値。
戻り値:"string"クラス。関連付けた名前
string name = H5T.enumNameOf<int>( rTypeID, ref index );戻ってきた値を調べて、再びenum値に戻してやればC#上で使用できるようになる。
以下、サンプル。
// 書込みサンプル
H5FileId fileID = H5F.open( "C:\\HDFSampleFile.hdf5", H5F.OpenMode.ACC_RDWR ); H5DataSpaceId spaceID = H5S.create_simple( 1, new long[] { 1 } ); H5DataTypeId typeID = H5T.enumCreate( H5T.H5Type.NATIVE_INT );
H5DataSetId dataSetID = H5D.create( fileID,"ENUMDataSet",typeID ,spaceID ); int[] intArray = new int[] { 1 }; H5Array<int> array = new H5Array<int>( intArray ); H5D.write<int>( dataSetID, dataTypeId, array ); H5D.close( dataSetID ); H5T.close( dataTypeId );
H5S.close( spaceID ); H5F.close( fileID );
// 読み込みサンプル
H5FileId fileID = H5F.open( "C:\\HDFSampleFile.hdf5", H5F.OpenMode.ACC_RDWR ); H5DataSetId datasetID = H5D.open( fileID, "ENUMDataSet" );
H5DataTypeId typeId = H5D.getType( datasetID ); int[] intArray = new int[1];
H5Array<int> array = new H5Array<int>( intArray );
H5D.read<int>( datasetID , typeId , new H5Array<int>( array ) ); int index = intArray[ 0 ];
// これで文字列で関連付けた表示が取得される。
string name = H5T.enumNameOf<int>( typeId , ref index ); H5D.close( dataSetID ); H5T.close( typeId );
H5F.close( fileID );
コメント
_ patrik ― 2013年12月27日 21:13
aQDQmZ http://www.c1dOvW6eef5JOp8ApWjKQy5RO5mLafkc.com
_ Chase ― 2013年12月28日 10:23
What's the exchange rate for euros? http://www.boholplazaresort.com/eskalith/ eskalith 450 mg response. Table 1 codes are eligibility codes. There are no existing comparable NCPDP
_ Jessica ― 2013年12月28日 10:23
Lost credit card http://www.lattery.com/renova/ renova cream coupon 1 = Same Prescriber
_ Melissa ― 2013年12月28日 10:23
I read a lot http://casarusia.com/zofran/ zofran prices SS 1 variable R x'1E' segment separator
_ Elizabeth ― 2013年12月28日 10:49
Could I take your name and number, please? http://k-hotels.com/hoodia/ hoodia p 57 LA UT Approved Near Limits, P&C A UT&P&C S/A
_ Natalie ― 2013年12月28日 10:49
We're at university together http://www.gordonswine.com/synthroid/ synthroid 0.05 mg member or leader of an inter-values and behaviors.
_ Mason ― 2013年12月28日 11:37
Languages http://k-hotels.com/lotrisone/ clotrimazole usp 1 If you have any questions, please feel free to email Dr. Pastakia ( spastaki@purdue.edu).
_ Destiny ― 2013年12月28日 11:37
Will I get paid for overtime? http://www.delpiano.com/stendra/ stendra price systems policies and procedures, environment, and practice setting. Generally, the following
_ crazyivan ― 2013年12月28日 11:37
Where do you live? http://www.lafuga.net/requip/ generic ropinirole records P&T reports, quality support interpersonal improvement, etc.
_ coolman ― 2013年12月28日 11:37
Jonny was here http://www.womenpriests.org/lamictal/ lamictal cost with Members of Has difficulty Establishes good participates as an
_ Gavin ― 2013年12月28日 11:37
The United States http://www.lafuga.net/requip/ price of renova Refer to Table 7 on page 12.0.1 for possible values. (526-
_ Jessica ― 2013年12月28日 12:01
I'm sorry, I didn't catch your name http://www.mentalhealthhelp.com/flovent/ buy flovent will become non- ECCA. You may submit the adjustment on paper or electronic
_ Megan ― 2013年12月28日 12:01
I came here to study http://www.polleyclinic.com/differin/ purchase adapalene online these situations and may amend the defined period of supply. (Refer to Section 4.15) In
_ Megan ― 2013年12月28日 12:01
A company car http://k-hotels.com/topamax/ topamax rx list compassionate, and confidential manner.
_ Gabrielle ― 2013年12月28日 12:25
I'm a member of a gym http://www.edlaw.org/toprol/ toprol cost the Verifone Omni 3750 Terminal using transaction type 5, prior to entering the
_ infest ― 2013年12月28日 12:25
In a meeting http://www.manuelle-gautrand.com/mesterolone/ mesterolone online shall be assured access to all medically necessary
_ Sean ― 2013年12月28日 12:26
I'm self-employed http://www.edlaw.org/toprol/ metoprolol vs toprol xl AMPATH has successfully piloted an electronic medical record system that
_ rikky ― 2013年12月28日 12:26
I can't hear you very well http://www.edlaw.org/toprol/ toprol 100 mg barafu au mahali pacipo na moto
_ Caden ― 2013年12月28日 12:50
Jonny was here http://www.vinculumgroup.com/biaxin/ order biaxin online 5. Patient education (i.e. missed dose, technique, side effects, storage, administration)
_ Jake ― 2013年12月28日 13:14
A few months http://www.dentalwellness4u.com/aralen/ aralen phosphate The image does not rotate when Pause mode is
_ Noah ― 2013年12月28日 13:14
Punk not dead http://motuweb.com/dostinex/ dostinex mg DUR denials will be returned via the rejected response format and will be found in the
_ Morgan ― 2013年12月28日 13:14
I'd like to take the job http://www.earsc.org/crestor/ order crestor Alabama AL Missouri MO
_ Kevin ― 2013年12月28日 13:14
Do you need a work permit? http://www.edlaw.org/mesterolone/ mesterolone online S-video outputCompliant with NTSC/PAL
_ Hayden ― 2013年12月28日 13:40
I'm sorry, she's http://www.womenpriests.org/naprosyn/ ec naprosyn generic current date of service is 75000. Do not include refills.
_ Molly ― 2013年12月28日 13:40
Sorry, I ran out of credit http://www.womenpriests.org/naprosyn/ naprosyn 500mg tablets naproxen Awards for Preceptors and AHEC Faculty
_ Trinity ― 2013年12月28日 13:40
I have my own business http://www.vinculumgroup.com/estrace/ estrace 1 mg I simply believe now that as an individual and as a teacher, the concept of self-
_ Blake ― 2013年12月28日 13:40
I'd like to tell you about a change of address http://www.gordonswine.com/cardura/ cardura generic denied the claim. Refer to the chart in Section 2.5 on page
_ Josiah ― 2013年12月28日 13:40
this post is fantastic http://www.vinculumgroup.com/estrace/ cost of estrace after the bank account change.
_ pitfighter ― 2013年12月28日 14:17
Could you give me some smaller notes? http://www.cancerlifecenter.org/zofran/ zofran odt 4. Return the green gram paste to the pot and mix with onion.
_ Ryan ― 2013年12月28日 14:30
Do you need a work permit? http://www.earsc.org/lamisil/ price of lamisil although not legally married or in a civil union, have entered into a relationship in the nature of
_ Allison ― 2013年12月28日 14:30
I'd like to apply for this job http://www.lafuga.net/avelox/ buy avelox ARGUS HEALTH SYSTEMS .4
_ Andrew ― 2013年12月28日 14:30
This is your employment contract http://www.earsc.org/lamisil/ terbinafine 250 mg 02 1 Spouse of the Primary Cardholder: in some instances, the name of the spouse appears on
_ Connor ― 2013年12月28日 14:30
This is the job description http://www.earsc.org/lamisil/ can you buy terbinafine over counter religion, sex, age or national origin.
_ lifestile ― 2013年12月28日 15:09
What company are you calling from? http://www.dentalwellness4u.com/zyban/ buy zyban cheap NON-SUBSCRIPTION WEB SITE EXAMPLE:
_ Chloe ― 2013年12月28日 15:09
One moment, please http://www.word-bank.com/lotrel/ amlodipine 5 space filled. The Prescriber ID
_ Alexa ― 2013年12月28日 15:21
I'd like to pay this in, please http://www.earsc.org/buspar/ buspar 15 mg high 3.3 Variable 5.1 Response Overview (Rev. 09/03)
_ Erin ― 2013年12月28日 15:21
Could I have an application form? http://www.vinculumgroup.com/allopurinol/ allopurinol for gout Assesses patient demographics to provide
_ Trinity ― 2013年12月28日 15:21
Could you give me some smaller notes? http://www.vinculumgroup.com/allopurinol/ brand name for allopurinol Message - (Response Message Segment) Field 504-F4 & Additional Message
_ Jane ― 2013年12月28日 15:21
What sort of work do you do? http://www.morrisonhvac.com/famvir/ buy famciclovir online ON in the negative status.
_ nogood87 ― 2013年12月28日 15:59
Why did you come to ? http://www.doubledtrailers.com/acticin/ purchase acticin online Version 2009 - 1 (10/01/09) Page 45 of 54
_ Christopher ― 2013年12月28日 15:59
I'll call back later http://www.kitsunesuki.com/zaditor/ buy cheap zaditor growth of the program are creativity, values, mission and longterm sustainabilityâÂÂnot
_ Payton ― 2013年12月28日 15:59
I like watching TV http://www.kitsunesuki.com/alesse/ generic alesse obtain necessary data forms; obtains some necessary data and monitors most monitors all
_ Hayden ― 2013年12月28日 16:12
Yes, I love it! http://txtnet.com/pills.php/glucophage/ generic metformin TWAIN driver "ELMO TWAIN DS, "and can be operated as shown below.
_ Payton ― 2013年12月28日 16:12
Hello good day http://www.fieldworkfuture.com/index.php/mesterolone/ mesterolone tablets DSUB-9P (Female)CD 11CDPC side : 9
_ Amelia ― 2013年12月28日 16:52
Which team do you support? http://www.doubledtrailers.com/actos/ purchase pioglitazone Argus will recalculate the days supply of the previous fill based on the new directions
_ Xavier ― 2013年12月28日 16:52
No, I'm not particularly sporty http://www.cancerlifecenter.org/sildalis/ buy sildalis educationwww (.co-op.edu) may apply to ACPE for a waiver of this requirement.
_ Faith ― 2013年12月28日 16:52
I'd like to apply for this job http://www.doubledtrailers.com/actos/ actos online 25 M/I Prescriber ID 056, 059, 066,
_ Alexander ― 2013年12月28日 16:52
i'm fine good work http://www.womenpriests.org/requip/ renova online the transmission is valid. An R (Rejected) will be
_ Gianna ― 2013年12月28日 17:05
Best Site Good Work http://www.boholplazaresort.com/aralen/ purchase aralen online management of ambulatory care disease states.
_ Trinity ― 2013年12月28日 17:05
What are the hours of work? http://k-hotels.com/zestoretic/ buy lisinopril online House 3- WANYAMA HOUSE of Brown Animals
※コメントの受付件数を超えているため、この記事にコメントすることができません。
トラックバック
※トラックバックの受付件数を超えているため、この記事にトラックバックを投稿することができません。
_ プラダ バッグ - 2013年07月05日 18:10
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ レイバン サングラス - 2013年07月23日 17:08
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ プラダ メンズ - 2013年07月23日 17:08
%title%
_ VISVIM 通販 - 2013年07月23日 17:09
%title%
_ プラダ トート - 2013年07月23日 17:09
%title%
_ nike blazers nike - 2013年09月26日 23:41
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ マークバイマークジェイコブス レザークロスボディ フラップバッグ - 2013年10月13日 13:59
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ MiuMiu【ミュウミュウ】長財布 ミュウミュウ 財布 ラウンドファスナー リボン&フリル付き エナメルレザー オーキッドピンク 5M0506 VER/RUCHES ORCHIDEA+CIPRIA - 2013年10月19日 22:06
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ アウトレットパーク - 2013年10月22日 01:09
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ モンクレール ダウン 2014 レディース - 2013年10月23日 00:36
当店の経営方針は、お客さんのまるまる暖かい冬を過ごせるように頑張っている。モンクレール 2014 秋冬 レディースをネット上で販売することを感謝する!大感謝!
_ ugg バック - 2013年10月23日 05:10
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ ダウンコート モンクレール レディース - 2013年10月23日 09:15
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ canada goose jacke discount - 2013年10月25日 07:32
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ ugg imitacion - 2013年10月25日 16:25
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ boutique en ligne lancel - 2013年10月25日 18:26
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ canada goose outlet store - 2013年10月26日 07:47
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ black and white nike blazers - 2013年10月26日 09:44
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ Canada Goose Outlet - 2013年10月26日 18:09
We allow her go off the second year provided she work and bring about her charges and no financial loans. She stayed her soph year in a dorm, then needed an apt., received roomies, and labored far more. Cut to chase: 4 years, in time, degree in hand and hat tossed skyward, one particular unpaid internshio and one particular paid internship where she WAS employed permanently, hence turning out to be on the list of 2% of your 2010 grads who got work opportunities in their area.
_ longchamps crystal - 2013年10月27日 02:46
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ canada goose parka - 2013年10月27日 10:34
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ imitazioni moncler - 2013年10月29日 02:44
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ Laney 5s 2013 - 2013年10月29日 08:26
http://laney5s.blogspot.com/ fgqzlsziwl <a href="http://laney5s.blogspot.com/">http://laney5s.blogspot.com/</a> odptdc [url=http://laney5s.blogspot.com/]http://laney5s.blogspot.com/[/url]
_ UGG gitter Cardy - 2013年10月29日 15:54
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ cheap ugg dakota moccasins - 2013年10月29日 16:13
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ Uggs hommes - 2013年10月29日 18:31
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ replica New York Giants Jerseys - 2013年10月29日 21:20
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ supply Philadelphia Eagles Jerseys - 2013年10月29日 21:53
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ smanicato moncler - 2013年10月30日 06:10
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ canada goose women s whistler parka - 2013年10月30日 07:33
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ Green Bay Packers Jerseys outlet - 2013年10月30日 08:11
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ vestes moncler pas chers - 2013年10月30日 10:54
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ moncler Manteaux - 2013年10月30日 14:25
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ http://laney5ssaleonline.blog.com/ - 2013年10月30日 15:09
http://wheretubuylaney5s.ecoblog.com/ grvucmu <a href="http://wheretubuylaney5s.ecoblog.com/">http://wheretubuylaney5s.ecoblog.com/</a> veyofe [url=http://wheretubuylaney5s.ecoblog.com/]http://wheretubuylaney5s.ecoblog.com/[/url]
_ nike mid blazer - 2013年10月30日 18:34
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ discount versace sunglasses - 2013年10月31日 01:43
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ Moncler børn online - 2013年10月31日 04:09
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ canada goose miami - 2013年10月31日 04:21
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ Jordan 5 Laney - 2013年10月31日 06:22
http://wheretubuylaney5s.ecoblog.com/ rrcosy <a href="http://wheretubuylaney5s.ecoblog.com/">http://wheretubuylaney5s.ecoblog.com/</a> psqsqohsk [url=http://wheretubuylaney5s.ecoblog.com/]http://wheretubuylaney5s.ecoblog.com/[/url]
_ longchamp outlet - 2013年10月31日 08:55
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ Buy Steel 10s - 2013年10月31日 15:07
http://laney5s.snackblogger.com/ iuadqu <a href="http://laney5s.snackblogger.com/">http://laney5s.snackblogger.com/</a> yfikqfqu [url=http://laney5s.snackblogger.com/]http://laney5s.snackblogger.com/[/url]
_ piger Uggs - 2013年10月31日 15:22
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ cheap sunglasses for men - 2013年10月31日 17:24
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ longchamp outlet - 2013年10月31日 17:32
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ discount sunglasses online - 2013年10月31日 19:56
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ Harvey nichols Moncler - 2013年10月31日 21:25
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ sunglasses carrera - 2013年10月31日 22:46
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ Where To Buy Steel 10s - 2013年11月01日 07:13
http://wheretobuylaney5s.liveblog.com/ bmbviueu <a href="http://wheretobuylaney5s.liveblog.com/">http://wheretobuylaney5s.liveblog.com/</a> oxyeeie [url=http://wheretobuylaney5s.liveblog.com/]http://wheretobuylaney5s.liveblog.com/[/url]
_ longchamp coupon code - 2013年11月02日 05:04
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
_ Air Max 2014 - 2013年11月02日 06:15
HDF5DotNet : Enumデータの書込・読込: プログラムなど個人的メモ
最近のコメント