当前位置: 首页>>代码示例>>C++>>正文


C++ DataSetHeader::SetName方法代码示例

本文整理汇总了C++中DataSetHeader::SetName方法的典型用法代码示例。如果您正苦于以下问题:C++ DataSetHeader::SetName方法的具体用法?C++ DataSetHeader::SetName怎么用?C++ DataSetHeader::SetName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataSetHeader的用法示例。


在下文中一共展示了DataSetHeader::SetName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: AddExprColumns

void CHPData::AddExprColumns(DataSetHeader& hdr, bool hasCompData)
{
	hdr.SetName(CHP_EXPR_GROUP);
	//Probeset name - string
	hdr.AddAsciiColumn(ProbeSetNameColName, maxProbeSetName);
	//Detection - unsigned char
	hdr.AddUByteColumn(DetectionColName);
	//Detection p-value - float
	hdr.AddFloatColumn(DetectionPValueColName);
	//Signal - float
	hdr.AddFloatColumn(SignalColName);
	//Number of pairs - unsigned short
	hdr.AddUShortColumn(NumberPairsColName);
	//Number of pairs used - unsigned short
	hdr.AddUShortColumn(NumberPairsUsedColName);

	if (hasCompData == true)
	{
		//Change - unsigned char
		hdr.AddUByteColumn(ChangeColName);
		//Change p-value - float
		hdr.AddFloatColumn(ChangePValueColName);
		//Signal Log Ratio - float
		hdr.AddFloatColumn(SignalLogRatioColName);
		//Signal Log Ratio Low - float
		hdr.AddFloatColumn(SignalLogRatioLowColName);
		//Signal Log Ratio High - float
		hdr.AddFloatColumn(SignalLogRatioHighColName);
		//Common Pairs - unsigned short
		hdr.AddUShortColumn(CommonPairsColName);
	}
}
开发者ID:,项目名称:,代码行数:32,代码来源:

示例2: AddReseqColumns

void CHPData::AddReseqColumns(DataSetHeader& hdr)
{
	hdr.SetName(CHP_RESEQ_GROUP);
	//call - char
	hdr.AddByteColumn(CallColName);
	//Score - float
	hdr.AddFloatColumn(ScoreColName);
}
开发者ID:,项目名称:,代码行数:8,代码来源:

示例3: WriteOutGenericDATDataFileNoGrid

void TestFileGenerator::WriteOutGenericDATDataFileNoGrid()
{
	GenericDataHeader gdh;
	AddStandardGenericDataHeader(gdh);

	// Fill the DataGroupHeader
	DataGroupHeader dch;
	dch.SetName(L"First Data Cube");

	// Fill the DataSetHeader
	DataSetHeader dph;
	dph.SetName(L"acquired data");
	ParameterNameValueType nvt;
	nvt.SetName(L"Scanner");
	nvt.SetValueText(L"M10");
	dph.AddNameValParam(nvt);
	nvt.SetName(L"Pixel Size");
	nvt.SetValueFloat(0.051f);
	dph.AddNameValParam(nvt);

	dph.AddColumn(UShortColumn(L"Pixel"));

	int32_t rows = 100;
	dph.SetRowCnt(rows);

	dch.AddDataSetHdr(dph);

	// Set the FileHeader
	FileHeader fh;
	fh.SetFilename("test.file.data_dat");
	fh.SetGenericDataHdr(gdh);
	fh.AddDataGroupHdr(dch);

	// Create the generic file writer
	GenericFileWriter gfWriter(&fh);
	gfWriter.WriteHeader();

	DataGroupWriterIt dcwBegin, dcwEnd;
	gfWriter.GetDataGroupWriters(dcwBegin, dcwEnd);

	DataGroupWriter d = *dcwBegin;
	dcwBegin->WriteHeader();

	DataSetWriterIt dpwBegin, dpwEnd;
	dcwBegin->GetDataSetWriters(dpwBegin, dpwEnd);

	dpwBegin->WriteHeader();

	// Write out the data
	for( int32_t i=0; i < rows; ++i )
	{
		u_int16_t value = (u_int16_t)(i*10+i);
		dpwBegin->Write(value);
	}

	dpwBegin->UpdateNextDataSetOffset();
	dcwBegin->Close();
}
开发者ID:,项目名称:,代码行数:58,代码来源:

示例4: CreateContentsGroup

void CDFData::CreateContentsGroup(const std::wstring& p, int32_t probesetCnt)
{
	DataGroupHeader c(p);
	DataSetHeader dp;
	dp.SetRowCnt(probesetCnt);
	dp.SetName(p);
	dp.AddUnicodeColumn(L"", MAX_CDF_PROBE_SET_NAME_LENGTH);
	dp.AddIntColumn(L"");
	c.AddDataSetHdr(dp);
	genericData.Header().AddDataGroupHdr(c);
}
开发者ID:HenrikBengtsson,项目名称:Affx-Fusion-SDK,代码行数:11,代码来源:CDFData.cpp

示例5: SetEntryCount

void CHPQuantificationData::SetEntryCount(int32_t ln, int32_t maxln)
{
    firstColumnType = ASCIICharColType;
	maxProbeSetName = maxln;
	ParameterNameValueType param;
	DataGroupHeader* dcHdr = &genericData.Header().GetDataGroup(0);
	DataSetHeader dpHdr;
	dpHdr.SetRowCnt(ln);
	dpHdr.SetName(QUANTIFICATION_QUANTIFICATION_NAME);
	AddColumns(dpHdr, false);
	dcHdr->AddDataSetHdr(dpHdr);
}
开发者ID:,项目名称:,代码行数:12,代码来源:

示例6: SetOrigCnt

void CHPData::SetOrigCnt(int32_t ln)
{
	DataSetHeader dpHdr;
	dpHdr.SetRowCnt(ln);
	dpHdr.SetName(CHP_RESEQ_ORIG_CALL_GROUP);

	//position - int
	dpHdr.AddIntColumn(PositionColName);
	//call - byte
	dpHdr.AddByteColumn(OriginalCallColName);

	DataGroupHeader* dcHdr = &genericData.Header().GetDataGroup(3);
	dcHdr->AddDataSetHdr(dpHdr);
}
开发者ID:,项目名称:,代码行数:14,代码来源:

示例7: SetForceCnt

void CHPData::SetForceCnt(int32_t ln)
{
	DataSetHeader dpHdr;
	dpHdr.SetRowCnt(ln);
	dpHdr.SetName(CHP_RESEQ_FORCE_CALL_GROUP);

	//position - int
	dpHdr.AddIntColumn(PositionColName);
	//call - byte
	dpHdr.AddByteColumn(ForceCallColName);
	//reason - byte
	dpHdr.AddByteColumn(ReasonColName);

	DataGroupHeader* dcHdr = &genericData.Header().GetDataGroup(2);
	dcHdr->AddDataSetHdr(dpHdr);
}
开发者ID:,项目名称:,代码行数:16,代码来源:

示例8: SetBackgroundZoneCnt

void CHPData::SetBackgroundZoneCnt(int32_t ln)
{
	DataSetHeader dpHdr;
	dpHdr.SetRowCnt(ln);
	dpHdr.SetName(CHP_BG_ZONE_GROUP);

	//center X coord - float
	dpHdr.AddFloatColumn(CenterXColName);
	//center Y coord - float
	dpHdr.AddFloatColumn(CenterYColName);
	//background - float
	dpHdr.AddFloatColumn(BackgroundColName);
	//smoothing factor - float
	dpHdr.AddFloatColumn(SmoothFactorColName);

	DataGroupHeader* dcHdr = &genericData.Header().GetDataGroup(1);
	dcHdr->AddDataSetHdr(dpHdr);
}
开发者ID:,项目名称:,代码行数:18,代码来源:

示例9: AddGenoColumns

void CHPData::AddGenoColumns(DataSetHeader& hdr)
{
	hdr.SetName(CHP_GENO_GROUP);
	//Probeset name - string
	hdr.AddAsciiColumn(ProbeSetNameColName, maxProbeSetName);
	//Call - unsigned char
	hdr.AddUByteColumn(CallColName);
	//Confidence - float
	hdr.AddFloatColumn(ConfidenceColName);
	//RAS1 - float
	hdr.AddFloatColumn(RAS1ColName);
	//RAS2 - float
	hdr.AddFloatColumn(RAS2ColName);
	//AA Call - float
	hdr.AddFloatColumn(AAColName);
	//AB Call - float
	hdr.AddFloatColumn(ABColName);
	//BB Call - float
	hdr.AddFloatColumn(BBColName);
	//No Call - float
	hdr.AddFloatColumn(NoCallColName);
}
开发者ID:,项目名称:,代码行数:22,代码来源:

示例10: SetEntryCount

void CHPMultiDataData::SetEntryCount(MultiDataType dataType, int32_t ln, int32_t maxln, const std::vector<ColumnInfo> &columns, const std::wstring &groupName)
{
	DataSetInfo info;
	info.maxName = maxln;
	info.metricColumns = columns;
	info.entries = NULL;
	info.dataType = dataType;
	info.dataSetIndex = (int)dataSetInfo.size();
	dataSetInfo[dataType] = info;

	DataSetHeader dsHdr;
	dsHdr.SetRowCnt(ln);
	dsHdr.SetName(MultiDataDataSetNames[(int)dataType]);
	AddColumns(info, dsHdr);

    if (groupName.empty() == true)
        dataTypeGroupNames[dataType] = MULTI_DATA_NAME;
    else
        dataTypeGroupNames[dataType] = groupName;
	DataGroupHeader* dgHdr = GetDataGroupHeader(dataTypeGroupNames[dataType]);
	dgHdr->AddDataSetHdr(dsHdr);
}
开发者ID:HenrikBengtsson,项目名称:Affx-Fusion-SDK,代码行数:22,代码来源:CHPMultiDataData.cpp

示例11: AddUnivColumns

void CHPData::AddUnivColumns(DataSetHeader& hdr)
{
	hdr.SetName(CHP_UNIV_GROUP);
	//Background - float
	hdr.AddFloatColumn(BackgroundColName);
}
开发者ID:,项目名称:,代码行数:6,代码来源:

示例12: WriteOutGenericDataFileWithAllColumnTypes

void TestFileGenerator::WriteOutGenericDataFileWithAllColumnTypes()
{
	GenericDataHeader gdh;
	AddStandardGenericDataHeader(gdh);

	// Fill the DataGroupHeader
	DataGroupHeader dch;
	dch.SetName(L"default");	// default DataGroup

	// Fill the all types DataSetHeader
	DataSetHeader dphAT;
	dphAT.SetName(L"all types");
	ParameterNameValueType nvt;
	nvt.SetName(L"How many types");
	nvt.SetValueText(L"All types");
	dphAT.AddNameValParam(nvt);
	nvt.SetName(L"Powered by");
	nvt.SetValueText(L"Affymetrix");
	dphAT.AddNameValParam(nvt);

	dphAT.AddColumn(ByteColumn(L"Byte type"));
	dphAT.AddColumn(UByteColumn(L"UByte type"));
	dphAT.AddColumn(ASCIIColumn(L"ASCII type", 10));
	dphAT.AddColumn(ShortColumn(L"Short type"));
	dphAT.AddColumn(UShortColumn(L"UShort type"));
	dphAT.AddColumn(IntColumn(L"Int type"));
	dphAT.AddColumn(UIntColumn(L"UInt type"));
	dphAT.AddColumn(UnicodeColumn(L"Unicode type", 15));
	dphAT.AddColumn(FloatColumn(L"Float type"));

	int32_t rows = 2;
	dphAT.SetRowCnt(rows);

	dch.AddDataSetHdr(dphAT);

	// Set the FileHeader
	FileHeader fh;
	fh.SetFilename("test.file.data_all_column_types");
	fh.SetGenericDataHdr(gdh);
	fh.AddDataGroupHdr(dch);

	// Create the generic file writer
	GenericFileWriter gfWriter(&fh);
	gfWriter.WriteHeader();

	DataGroupWriterIt dcwBegin, dcwEnd;
	gfWriter.GetDataGroupWriters(dcwBegin, dcwEnd);

	DataGroupWriter d = *dcwBegin;
	dcwBegin->WriteHeader();

	DataSetWriterIt dpwBegin, dpwEnd;
	dcwBegin->GetDataSetWriters(dpwBegin, dpwEnd);

	// Write out the all types DataSet

	dpwBegin->WriteHeader();

	for( int32_t row = 0; row < rows; ++row )
	{
		char str[10];
		wchar_t wstr[15];
		int8_t b = 1+10*row;
		u_int8_t ub = 2+10*row;
		sprintf(str, "%d", 3+10*row);
		int16_t s = 4+10*row;
		u_int16_t us = 5+10*row;
		int32_t i = 6+10*row;
		u_int32_t ui = 7+10*row;
		FormatString1(wstr, 15, L"%d", 8+10*row);
		float f = 9+10*row;

		dpwBegin->Write(b);	// btye
		dpwBegin->Write(ub);	// unsigned byte
		dpwBegin->Write(str, 10);	// ACSII string
		dpwBegin->Write(s);	// short
		dpwBegin->Write(us);	// unsigned short
		dpwBegin->Write(i);	// int
		dpwBegin->Write(ui);	// unsigned int
		dpwBegin->Write(wstr, 15);	// Unicode string
		dpwBegin->Write(f);	// float
	}

	dpwBegin->UpdateNextDataSetOffset();
	dcwBegin->Close();
}
开发者ID:,项目名称:,代码行数:86,代码来源:

示例13: WriteOutGenericDATDataFileWithGrid

void TestFileGenerator::WriteOutGenericDATDataFileWithGrid()
{
	GenericDataHeader gdh;
	AddStandardGenericDataHeader(gdh);

	// Fill the DataGroupHeader
	DataGroupHeader dch;
	dch.SetName(L"");	// unnamed DataGroup

	// Fill the pixel intensity DataSetHeader
	DataSetHeader dphPixel;
	dphPixel.SetName(L"acquired data");
	ParameterNameValueType nvt;
	nvt.SetName(L"Scanner");
	nvt.SetValueText(L"M10");
	dphPixel.AddNameValParam(nvt);
	nvt.SetName(L"Pixel Size");
	nvt.SetValueFloat(0.051f);
	dphPixel.AddNameValParam(nvt);

	dphPixel.AddColumn(UShortColumn(L"Pixel"));

	int32_t rows = 1000;
	dphPixel.SetRowCnt(rows);

	dch.AddDataSetHdr(dphPixel);

	// Fill the grid DataSetHeader
	DataSetHeader dphGrid;
	dphGrid.SetName(L"grid position");
	nvt.SetName(L"GhostGrids");
	nvt.SetValueText(L"True");
	dphGrid.AddNameValParam(nvt);
	nvt.SetName(L"Pixel Size");
	nvt.SetValueFloat(0.051f);
	dphGrid.AddNameValParam(nvt);

	dphGrid.AddColumn(FloatColumn(L"Upper left x"));
	dphGrid.AddColumn(FloatColumn(L"Upper left y"));
	dphGrid.AddColumn(FloatColumn(L"Upper right x"));
	dphGrid.AddColumn(FloatColumn(L"Upper right y"));
	dphGrid.AddColumn(FloatColumn(L"Lower right x"));
	dphGrid.AddColumn(FloatColumn(L"Lower right y"));
	dphGrid.AddColumn(FloatColumn(L"Lower left x"));
	dphGrid.AddColumn(FloatColumn(L"Lower left y"));

	int32_t grids = 5;	// first is the global grid with 4 subgrids
	dphGrid.SetRowCnt(grids);

	dch.AddDataSetHdr(dphGrid);

	// Set the FileHeader
	FileHeader fh;
	fh.SetFilename("test.file.data_dat_with_grid");
	fh.SetGenericDataHdr(gdh);
	fh.AddDataGroupHdr(dch);

	// Create the generic file writer
	GenericFileWriter gfWriter(&fh);
	gfWriter.WriteHeader();

	DataGroupWriterIt dcwBegin, dcwEnd;
	gfWriter.GetDataGroupWriters(dcwBegin, dcwEnd);

	DataGroupWriter d = *dcwBegin;
	dcwBegin->WriteHeader();

	DataSetWriterIt dpwBegin, dpwEnd;
	dcwBegin->GetDataSetWriters(dpwBegin, dpwEnd);

	// Write out the pixel DataSet

	dpwBegin->WriteHeader();

	for( int32_t i=0; i < rows; ++i )
	{
		u_int16_t value = (u_int16_t)(i*10+i);
		dpwBegin->Write(value);
	}

	dpwBegin->UpdateNextDataSetOffset();

	++dpwBegin;

	// Write out the grid DataSet

	dpwBegin->WriteHeader();

	for( int32_t i=0; i < grids; ++i )
	{
		for (int32_t corner = 0; corner < 4; ++corner)
		{
			float value = (float)(i*100 + corner);
			dpwBegin->Write(value);
			dpwBegin->Write(value);
		}
	}

	dpwBegin->UpdateNextDataSetOffset();

//.........这里部分代码省略.........
开发者ID:,项目名称:,代码行数:101,代码来源:

示例14: dphWriter

// Uses a mix of the GenericFileWriter and raw commands
void TestFileGenerator::WriteOutGenericDATDataFile1UsingGenericWriter()
{
	GenericDataHeader gdh;
	AddStandardGenericDataHeader(gdh);

	// Fill the DataSetHeader
	DataSetHeader dph;
	dph.SetName(L"acquired data");
	ParameterNameValueType nvt;
	nvt.SetName(L"Scanner");
	nvt.SetValueText(L"M10");
	dph.AddNameValParam(nvt);
	nvt.SetName(L"Pixel Size");
	nvt.SetValueFloat(0.051f);
	dph.AddNameValParam(nvt);
	dph.AddColumn(UShortColumn(L"Pixel"));

	int32_t rows = 100;
	dph.SetRowCnt(rows);

	// Open the file.
	ofstream fileStream;
	fileStream.open( "test.file.data_dat", ios_base::out | ios_base::binary | ios_base::trunc);

	// Write the file header using raw methods until the writer is available.
	// magic number
	FileOutput::WriteUInt8(fileStream, 59);

	// version
	FileOutput::WriteInt8(fileStream, 1);

	// Number of data cubes - confirm this
	FileOutput::WriteUInt32(fileStream, 1);

	// offset to the data cube byte offset array
	int offsetLocation = fileStream.tellp();
	FileOutput::WriteUInt32(fileStream, 1);	//????

	// Write the GenericDataHeader to the file
	GenericDataHeaderWriter gdhWriter;
	gdhWriter.Write(fileStream, gdh);


	//
	// Data Cube
	//

	int offset = fileStream.tellp();

	// Write the DataSetHeader
	DataSetWriter dphWriter(&fileStream, &dph);
	dphWriter.WriteHeader();

	// Write out the data
	for( int32_t i=0; i < rows; ++i )
	{
		u_int16_t value = (u_int16_t)(i*10+i);
		FileOutput::WriteUInt16(fileStream, value);
	}

	// write the offset
	fileStream.seekp(offsetLocation);
	FileOutput::WriteUInt32(fileStream, offset);

	fileStream.close();

}
开发者ID:,项目名称:,代码行数:68,代码来源:

示例15: CreateReferenceFile

void DataSetUpdaterTest::CreateReferenceFile()
{
	// Create the data object.
	GenericData data;
	data.Header().SetFilename(TEST_FILE);

	DataGroupHeader dgHdr(L"data");
	DataSetHeader dsHdr;

	dsHdr.SetName(L"test");
	dsHdr.AddAsciiColumn(L"string8", 64);
	dsHdr.AddUnicodeColumn(L"string16", 64);
	dsHdr.AddByteColumn(L"int8");
	dsHdr.AddShortColumn(L"int16");
	dsHdr.AddIntColumn(L"int32");
	dsHdr.AddUByteColumn(L"uint8");
	dsHdr.AddUShortColumn(L"uint16");
	dsHdr.AddUIntColumn(L"uint32");
	dsHdr.AddFloatColumn(L"float");
	dsHdr.SetRowCnt(3);

	dgHdr.AddDataSetHdr(dsHdr);

	data.Header().AddDataGroupHdr(dgHdr);
	data.Header().GetGenericDataHdr()->SetFileTypeId("affymetrix.test.data");



	// Write the data object to the file
	GenericFileWriter writer(&data.Header());
	writer.WriteHeader();

	DataGroupWriter &dataGroupWriter = writer.GetDataGroupWriter(0);
	dataGroupWriter.WriteHeader();

	//int iSet=0;
	DataSetWriterIt beginSet;
	DataSetWriterIt endSet;
	dataGroupWriter.GetDataSetWriters(beginSet, endSet);

	beginSet->WriteHeader();

	int32_t dataSetSz = beginSet->GetDataSetSize();
	int32_t offset = writer.GetFilePos();
	writer.SeekFromCurrentPos(dataSetSz + 1);
	beginSet->UpdateNextDataSetOffset();

	dataGroupWriter.UpdateNextDataGroupPos();
	
	writer.SeekFromBeginPos(offset);


	// Write the data.
	beginSet->Write("first_row", 64);
	beginSet->Write(L"first_row", 64);
	beginSet->Write((int8_t) 1);
	beginSet->Write((int16_t) 1);
	beginSet->Write((int32_t) 1);
	beginSet->Write((u_int8_t) 1);
	beginSet->Write((u_int16_t) 1);
	beginSet->Write((u_int32_t) 1);
	beginSet->Write(1.0f);

	beginSet->Write("second_row", 64);
	beginSet->Write(L"second_row", 64);
	beginSet->Write((int8_t) 2);
	beginSet->Write((int16_t) 2);
	beginSet->Write((int32_t) 2);
	beginSet->Write((u_int8_t) 2);
	beginSet->Write((u_int16_t) 2);
	beginSet->Write((u_int32_t) 2);
	beginSet->Write(2.0f);

	beginSet->Write("third_row", 64);
	beginSet->Write(L"third_row", 64);
	beginSet->Write((int8_t) 3);
	beginSet->Write((int16_t) 3);
	beginSet->Write((int32_t) 3);
	beginSet->Write((u_int8_t) 3);
	beginSet->Write((u_int16_t) 3);
	beginSet->Write((u_int32_t) 3);
	beginSet->Write(3.0f);
}
开发者ID:einon,项目名称:affymetrix-power-tools,代码行数:83,代码来源:DataSetUpdaterTest.cpp


注:本文中的DataSetHeader::SetName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。